472,993 Members | 3,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,993 software developers and data experts.

pygtk theme colors ?

I understand nothing ...
I'm trying to get the color of a normal background window

and when I change my themes (i switch between a light and a dark
theme)
i obtain always the same output below :

style = gtk.Button().get_style()
l=[gtk.STATE_NORMAL,gtk.STATE_ACTIVE,gtk.STATE_PRELIG HT,gtk.STATE_SELECTED,gtk.STATE_INSENSITIVE]
for i in l:
print "- base",i,style.base[i].to_string()
for i in l:
print "- text",i,style.text[i].to_string()
for i in l:
print "- fg",i,style.fg[i].to_string()
for i in l:
print "- bg",i,style.bg[i].to_string()

what's the trouble ?!?
Dec 12 '07 #1
1 3073
I've found ...
In fact, you'll need to "realize" the window, and you should obtain
the real gtk theme style .... (if you didn't realize the window, you
obtain the default gtk theme style)

(I post it here, so i could find it in the future again ;-)

w = gtk.Window()
w.realize()
style=w.get_style()

l=[gtk.STATE_NORMAL,gtk.STATE_ACTIVE,gtk.STATE_PRELIG HT,gtk.STATE_SELECTED,gtk.STATE_INSENSITIVE]
for i in l:
print "- base",i,style.base[i].to_string()
for i in l:
print "- text",i,style.text[i].to_string()
for i in l:
print "- fg",i,style.fg[i].to_string()
for i in l:
print "- bg",i,style.bg[i].to_string()
Dec 12 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Egbert Bouwman | last post by:
As a newby to PyGTK I already have produced some gui's I like, but I have difficulties in finding out what method or other instrument I need for doing various things. I have not yet found the...
1
by: Brian Hu | last post by:
Hi I am new to vb.net and trying to build a VB.net winform application. I really like the new look of buttons, readio buttons etc. on my WinXP box. But only thing is I cannot make it consistent...
25
by: TPJ | last post by:
GUI's etc: PyGtk on Windows "(...) So if someone develops mainly for X and just wants to make sure that it is not impossible to run on Windows, you can use PyGTK. (...)", July 2nd, 1999 pyGTK...
4
by: rawCoder | last post by:
Hi All, Have you noticed that Outlook ( dont remember which version ) utilizes three to four colours to give the Blue theme look AliceBlue LightSteelBlue Midnight Blue You can use the...
2
by: jjack100 | last post by:
In asp.net 2.0 you can apply custom themes based on a user profile, etc. And you can change the theme programmatically, etc. But how do you edit or create a theme programmatically? I am working on...
2
by: Merlin | last post by:
Hi, Can anyone guide me on how I might find what colours an XP computer is using for it's theme? I wish to change border colours of boxes to match those of standard control borders that usually...
0
by: binaryj | last post by:
hi again dear group. what i am interested in is giving my pygtk app some distinct look, a lil childish look coz the app is for children. so, i downloaded a couple of themes from...
4
by: Neil Jones | last post by:
Hello, I would like to create my own theme(s) for a couple of my own blog sites. I am hoping a few better themes could bring lot more readers. So far, I have stayed with the default wordpress...
1
by: samatair | last post by:
I need to create a word press theme, making it similar to my website colors and theme. Has any one done that before? How much time will that involve? What are the skills one should have to...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.