Fix some strange behaviour when clicking on the trough of a scale (i.e. stepping) The previous value gets read, not the current.
This commit is contained in:
parent
4a29840e7b
commit
a748db277c
|
@ -903,7 +903,7 @@
|
||||||
<property name="digits">0</property>
|
<property name="digits">0</property>
|
||||||
<property name="draw_value">False</property>
|
<property name="draw_value">False</property>
|
||||||
<property name="value_pos">bottom</property>
|
<property name="value_pos">bottom</property>
|
||||||
<signal name="change-value" handler="on_handlesize_change_value" swapped="no"/>
|
<signal name="value-changed" handler="on_handlesize_value_changed" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">2</property>
|
<property name="left_attach">2</property>
|
||||||
|
@ -922,7 +922,7 @@
|
||||||
<property name="digits">2</property>
|
<property name="digits">2</property>
|
||||||
<property name="draw_value">False</property>
|
<property name="draw_value">False</property>
|
||||||
<property name="value_pos">bottom</property>
|
<property name="value_pos">bottom</property>
|
||||||
<signal name="change-value" handler="on_inactive_color_offset_change_value" swapped="no"/>
|
<signal name="value-changed" handler="on_inactive_color_offset_value_changed" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">2</property>
|
<property name="left_attach">2</property>
|
||||||
|
@ -2813,7 +2813,7 @@
|
||||||
<property name="round_digits">2</property>
|
<property name="round_digits">2</property>
|
||||||
<property name="digits">2</property>
|
<property name="digits">2</property>
|
||||||
<property name="value_pos">bottom</property>
|
<property name="value_pos">bottom</property>
|
||||||
<signal name="change-value" handler="on_darken_background_scale_change_value" swapped="no"/>
|
<signal name="value-changed" handler="on_darken_background_scale_value_changed" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">True</property>
|
<property name="expand">True</property>
|
||||||
|
|
|
@ -871,7 +871,7 @@ class PrefsEditor:
|
||||||
self.config['scrollbar_position'] = value
|
self.config['scrollbar_position'] = value
|
||||||
self.config.save()
|
self.config.save()
|
||||||
|
|
||||||
def on_darken_background_scale_change_value(self, widget, scroll, _value_not_rounded):
|
def on_darken_background_scale_value_changed(self, widget):
|
||||||
"""Background darkness setting changed"""
|
"""Background darkness setting changed"""
|
||||||
value = widget.get_value() # This one is rounded according to the UI.
|
value = widget.get_value() # This one is rounded according to the UI.
|
||||||
if value > 1.0:
|
if value > 1.0:
|
||||||
|
@ -1048,7 +1048,7 @@ class PrefsEditor:
|
||||||
self.config['title_transmit_fg_color'] = color2hex(widget)
|
self.config['title_transmit_fg_color'] = color2hex(widget)
|
||||||
self.config.save()
|
self.config.save()
|
||||||
|
|
||||||
def on_inactive_color_offset_change_value(self, widget, scroll, _value_not_rounded):
|
def on_inactive_color_offset_value_changed(self, widget):
|
||||||
"""Inactive color offset setting changed"""
|
"""Inactive color offset setting changed"""
|
||||||
value = widget.get_value() # This one is rounded according to the UI.
|
value = widget.get_value() # This one is rounded according to the UI.
|
||||||
if value > 1.0:
|
if value > 1.0:
|
||||||
|
@ -1059,7 +1059,7 @@ class PrefsEditor:
|
||||||
label_widget = guiget('inactive_color_offset_value_label')
|
label_widget = guiget('inactive_color_offset_value_label')
|
||||||
label_widget.set_text('%d%%' % (int(value * 100)))
|
label_widget.set_text('%d%%' % (int(value * 100)))
|
||||||
|
|
||||||
def on_handlesize_change_value(self, widget, scroll, _value_not_rounded):
|
def on_handlesize_value_changed(self, widget):
|
||||||
"""Handle size changed"""
|
"""Handle size changed"""
|
||||||
value = widget.get_value() # This one is rounded according to the UI.
|
value = widget.get_value() # This one is rounded according to the UI.
|
||||||
value = int(value) # Cast to int.
|
value = int(value) # Cast to int.
|
||||||
|
|
Loading…
Reference in New Issue