Skip to content

Commit

Permalink
Fix #305387: Add spinner for controlling glissando line thickness in …
Browse files Browse the repository at this point in the history
…inspector
  • Loading branch information
sidharth-anand committed Feb 5, 2021
1 parent 46bdd98 commit 7877f30
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 1 deletion.
4 changes: 4 additions & 0 deletions mscore/inspector/inspectorGlissando.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ InspectorGlissando::InspectorGlissando(QWidget* parent)
{ Pid::FONT_FACE, 0, g.fontFace, g.resetFontFace },
{ Pid::FONT_SIZE, 0, g.fontSize, g.resetFontSize },
{ Pid::FONT_STYLE, 0, g.fontStyle, g.resetFontStyle },
{ Pid::LINE_WIDTH, 0, g.lineWidthSpin, g.resetLineWidth },
};
const std::vector<InspectorPanel> ppList = {
{ g.title, g.panel }
Expand All @@ -61,6 +62,7 @@ void InspectorGlissando::setElement()
g.easeInSlider->setSliderPosition(g.easeInSpin->value());
g.easeOutSlider->setSliderPosition(g.easeOutSpin->value());
g.easeInOutCanvas->setEaseInOut(g.easeInSpin->value(), g.easeOutSpin->value());
g.lineWidthWidget->setHidden(g.type->currentIndex() == 1);

updateEvents();
}
Expand All @@ -76,6 +78,8 @@ void InspectorGlissando::valueChanged(int n)
g.easeInOutCanvas->setEaseInOut(g.easeInSpin->value(), g.easeOutSpin->value());
else if (iList[n].t == Pid::GLISS_STYLE)
updateEvents();
else if (iList[n].t == Pid::GLISS_TYPE)
g.lineWidthWidget->setHidden(g.type->currentIndex() == 1);
update();
}

Expand Down
65 changes: 64 additions & 1 deletion mscore/inspector/inspector_glissando.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>349</width>
<height>436</height>
<height>459</height>
</rect>
</property>
<property name="accessibleName">
Expand Down Expand Up @@ -508,6 +508,69 @@
</layout>
</widget>
</item>
<item row="4" column="0" colspan="3">
<widget class="QWidget" name="lineWidthWidget" native="true">
<layout class="QGridLayout" name="gridLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
<number>3</number>
</property>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="lineWidthSpin">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="specialValueText">
<string/>
</property>
<property name="suffix">
<string>sp</string>
</property>
<property name="minimum">
<double>0.100000000000000</double>
</property>
<property name="maximum">
<double>1.500000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lineWidthLabel">
<property name="text">
<string>Line Thickness:</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="Ms::ResetButton" name="resetLineWidth" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
Expand Down

0 comments on commit 7877f30

Please sign in to comment.