Fix unwanted seperator size change, and increase granularity of dim/transparent sliders
This commit is contained in:
parent
a4af9a1b3d
commit
0b8fd51d5e
|
@ -864,10 +864,12 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkHScale" id="inactive_color_offset">
|
||||
<property name="width_request">100</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="adjustment">adjustment7</property>
|
||||
<property name="round_digits">1</property>
|
||||
<property name="round_digits">2</property>
|
||||
<property name="digits">2</property>
|
||||
<property name="value_pos">left</property>
|
||||
<signal name="change-value" handler="on_inactive_color_offset_change_value" swapped="no"/>
|
||||
</object>
|
||||
|
@ -2955,7 +2957,8 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="adjustment">background_darkness_scale</property>
|
||||
<property name="round_digits">1</property>
|
||||
<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"/>
|
||||
</object>
|
||||
|
|
|
@ -861,9 +861,12 @@ class PrefsEditor:
|
|||
self.config['scrollbar_position'] = value
|
||||
self.config.save()
|
||||
|
||||
def on_darken_background_scale_change_value(self, widget, scroll, value):
|
||||
def on_darken_background_scale_change_value(self, widget, scroll, _value_not_rounded):
|
||||
"""Background darkness setting changed"""
|
||||
self.config['background_darkness'] = round(value, 2)
|
||||
value = widget.get_value() # This one is rounded according to the UI.
|
||||
if value > 1.0:
|
||||
value = 1.0
|
||||
self.config['background_darkness'] = value
|
||||
self.config.save()
|
||||
|
||||
def on_background_image_filechooser_file_set(self, widget):
|
||||
|
@ -1020,16 +1023,18 @@ class PrefsEditor:
|
|||
self.config['title_transmit_fg_color'] = color2hex(widget)
|
||||
self.config.save()
|
||||
|
||||
def on_inactive_color_offset_change_value(self, widget, scroll, value):
|
||||
def on_inactive_color_offset_change_value(self, widget, scroll, _value_not_rounded):
|
||||
"""Inactive color offset setting changed"""
|
||||
value = widget.get_value() # This one is rounded according to the UI.
|
||||
if value > 1.0:
|
||||
value = 1.0
|
||||
self.config['inactive_color_offset'] = round(value, 2)
|
||||
self.config['inactive_color_offset'] = value
|
||||
self.config.save()
|
||||
|
||||
def on_handlesize_change_value(self, widget, scroll, value):
|
||||
def on_handlesize_change_value(self, widget, scroll, _value_not_rounded):
|
||||
"""Handle size changed"""
|
||||
value = int(value)
|
||||
value = widget.get_value() # This one is rounded according to the UI.
|
||||
value = int(value) # Cast to int.
|
||||
if value > 5:
|
||||
value = 5
|
||||
self.config['handle_size'] = value
|
||||
|
|
Loading…
Reference in New Issue