Cleanup and default to scale fit window
This commit is contained in:
parent
c11e384925
commit
0259727784
@ -42,7 +42,6 @@ class ImageListScroll(Gtk.ScrolledWindow):
|
||||
self.image_list_widget = ImageList()
|
||||
self.add(self.image_list_widget)
|
||||
|
||||
# TODO: Setup to load range start/end values from settings,
|
||||
# NOTE: Must align with ImageList start/end limits too
|
||||
def _update_list_size_constraints(self, size):
|
||||
self.size = size
|
||||
@ -77,4 +76,4 @@ class ImageListScroll(Gtk.ScrolledWindow):
|
||||
def _unload_image(self, child):
|
||||
child.hide()
|
||||
# child.image.clear()
|
||||
child.is_loaded = False
|
||||
child.is_loaded = False
|
@ -35,16 +35,13 @@ class ButtonControls(Gtk.ButtonBox):
|
||||
zoomout_button = Gtk.Button()
|
||||
lrotate_button = Gtk.Button()
|
||||
vflip_button = Gtk.Button()
|
||||
# NOTE: Toggle Buttons are acting broken for me so workaround ith regular buttons
|
||||
self.one2one_button = Gtk.Button()
|
||||
self.fit_button = Gtk.Button()
|
||||
hflip_button = Gtk.Button()
|
||||
rrotate_button = Gtk.Button()
|
||||
zoomin_button = Gtk.Button()
|
||||
|
||||
# TODO: add if check against settings pull to set 1:1 or fit
|
||||
self._set_class(self.one2one_button)
|
||||
# self._set_class(self.fit_button)
|
||||
self._set_class(self.fit_button)
|
||||
|
||||
zoomout_button.set_tooltip_text("Zoom Out")
|
||||
lrotate_button.set_tooltip_text("Rotate Left")
|
||||
@ -76,8 +73,8 @@ class ButtonControls(Gtk.ButtonBox):
|
||||
zoomout_button.connect("clicked", self._zoom_out)
|
||||
lrotate_button.connect("clicked", self._rotate_left)
|
||||
vflip_button.connect("clicked", self._vertical_flip)
|
||||
self.one2one_button.connect("button-release-event", self._scale_1_two_1)
|
||||
self.fit_button.connect("button-release-event", self._fit_to_container)
|
||||
self.one2one_button.connect("clicked", self._scale_1_two_1)
|
||||
self.fit_button.connect("clicked", self._fit_to_container)
|
||||
hflip_button.connect("clicked", self._horizontal_flip)
|
||||
rrotate_button.connect("clicked", self._rotate_right)
|
||||
zoomin_button.connect("clicked", self._zoom_in)
|
||||
|
@ -67,7 +67,6 @@ class ImageList(Gtk.Box):
|
||||
event_system.emit("update_list_size_constraints", (len(paths),))
|
||||
self.show_range()
|
||||
|
||||
# TODO: Setup to load range start/end values from settings
|
||||
def show_range(self, i = 0, j = settings.get_max_ring_thumbnail_list()):
|
||||
children = self.get_children()
|
||||
if len(children) <= j:
|
||||
|
@ -19,7 +19,7 @@ class ImageView(Gtk.Image):
|
||||
self.pixbuf = None
|
||||
self.work_pixbuf = None
|
||||
self.animation = None
|
||||
self.fit_to_win = False
|
||||
self.fit_to_win = True
|
||||
|
||||
self._setup_styling()
|
||||
self._setup_signals()
|
||||
|
Loading…
Reference in New Issue
Block a user