diff --git a/ks_includes/KlippyGtk.py b/ks_includes/KlippyGtk.py index e589e1de..7f4c6316 100644 --- a/ks_includes/KlippyGtk.py +++ b/ks_includes/KlippyGtk.py @@ -233,6 +233,7 @@ class KlippyGtk: content_area.set_margin_end(15) content_area.set_margin_top(15) content_area.set_margin_bottom(15) + content.set_valign(Gtk.Align.CENTER) content_area.add(content) dialog.show_all() diff --git a/panels/job_status.py b/panels/job_status.py index 472ce1d7..3bd725cc 100644 --- a/panels/job_status.py +++ b/panels/job_status.py @@ -780,11 +780,15 @@ class Panel(ScreenPanel): buttons = [ {"name": _("Close"), "response": Gtk.ResponseType.CANCEL} ] - pixbuf = self.get_file_image(self.filename, self._screen.width * .9, self._screen.height * .5) + height = self._screen.height * .9 - self._gtk.font_size * 7.5 + pixbuf = self.get_file_image(self.filename, self._screen.width * .9, height) if pixbuf is None: return image = Gtk.Image.new_from_pixbuf(pixbuf) - self._gtk.Dialog(self.filename, buttons, image, self.close_fullscreen_thumbnail) + box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) + box.add(image) + box.set_vexpand(True) + self._gtk.Dialog(self.filename, buttons, box, self.close_fullscreen_thumbnail) def close_fullscreen_thumbnail(self, dialog, response_id): self._gtk.remove_dialog(dialog) diff --git a/panels/print.py b/panels/print.py index c8c6e954..e3b6f2da 100644 --- a/panels/print.py +++ b/panels/print.py @@ -310,7 +310,8 @@ class Panel(ScreenPanel): grid.set_valign(Gtk.Align.CENTER) grid.add(label) - pixbuf = self.get_file_image(filename, self._screen.width * .9, self._screen.height * .5) + height = self._screen.height * .9 - self._gtk.font_size * 10 + pixbuf = self.get_file_image(filename, self._screen.width * .9, height) if pixbuf is not None: image = Gtk.Image.new_from_pixbuf(pixbuf) grid.attach_next_to(image, label, Gtk.PositionType.BOTTOM, 1, 1)