1

我尝试了下面的代码,颜色没有反映,我错过了什么吗?

#add description box beside test cases
        testCaseDescWindow = gtk.ScrolledWindow()
        testCaseDescWindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
        testCaseDescWindow.get_vscrollbar().modify_fg(gtk.STATE_NORMAL,gtk.gdk.color_parse('#40515F'))
        testCaseDescWindow.get_hscrollbar().modify_fg(gtk.STATE_NORMAL,gtk.gdk.color_parse('#40515F'))
4

1 回答 1

0

You are setting the foreground color which GtkScrollbar probably does not use.

You could try to use GtkCssProvider and check which property is the correct to modify (see http://worldofgnome.org/making-gtk3-themes-part-2-the-gtk-css-and-gtk-widgets-css-files/ for list of properties)

于 2013-08-24T08:24:24.540 回答