Fix titlebar label preventing scaling down titlebars by wrapping whole box in a viewport.
This commit is contained in:
parent
412c9b3be3
commit
e5a249a498
@ -43,7 +43,7 @@ class EditableLabel(Gtk.EventBox):
|
||||
GObject.GObject.__init__(self)
|
||||
|
||||
self._entry_handler_id = []
|
||||
self._label = Gtk.Label(label=text)
|
||||
self._label = Gtk.Label(label=text, ellipsize='end')
|
||||
self._custom = False
|
||||
self.set_visible_window (False)
|
||||
self.add (self._label)
|
||||
|
@ -50,7 +50,7 @@ class Titlebar(Gtk.EventBox):
|
||||
self.label.connect('edit-done', self.on_edit_done)
|
||||
self.ebox = Gtk.EventBox()
|
||||
grouphbox = Gtk.HBox()
|
||||
self.grouplabel = Gtk.Label()
|
||||
self.grouplabel = Gtk.Label(ellipsize='end')
|
||||
self.groupicon = Gtk.Image()
|
||||
self.bellicon = Gtk.Image()
|
||||
self.bellicon.set_no_show_all(True)
|
||||
@ -85,8 +85,10 @@ class Titlebar(Gtk.EventBox):
|
||||
hbox.pack_start(self.label, True, True, 0)
|
||||
hbox.pack_end(self.bellicon, False, False, 2)
|
||||
|
||||
self.add(hbox)
|
||||
hbox.show_all()
|
||||
viewport = Gtk.Viewport(hscroll_policy='natural')
|
||||
viewport.add(hbox)
|
||||
self.add (viewport)
|
||||
viewport.show_all()
|
||||
self.set_no_show_all(True)
|
||||
self.show()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user