Align widgets to the left
This commit is contained in:
parent
b34f5d7164
commit
2e780d624c
@ -57,7 +57,7 @@ class ActivityButton(ToolButton):
|
|||||||
|
|
||||||
class ActivityToolbarButton(ToolbarButton):
|
class ActivityToolbarButton(ToolbarButton):
|
||||||
def __init__(self, activity, **kwargs):
|
def __init__(self, activity, **kwargs):
|
||||||
toolbar = ActivityToolbar(activity)
|
toolbar = ActivityToolbar(activity, orientation_left=True)
|
||||||
toolbar.stop.hide()
|
toolbar.stop.hide()
|
||||||
|
|
||||||
ToolbarButton.__init__(self, page=toolbar, **kwargs)
|
ToolbarButton.__init__(self, page=toolbar, **kwargs)
|
||||||
@ -202,7 +202,7 @@ class ActivityToolbar(gtk.Toolbar):
|
|||||||
All activities should have this toolbar. It is easiest to add it to your
|
All activities should have this toolbar. It is easiest to add it to your
|
||||||
Activity by using the ActivityToolbox.
|
Activity by using the ActivityToolbox.
|
||||||
"""
|
"""
|
||||||
def __init__(self, activity):
|
def __init__(self, activity, orientation_left=False):
|
||||||
gtk.Toolbar.__init__(self)
|
gtk.Toolbar.__init__(self)
|
||||||
|
|
||||||
self._activity = activity
|
self._activity = activity
|
||||||
@ -213,11 +213,12 @@ class ActivityToolbar(gtk.Toolbar):
|
|||||||
self.insert(title_button, -1)
|
self.insert(title_button, -1)
|
||||||
self.title = title_button.entry
|
self.title = title_button.entry
|
||||||
|
|
||||||
separator = gtk.SeparatorToolItem()
|
if orientation_left == False:
|
||||||
separator.props.draw = False
|
separator = gtk.SeparatorToolItem()
|
||||||
separator.set_expand(True)
|
separator.props.draw = False
|
||||||
self.insert(separator, -1)
|
separator.set_expand(True)
|
||||||
separator.show()
|
self.insert(separator, -1)
|
||||||
|
separator.show()
|
||||||
|
|
||||||
self.share = ShareButton(activity)
|
self.share = ShareButton(activity)
|
||||||
self.share.show()
|
self.share.show()
|
||||||
|
Loading…
Reference in New Issue
Block a user