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:
Stephen Boddy 2016-12-12 19:07:08 +01:00
parent 4a29840e7b
commit a748db277c
2 changed files with 6 additions and 6 deletions

View File

@ -903,7 +903,7 @@
<property name="digits">0</property>
<property name="draw_value">False</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>
<packing>
<property name="left_attach">2</property>
@ -922,7 +922,7 @@
<property name="digits">2</property>
<property name="draw_value">False</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>
<packing>
<property name="left_attach">2</property>
@ -2813,7 +2813,7 @@
<property name="round_digits">2</property>
<property name="digits">2</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>
<packing>
<property name="expand">True</property>

View File

@ -871,7 +871,7 @@ class PrefsEditor:
self.config['scrollbar_position'] = value
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"""
value = widget.get_value() # This one is rounded according to the UI.
if value > 1.0:
@ -1048,7 +1048,7 @@ class PrefsEditor:
self.config['title_transmit_fg_color'] = color2hex(widget)
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"""
value = widget.get_value() # This one is rounded according to the UI.
if value > 1.0:
@ -1059,7 +1059,7 @@ class PrefsEditor:
label_widget = guiget('inactive_color_offset_value_label')
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"""
value = widget.get_value() # This one is rounded according to the UI.
value = int(value) # Cast to int.