job_status and print: revise the size of the thumbnail close #1136
This commit is contained in:
parent
f9872f4817
commit
9d177d2afc
@ -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()
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user