On 08/01/2013 02:00 AM, Osmo Salomaa wrote:
Here is a very simple scrpit that shows the problem. For me it prints:
Gdk.Color(red=0.00, green=0.00, blue=0.00, alpha=0.00)
For editable text fields, you're probably looking for the *base* color.
01.08.2013 10:09, Yann Leboulanger wrote:
On 08/01/2013 02:00 AM, Osmo Salomaa wrote:
style.lookup_color(theme_base_color) returns a 0, 0, 0, 0 color here.
OK, so that's theme-specific.
Some color names might be available regardless of theme, but I don't
know which ones; for example
On 07/31/2013 07:33 PM, Timo wrote:
Op 31-07-13 13:48, Yann Leboulanger schreef:
On 01/29/2013 02:18 PM, Yann Leboulanger wrote:
Hi,
I'm trying to get the default / current background color of a textview.
The code I do it:
context = tv.get_style_context()
color =
Hi,
I'm trying to get the default / current background color of a textview.
The code I do it:
context = tv.get_style_context()
color = context.get_background_color(Gtk.StateFlags.NORMAL)
But that returns a fully transparent color (0,0,0,0)
If I first set a custom color with
Sounds like you're trying to retrieve the default colors before the widget
has been realized. Consider this (mind you this uses pygtk):
#!/usr/bin/env python
import gtk
def main():
window = gtk.Window(gtk.WINDOW_TOPLEVEL)
window.connect(delete-event, lambda *x: gtk.main_quit())
tv
On 01/29/2013 02:35 PM, Niklas Koep wrote:
Sounds like you're trying to retrieve the default colors before the
widget has been realized. Consider this (mind you this uses pygtk):
No, this is done AFTER the widget is realized. It's done in a textbiffer
'changed' callback, a long time (several