473,765 Members | 1,959 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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().ge t_style()
l=[gtk.STATE_NORMA L,gtk.STATE_ACT IVE,gtk.STATE_P RELIGHT,gtk.STA TE_SELECTED,gtk .STATE_INSENSIT IVE]
for i in l:
print "- base",i,style.b ase[i].to_string()
for i in l:
print "- text",i,style.t ext[i].to_string()
for i in l:
print "- fg",i,style.f g[i].to_string()
for i in l:
print "- bg",i,style.b g[i].to_string()

what's the trouble ?!?
Dec 12 '07 #1
1 3096
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_sty le()

l=[gtk.STATE_NORMA L,gtk.STATE_ACT IVE,gtk.STATE_P RELIGHT,gtk.STA TE_SELECTED,gtk .STATE_INSENSIT IVE]
for i in l:
print "- base",i,style.b ase[i].to_string()
for i in l:
print "- text",i,style.t ext[i].to_string()
for i in l:
print "- fg",i,style.f g[i].to_string()
for i in l:
print "- bg",i,style.b g[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
1613
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 tutorial or otherwise that explains concepts like setting (relative) sizes, setting or manipulating focus, setting colors, etc. Also when I think I need a method with a specific word it its name, and I cannot find it, there are two (not...
1
433
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 with my form background color (greyish by default?). My question is, how can I can change my form background color using something like XP theme? so they will be consistent automatically? BTW, I tried to use background colors provided in the...
25
4282
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 on Windows "(...) > can i use pyGTK under > Windows???
4
2482
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 above colours in appropriate places to give the look of
2
2225
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 a content management system where the user needs to be able to select fonts, colors, etc. Right now I can only see how to let the user select from a pre-defined set of themes. In the old days, you could generate the css file from user input...
2
1075
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 appear blue if using the standard theme. Thanks, Merlin
0
1097
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 http://art.gnome.org/themes/gtk2/ and for the past 1 hr i have been trying to theme my app but with no results.
4
4245
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 theme (blue title). There are a lot of web sites I have seen that have very attractive themes. I am not a programmer and do not like to edit the php files or css files etc. My preference is to visually create the theme (font,images,background...
1
1318
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 create a theme? Thanks for you answers.
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9398
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10160
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9951
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9832
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8831
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7378
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5275
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...

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.