Skip to content

Commit 638b857

Browse files
committed
gmoccapy: ensure square shape of notification close button
1 parent e980595 commit 638b857

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/emc/usr_intf/gmoccapy/notification.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,11 @@ def _show_message(self, message):
130130
btn_close.set_image(image)
131131
btn_close.set_border_width(2)
132132
btn_close.connect('clicked', self._on_btn_close_clicked, labelnumber.get_text())
133-
hbox.pack_end(btn_close, False, False, 0)
133+
btn_close.set_size_request(48, 48)
134+
btn_box = Gtk.Box.new(Gtk.Orientation.VERTICAL,0)
135+
btn_box.set_center_widget(btn_close)
136+
btn_box.show()
137+
hbox.pack_end(btn_box, False, False, 0)
134138
if self.use_frames:
135139
widget = frame
136140
else:
@@ -286,7 +290,7 @@ def main():
286290

287291
notification = Notification()
288292
notification.add_message('Halo World out there', '/usr/share/gmoccapy/images/applet-critical.png')
289-
notification.add_message('Hallo World this is a long string that have a linebreak ', '/usr/share/gmoccapy/images/std_info.gif')
293+
notification.add_message('Hallo World this is a long long long long long long long long long long string that have a linebreak ', '/usr/share/gmoccapy/images/std_info.gif')
290294
notification.add_message('This has a default icon')
291295
notification.show()
292296
#def debug(self, text):

0 commit comments

Comments
 (0)