on xenial help sign in
maximum slider value cannot be smaller than minimum
commit85ca33835867842ce02d0d29de0ae769f71d9595 authorNick Dedekind <nicholas.dedekind@gmail.com> dateWed 10 Jul 2013, 13:25 (13 years ago) parent21527ef
1 file changed+7−1
plugins/Unity/Indicators/qml/SliderMenuItem.qml+7−1
plugins/Unity/Indicators/qml/SliderMenuItem.qml+7−1
@@ -39,7 +39,13 @@ MenuItem {
3939 // passed to QStateAction::updateState(…). The server chokes on
4040 // those values, complaining that they’re not of the right type…
4141 minimumValue: menu.extra.canonical_min ? menu.extra.canonical_min * 1.000001 : 0.0000001
42− maximumValue: menu.extra.canonical_max ? menu.extra.canonical_max * 1.000001 : 0.9999999
42+ maximumValue: {
43+ var maximum = menu.extra.canonical_max ? menu.extra.canonical_max * 1.000001 : 0.9999999
44+ if (maximum <= minimumValue) {
45+ return minimumValue + 1;
46+ }
47+ return maximum;
48+ }
4349
4450 // FIXME - to be deprecated in Ubuntu.Components.
4551 // Use this to disable the label, since there is not way to do it on the component.