Made headers look right again
This commit is contained in:
parent
9eb0e491d5
commit
90d8ed7fe5
|
@ -274,28 +274,47 @@ class TweetBox(gtk.HBox):
|
||||||
|
|
||||||
## Build the header
|
## Build the header
|
||||||
self.user_button = gtk.Button()
|
self.user_button = gtk.Button()
|
||||||
|
user_button_eb = gtk.EventBox()
|
||||||
|
user_button_eb.add(self.user_button)
|
||||||
|
|
||||||
self.time_label = gtk.Label()
|
self.time_label = gtk.Label()
|
||||||
|
time_label_eb = gtk.EventBox()
|
||||||
|
time_label_eb.add(self.time_label)
|
||||||
|
|
||||||
self.app_button = gtk.Button()
|
self.app_button = gtk.Button()
|
||||||
|
app_button_eb = gtk.EventBox()
|
||||||
|
app_button_eb.add(self.app_button)
|
||||||
|
|
||||||
via_label = gtk.Label(' via ')
|
via_label = gtk.Label(' via ')
|
||||||
|
via_label_eb = gtk.EventBox()
|
||||||
|
via_label_eb.add(via_label)
|
||||||
|
|
||||||
self.header = gtk.Button()
|
self.header = gtk.Button()
|
||||||
label_box = gtk.HBox()
|
label_box = gtk.HBox()
|
||||||
label_box.pack_start(self.user_button, expand=False)
|
label_box.pack_start(user_button_eb, expand=False)
|
||||||
label_box.pack_start(self.time_label, expand=False)
|
label_box.pack_start(time_label_eb, expand=False)
|
||||||
label_box.pack_start(via_label, expand=False)
|
label_box.pack_start(via_label_eb, expand=False)
|
||||||
label_box.pack_start(self.app_button, expand=False)
|
label_box.pack_start(app_button_eb, expand=False)
|
||||||
text_box.pack_start(label_box)
|
text_box.pack_start(label_box)
|
||||||
|
|
||||||
# Set the header's properties
|
# Set the header's properties
|
||||||
label_box.modify_text(gtk.STATE_NORMAL,gtk.gdk.color_parse("#ffffff"))
|
|
||||||
label_box.modify_bg(gtk.STATE_NORMAL,gtk.gdk.color_parse("#8888ff"))
|
|
||||||
self.user_button.set_relief(gtk.RELIEF_NONE)
|
self.user_button.set_relief(gtk.RELIEF_NONE)
|
||||||
self.user_button.set_alignment(0.0, 0.0)
|
self.user_button.set_alignment(0.0, 0.0)
|
||||||
|
user_button_eb.modify_text(gtk.STATE_NORMAL,gtk.gdk.color_parse("#ffffff"))
|
||||||
|
user_button_eb.modify_bg(gtk.STATE_NORMAL,gtk.gdk.color_parse("#8888ff"))
|
||||||
|
|
||||||
self.time_label.set_alignment(0.0, 0.5)
|
self.time_label.set_alignment(0.0, 0.5)
|
||||||
|
time_label_eb.modify_text(gtk.STATE_NORMAL,gtk.gdk.color_parse("#ffffff"))
|
||||||
|
time_label_eb.modify_bg(gtk.STATE_NORMAL,gtk.gdk.color_parse("#8888ff"))
|
||||||
|
|
||||||
via_label.set_alignment(0.0, 0.5)
|
via_label.set_alignment(0.0, 0.5)
|
||||||
|
via_label_eb.modify_text(gtk.STATE_NORMAL,gtk.gdk.color_parse("#ffffff"))
|
||||||
|
via_label_eb.modify_bg(gtk.STATE_NORMAL,gtk.gdk.color_parse("#8888ff"))
|
||||||
|
|
||||||
self.app_button.set_relief(gtk.RELIEF_NONE)
|
self.app_button.set_relief(gtk.RELIEF_NONE)
|
||||||
self.app_button.set_alignment(0.0, 0.0)
|
self.app_button.set_alignment(0.0, 0.0)
|
||||||
|
app_button_eb.modify_text(gtk.STATE_NORMAL,gtk.gdk.color_parse("#ffffff"))
|
||||||
|
app_button_eb.modify_bg(gtk.STATE_NORMAL,gtk.gdk.color_parse("#8888ff"))
|
||||||
|
|
||||||
# Handle the header buttons being clicked
|
# Handle the header buttons being clicked
|
||||||
if self.is_user:
|
if self.is_user:
|
||||||
|
@ -472,8 +491,9 @@ class TweetBox(gtk.HBox):
|
||||||
|
|
||||||
def on_app_button_clicked(self, widget):
|
def on_app_button_clicked(self, widget):
|
||||||
self.set_read()
|
self.set_read()
|
||||||
if self.app_url:
|
print 'debug: on_app_button_clicked(): ' + self.app_url
|
||||||
webbrowser.open(self.app_url)
|
# if self.app_url:
|
||||||
|
# webbrowser.open(self.app_url)
|
||||||
|
|
||||||
|
|
||||||
def on_mouse_clicked(self, widget, event):
|
def on_mouse_clicked(self, widget, event):
|
||||||
|
|
Reference in New Issue
Block a user