Fix titlebar label preventing scaling down titlebars by wrapping whole box in a viewport.

This commit is contained in:
Stephen Boddy 2015-02-19 15:30:45 +01:00
parent 412c9b3be3
commit e5a249a498
2 changed files with 6 additions and 4 deletions

View File

@ -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)

View File

@ -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()