fpdb.pyw: force bg_colour for inactive tab labels - workaround themes problem
This commit is contained in:
parent
f0e046ac83
commit
8792b427de
|
@ -187,6 +187,22 @@ class fpdb:
|
||||||
tabBox.pack_start(tabLabel, False)
|
tabBox.pack_start(tabLabel, False)
|
||||||
eventBox.add(tabBox)
|
eventBox.add(tabBox)
|
||||||
|
|
||||||
|
# fixme: force background state to fix problem where STATE_ACTIVE
|
||||||
|
# tab labels are black in some gtk themes, and therefore unreadable
|
||||||
|
# This behaviour is probably a bug in libwimp.dll or pygtk, but
|
||||||
|
# need to force background to avoid issues with menu labels being
|
||||||
|
# unreadable
|
||||||
|
#
|
||||||
|
# gtk.STATE_ACTIVE is a displayed, but not selected tab
|
||||||
|
# gtk.STATE_NORMAL is a displayed, selected, focussed tab
|
||||||
|
# gtk.STATE_INSENSITIVE is an inactive tab
|
||||||
|
# Insensitive/base is chosen as the background colour, because
|
||||||
|
# although not perfect, it seems to be the least instrusive.
|
||||||
|
baseNormStyle = eventBox.get_style().base[gtk.STATE_INSENSITIVE]
|
||||||
|
if baseNormStyle:
|
||||||
|
print baseNormStyle
|
||||||
|
eventBox.modify_bg(gtk.STATE_ACTIVE, gtk.gdk.color_parse(str(baseNormStyle)))
|
||||||
|
|
||||||
if nb.get_n_pages() > 0:
|
if nb.get_n_pages() > 0:
|
||||||
tabButton = gtk.Button()
|
tabButton = gtk.Button()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user