on xenial help sign in
Removed fixme for slider int->double conversion
4e8dc16Nick Dedekind
plugins/Unity/Indicators/qml/MenuItemFactory.qml+1−16
@@ -73,23 +73,8 @@ Item {
73 'max-icon': 'icon'});
73 'max-icon': 'icon'});
74 }
74 }
75
75
76− // FIXME: The interval should be [0.0 - 1.0]. Unfortunately, when
77− // reaching the boundaries (0.0 or 1.0), the value is converted
78− // to an integer when automatically wrapped in a variant when
79− // passed to QStateAction::updateState(…). The server chokes on
80− // those values, complaining that they’re not of the right type…
81 onChangeState: {
76 onChangeState: {
82− if (value == Math.round(value)) {
83− if (value >= maximumValue) {
84− model.changeState(modelIndex, maximumValue - 0.000001);
85− } else if (value <= minimumValue) {
86− model.changeState(modelIndex, minimumValue + 0.000001);
77+ model.changeState(modelIndex, value);
87− } else {
88− model.changeState(modelIndex, value * 1.000001);
89− }
90− } else {
91− model.changeState(modelIndex, value);
92− }
93 }
78 }
94 }
79 }
95 }
80 }