[pygtk] pygtk tree view expanders custom color

Timo timomlists at gmail.com
Tue Sep 10 01:30:57 WST 2013


Op 09-09-13 13:36, Giuseppe Penone schreef:
> Hello Timo,
> thank you very much for the reply,
> unfortunately I cannot upgrade to GTK3 because my app 
> (http://www.giuspen.com/cherrytree/)
> has to fully work on microsoft windows and I see that pyGI or whatever 
> is the name of python-GTK3
> still doesn't work on windows.
> It's sad to say but if GTK people will not spend time to support 
> cross-platform rather than just adding functionalities
> more and more people will leave it for Qt and python-Qt.
I completely agree Giuseppe. My cross-platform applications also still 
use GTK2 for that same reason.

For a Linux only project I'm using GTK3 and I really like it (like the 
CSS theming for example), but I would probably think twice again in the 
future when starting a new large project. Which is a real shame if you 
look at how awesome GTK is.

I can't help you with GTK2 theming though, sorry.

Timo


> Cheers,
> Giuseppe.
>
>
> On Mon, Sep 9, 2013 at 1:00 PM, Timo <timomlists at gmail.com 
> <mailto:timomlists at gmail.com>> wrote:
>
>     Op 08-09-13 21 <tel:08-09-13%2021>:27, Giuseppe Penone schreef:
>
>         Hi,
>         in my application users can control the foreground and
>         background color of the treeview.
>         The problem is that the expanders arrows color does not change
>         and so it happens that is not visible.
>         Does anybody know if it is possible to override the gtk theme
>         in use about this?
>
>
>     You can change it like any other part or widget in GTK3. Just add
>     the following to your stylesheet:
>
>     .expander {
>         color: rgb(32, 74, 135);
>     }
>
>
>     Or be more precise about which treeview and do:
>
>     GtkTreeView#MyCustomView .expander {
>         color: rgb(32, 74, 135);
>     }
>
>     And in your code:
>         treeview.set_name("MyCustomView")
>
>     Cheers,
>     Timo
>
>         Cheers,
>         Giuseppe.
>
>
>         _______________________________________________
>         pygtk mailing list pygtk at daa.com.au <mailto:pygtk at daa.com.au>
>         http://www.daa.com.au/mailman/listinfo/pygtk
>         Read the PyGTK FAQ: http://faq.pygtk.org/
>
>
>     _______________________________________________
>     pygtk mailing list pygtk at daa.com.au <mailto:pygtk at daa.com.au>
>     http://www.daa.com.au/mailman/listinfo/pygtk
>     Read the PyGTK FAQ: http://faq.pygtk.org/
>
>



More information about the pygtk mailing list