214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
|
@staticmethod
def get_bg_color(widget):
try:
# Gtk3 only
normal_bg = widget.get_style_context().get_background_color(gtk.StateType.NORMAL)
normal_bg = normal_bg.to_string()
except:
normal_bg = "#ffffff" # Gtk2 default
return normal_bg
#-- treeview for categories
#
# simple two-level treeview display in one column
# with entries = [main,[sub,sub], title,[...],...]
|
|
|
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
|
@staticmethod
def get_bg_color(widget):
try:
# Gtk3 only
normal_bg = widget.get_style_context().get_background_color(gtk.StateType.NORMAL)
normal_bg = normal_bg.to_string()
except:
normal_bg = "" # just live with the inevitable Warning
return normal_bg
#-- treeview for categories
#
# simple two-level treeview display in one column
# with entries = [main,[sub,sub], title,[...],...]
|