Thread
:
Python GTK/Hildon change button background (in fremantle)
View Single Post
rambo
2010-02-11 , 21:27
Posts: 540 | Thanked: 288 times | Joined on Sep 2009
#
1
I have been driving myself crazy trying to do this, none of the EventBox tricks I found with google work in any usable way.
Basically I have a hildon.Button (also tried with plain gtk.Button) and I want to change the background color between red and green based on state changes.
Tried the following approaches:
1. Put the whole button inside eventbox and change eventbox background (the "official" GTK workaround to the fact that buttons do not generally allow background to be messed with), does "nothing" (ie the button with the default background and all is drawn on top of the eb).
2. Put the first child of the hildon.Button (gtk.Alignment) inside the eventbox: makes ugly mess where there is rectangular box inside the button area with the gray button borders visible, click only works if done in the gray border (i guess the eventbox could be connected to the signals as well, but since this looks fugly I didn't bother experimenting with that).
I wonder if I need to start reading hildon sources to figure out how exactly they build these widgets...
Quote & Reply
|
rambo
View Public Profile
Send a private message to rambo
Find all posts by rambo