Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #305387: Add spinner for controlling glissando line thickness in inspector #7435

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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