[maemo-users] Re: ?OT: Cant set background color w/py2.5 glade notebook widget on 770

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/13/07, Danny Milosavljevic <danny_milo at yahoo.com> wrote:
> Hi,
>
> On Mon, 12 Feb 2007 18:36:23 -0500, Jeff G wrote:
> > I can't seem to set the background color of a label widget in a
> > notebook widget (not the page identifier)
> > window1
> >    vbox1
> >      notebook1
> [...]
> >
> > I'm trying to make the entire notebook have a background color.
> > setting window1 background works directly on linux
> >     window.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('#4A85DD'))
> > on scratchbox had to add similar line for notebook1
> >     nbook.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('#4A85DD'))
> > but can't seem to do it under the 770 implementation
>
> Err. I hope you only wrote "modify_bg" as a simplification and don't actually have that in code. Colors are a theme issue.
>
> If you just want to make the user able to recolor your widget, give it a name(gtk_widget_set_name("foobar")).
>
> Then as user / theme author in "~/.gtkrc-2.0" / your theme do:
>
> style "foo" {
>         bg[NORMAL] = { 0.5, 0.5, 0.7 }
>         base[NORMAL] = { 0.0, 0.0, 0.0 }
> }
>
> widget "foobar" style "foo"
>
> If, on the other hand, you draw your own widget:
> http://traveller.cvs.sourceforge.net/traveller/tpanel/gtaskitem.py?view=markup
>
> This also makes it a lot easier to test when what change works where :-)
>
> > if this is way off topic, sorry, and please redirect me to proper list.
>
> Seems on-topic to me, however I don't have an answer to your particular question. Maybe create an eventbox, theme that and add your notebook in it? Should be able to find out by hacking a bit...
>
> cheers,
>   Danny
>
> _______________________________________________
> maemo-users mailing list
> maemo-users at maemo.org
> https://maemo.org/mailman/listinfo/maemo-users
>

Perhaps I'm not thinking about it enough, but I want to create a
purpose-built environment, not a general purpose app.  Therefore, I
really DO want to set the colors, etc, myself.  However, perhaps your
method allows me to easily change it after the app is built, and is a
much more general approach.

Nonetheless, from my reading of the widget documentation, a "label" is
not supposed to have it's own background -- rather it should be
transparent.  I'm not sure which component is causing the background
to take over my setting.

I wonder if the Hildon environment is causing the "problem" -- but
then again, why is it working differntly under the scratchbox (in
native PC mode)?

Thanks for any help on this.

Jeff



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Big List of Linux Books]    

  Powered by Linux