Add butttons for vertical scrollbars fixes
Co-authored-by: alfrix <alfredomonclus@gmail.com>
This commit is contained in:
parent
dcad47bb51
commit
65c4b172e8
@ -262,8 +262,7 @@ class KlippyGtk:
|
||||
b.connect("clicked", self.screen.reset_screensaver_timeout)
|
||||
return b
|
||||
|
||||
@staticmethod
|
||||
def ScrolledWindow():
|
||||
def ScrolledWindow(self, steppers=True):
|
||||
scroll = Gtk.ScrolledWindow()
|
||||
scroll.set_property("overlay-scrolling", False)
|
||||
scroll.set_vexpand(True)
|
||||
@ -271,4 +270,6 @@ class KlippyGtk:
|
||||
Gdk.EventMask.TOUCH_MASK |
|
||||
Gdk.EventMask.BUTTON_RELEASE_MASK)
|
||||
scroll.set_kinetic_scrolling(True)
|
||||
if self.screen._config.get_main_config().getboolean("show_scroll_steppers", fallback=False) and steppers:
|
||||
scroll.get_vscrollbar().get_style_context().add_class("with-steppers")
|
||||
return scroll
|
||||
|
@ -156,7 +156,7 @@ class KlipperScreenConfig:
|
||||
bools = (
|
||||
'invert_x', 'invert_y', 'invert_z', '24htime', 'only_heaters', 'show_cursor', 'confirm_estop',
|
||||
'autoclose_popups', 'use_dpms', 'use_default_menu', 'side_macro_shortcut', 'use-matchbox-keyboard',
|
||||
'show_heater_power'
|
||||
'show_heater_power', "show_scroll_steppers",
|
||||
)
|
||||
strs = (
|
||||
'default_printer', 'language', 'print_sort_dir', 'theme', 'screen_blanking', 'font_size',
|
||||
@ -278,6 +278,8 @@ class KlipperScreenConfig:
|
||||
"value": "True"}},
|
||||
{"show_heater_power": {"section": "main", "name": _("Show Heater Power"), "type": "binary",
|
||||
"value": "False", "callback": screen.reload_panels}},
|
||||
{"show_scroll_steppers": {"section": "main", "name": _("Show Scrollbars Buttons"), "type": "binary",
|
||||
"value": "False", "callback": screen.reload_panels}},
|
||||
# {"": {"section": "main", "name": _(""), "type": ""}}
|
||||
]
|
||||
|
||||
|
@ -229,7 +229,7 @@ class Panel(MenuPanel):
|
||||
self.labels['da'] = HeaterGraph(self._printer, self._gtk.font_size)
|
||||
self.labels['da'].set_vexpand(True)
|
||||
|
||||
scroll = self._gtk.ScrolledWindow()
|
||||
scroll = self._gtk.ScrolledWindow(steppers=False)
|
||||
scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
|
||||
scroll.add(self.labels['devices'])
|
||||
|
||||
|
@ -446,7 +446,7 @@ class Panel(ScreenPanel):
|
||||
self.labels['da'] = HeaterGraph(self._printer, self._gtk.font_size)
|
||||
self.labels['da'].set_vexpand(True)
|
||||
|
||||
scroll = self._gtk.ScrolledWindow()
|
||||
scroll = self._gtk.ScrolledWindow(steppers=False)
|
||||
scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
|
||||
scroll.add(self.labels['devices'])
|
||||
|
||||
|
@ -182,14 +182,32 @@ scale trough slider {
|
||||
scrollbar, scrollbar button, scrollbar trough {
|
||||
border: none;
|
||||
background-color: #13181C;
|
||||
min-height: 2.5em;
|
||||
}
|
||||
|
||||
scrollbar slider {
|
||||
min-width: 2em;
|
||||
min-width: 2.5em;
|
||||
border-radius: .7em;
|
||||
background-color: #404E57;
|
||||
}
|
||||
|
||||
scrollbar.vertical.with-steppers {
|
||||
-GtkScrollbar-has-backward-stepper: true;
|
||||
-GtkScrollbar-has-forward-stepper: true;
|
||||
}
|
||||
|
||||
scrollbar.vertical.with-steppers button.down {
|
||||
-gtk-icon-source: -gtk-icontheme("pan-down-symbolic");
|
||||
}
|
||||
|
||||
scrollbar.vertical.with-steppers button.up {
|
||||
-gtk-icon-source: -gtk-icontheme("pan-up-symbolic");
|
||||
}
|
||||
|
||||
undershoot.top, undershoot.bottom {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
separator {
|
||||
margin: 1em 2em;
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
|
Loading…
x
Reference in New Issue
Block a user