Getting native colors in GTK/GDK?
- From: "Matthew Allen" <list sydneyband com au>
- To: <gtk-app-devel-list gnome org>
- Subject: Getting native colors in GTK/GDK?
- Date: Tue, 21 Sep 2010 22:58:09 +1000
So I want to match my GTK app's custom widgets to the current theme in both Linux and Windows.
I grepped the source code and there is no mention of GetSysColor, and certainly GTK ignores the current
window colors on win32 (at least for me). It just uses a default grey for window backgrounds etc. I tested it
using a GTK "hello world" build.
On Linux is there a way to make GTK read the current theme's colors in and access them?
Getting a GtkStyle and looking at the values in fg, bg and so on revealed that they have no theme colors
whatsoever (I could however get the current system font which is useful). I assume somewhere there is a
library to do this, maybe something from Gnome? I don't really care about the windows side of things, because
it's easy enough to wrap GetSysColor but on Linux I don't know where to start.
Regards
--
Matthew Allen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]