udpate
This commit is contained in:
parent
92433c3100
commit
14531bc829
11 changed files with 806 additions and 569 deletions
|
@ -9,10 +9,10 @@ base_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
|||
|
||||
|
||||
class MessageWindow(Gtk.Window):
|
||||
def __init__(self, title, message, image_path, detailed_message, **kwargs):
|
||||
def __init__(self, title, message, detailed_message, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
|
||||
# self.set_title(title=title)
|
||||
self.set_title(title=title)
|
||||
self.set_modal(modal=True)
|
||||
self.set_resizable(False)
|
||||
icon_name = "akm-tux"
|
||||
|
@ -34,14 +34,7 @@ class MessageWindow(Gtk.Window):
|
|||
vbox_message = Gtk.Box.new(orientation=Gtk.Orientation.VERTICAL, spacing=10)
|
||||
vbox_message.set_name("vbox_flowbox_message")
|
||||
|
||||
image = Gtk.Picture.new_for_filename(os.path.join(base_dir, image_path))
|
||||
|
||||
image.set_content_fit(content_fit=Gtk.ContentFit.SCALE_DOWN)
|
||||
image.set_halign(Gtk.Align.START)
|
||||
|
||||
hbox_image = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5)
|
||||
|
||||
# hbox_image.append(image)
|
||||
hbox_message = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5)
|
||||
|
||||
self.set_child(child=vbox_message)
|
||||
|
||||
|
@ -65,26 +58,25 @@ class MessageWindow(Gtk.Window):
|
|||
|
||||
scrolled_window.set_child(textview)
|
||||
|
||||
hbox_image.append(scrolled_window)
|
||||
hbox_message.append(scrolled_window)
|
||||
|
||||
self.set_size_request(700, 500)
|
||||
self.set_resizable(True)
|
||||
else:
|
||||
label_message = Gtk.Label(xalign=0, yalign=0)
|
||||
label_message = Gtk.Label(xalign=0.5, yalign=0.5)
|
||||
label_message.set_markup("%s" % message)
|
||||
label_message.set_name("label_flowbox_message")
|
||||
|
||||
hbox_image.append(image)
|
||||
hbox_image.append(label_message)
|
||||
hbox_message.append(label_message)
|
||||
|
||||
vbox_message.append(hbox_image)
|
||||
vbox_message.append(hbox_message)
|
||||
|
||||
button_ok = Gtk.Button.new_with_label("OK")
|
||||
button_ok.set_size_request(100, 30)
|
||||
button_ok.set_halign(Gtk.Align.END)
|
||||
button_ok.connect("clicked", self.on_button_ok_clicked)
|
||||
|
||||
hbox_buttons = Gtk.Box.new(orientation=Gtk.Orientation.HORIZONTAL, spacing=20)
|
||||
hbox_buttons = Gtk.Box.new(orientation=Gtk.Orientation.HORIZONTAL, spacing=50)
|
||||
hbox_buttons.set_halign(Gtk.Align.END)
|
||||
hbox_buttons.append(button_ok)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue