Moved mirage2 to use newer GTK template structure patterns

This commit is contained in:
2026-05-22 18:27:16 -05:00
parent 447b087188
commit bbd8fd7a2c
94 changed files with 2846 additions and 814 deletions

View File

@@ -30,7 +30,7 @@ class ButtonControls(Gtk.ButtonBox):
...
def _load_widgets(self):
icons_path = settings.get_icons_path()
icons_path = settings_manager.path_manager.get_icons_path()
center_widget = Gtk.ButtonBox()
zoomout_button = Gtk.Button()
lrotate_button = Gtk.Button()
@@ -97,32 +97,32 @@ class ButtonControls(Gtk.ButtonBox):
self.set_center_widget(center_widget)
def _zoom_out(self, widget = None, eve = None):
event_system.emit("zoom_out")
event_system.emit("zoom-out")
def _rotate_left(self, widget = None, eve = None):
event_system.emit("rotate_left")
event_system.emit("rotate-left")
def _vertical_flip(self, widget = None, eve = None):
event_system.emit("vertical_flip")
event_system.emit("vertical-flip")
def _scale_1_two_1(self, widget = None, eve = None):
self._unset_class(self.fit_button)
self._set_class(self.one2one_button)
event_system.emit("scale_1_two_1")
event_system.emit("scale-1-to-1")
def _fit_to_container(self, widget = None, eve = None):
self._unset_class(self.one2one_button)
self._set_class(self.fit_button)
event_system.emit("fit_to_container")
event_system.emit("fit-to-container")
def _horizontal_flip(self, widget = None, eve = None):
event_system.emit("horizontal_flip")
event_system.emit("horizontal-flip")
def _rotate_right(self, widget = None, eve = None):
event_system.emit("rotate_right")
event_system.emit("rotate-right")
def _zoom_in(self, widget = None, eve = None):
event_system.emit("zoom_in")
event_system.emit("zoom-in")
def _set_class(self, target):
ctx = target.get_style_context()
@@ -133,4 +133,4 @@ class ButtonControls(Gtk.ButtonBox):
ctx.remove_class("button-highlighted")
def _show_ocr(self, widget):
event_system.emit("show_ocr")
event_system.emit("show-ocr")