![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#21 |
|
Extra Foam Sugar Free Ubuntu
![]() Join Date: Oct 2007
Beans: 832
Ubuntu 9.04 Jaunty Jackalope
|
Re: HOWTO: Change colors of wine applications
do I copy this into a file and then run it? Can you pls explain this a little more detailed for the novice.
Thanks in advance... |
|
|
|
|
|
#22 | ||
|
Way Too Much Ubuntu
![]() Join Date: Apr 2005
Location: C A N A DA
Beans: 291
Ubuntu 8.10 Intrepid Ibex
|
Re: HOWTO: Change colors of wine applications
Quote:
Quote:
copy and paste the code provided in a new document.. like getcolors.py for example. then in a shell simply type: python getcolors.py it'll spit out the colors you can copy and paste in your user.reg file as described in the first post. Good luck!
__________________
Running: Ubuntu 9.04 & Windows 7 RC Registered Linux User #373810 Become a Registered Linux User Here. |
||
|
|
|
|
|
#23 |
|
Gee! These Aren't Roasted!
![]() Join Date: Jun 2005
Beans: 187
|
Re: HOWTO: Change colors of wine applications
A bit more tweaking.... the mappings still arnt correct but its closer
Code:
#!/usr/bin/env python
import pygtk
import gtk
def format_color_string( Color ):
return "%s %s %s" % (Color.red /256, Color.green/256, Color.blue/256)
def format_color_key( key, Color):
return "\"%s\"=\"%s\"\n" % (key, format_color_string( Color ))
invisible1 = gtk.Invisible()
style1 = invisible1.style
button1 = gtk.Button()
buttonstyle = button1.style
scroll1 = gtk.VScrollbar()
scrollbarstyle = scroll1.style
menu1 = gtk.Menu()
menuitem1 = gtk.MenuItem()
menu1.add(menuitem1)
menustyle = menuitem1.style
user_reg = """WINE REGISTRY Version 2
;; All keys relative to \\User\\S-1-5-4
[Control Panel\\\\Colors]
"""
# http://www.moeraki.com/pygtkreference/pygtk2reference/class-gtkstyle.html
# http://lists.ximian.com/pipermail/mono-winforms-list/2003-August/000469.html
user_reg += format_color_key('Scrollbar', scrollbarstyle.bg[gtk.STATE_NORMAL])
user_reg += format_color_key('Background', style1.bg[gtk.STATE_NORMAL])
user_reg += format_color_key('ActiveTitle', menustyle.bg[gtk.STATE_PRELIGHT])
user_reg += format_color_key('InactiveTitle', menustyle.bg[gtk.STATE_PRELIGHT])
user_reg += format_color_key('Menu', menustyle.bg[gtk.STATE_NORMAL])
user_reg += format_color_key('Window', style1.bg[gtk.STATE_NORMAL])
user_reg += format_color_key('WindowFrame', style1.fg[gtk.STATE_INSENSITIVE])
user_reg += format_color_key('MenuText', style1.fg[gtk.STATE_NORMAL])
user_reg += format_color_key('WindowText', style1.fg[gtk.STATE_NORMAL])
user_reg += format_color_key('TitleText', style1.fg[gtk.STATE_NORMAL])
user_reg += format_color_key('ActiveBorder', menustyle.bg[gtk.STATE_PRELIGHT])
user_reg += format_color_key('InactiveBorder', menustyle.bg[gtk.STATE_NORMAL])
user_reg += format_color_key('AppWorkSpace', style1.bg[gtk.STATE_NORMAL])
user_reg += format_color_key('Hilight', menustyle.bg[gtk.STATE_PRELIGHT])
user_reg += format_color_key('HilightText', style1.bg[gtk.STATE_PRELIGHT])
user_reg += format_color_key('ButtonFace', style1.bg[gtk.STATE_NORMAL])
user_reg += format_color_key('ButtonShadow', style1.bg[gtk.STATE_INSENSITIVE])
user_reg += format_color_key('GrayText', style1.fg[gtk.STATE_INSENSITIVE])
user_reg += format_color_key('ButtonText', style1.fg[gtk.STATE_NORMAL])
user_reg += format_color_key('InactiveTitleText', style1.fg[gtk.STATE_INSENSITIVE])
user_reg += format_color_key('ButtonHilight', style1.bg[gtk.STATE_NORMAL])
user_reg += format_color_key('ButtonShadow', style1.fg[gtk.STATE_NORMAL])
user_reg += format_color_key('ButtonLight', style1.fg[gtk.STATE_NORMAL])
user_reg += format_color_key('InfoText', style1.fg[gtk.STATE_NORMAL])
user_reg += format_color_key('InfoWindow', style1.fg[gtk.STATE_NORMAL])
user_reg += format_color_key('ButtonAlternateFace', style1.bg[gtk.STATE_NORMAL])
user_reg += format_color_key('ButtonHilight', style1.bg[gtk.STATE_NORMAL])
user_reg += format_color_key('GradientActiveTitle', style1.bg[gtk.STATE_NORMAL])
user_reg += format_color_key('GradientInactiveTitle', style1.bg[gtk.STATE_NORMAL])
user_reg += format_color_key('MenuHilight', menustyle.bg[gtk.STATE_NORMAL])
print user_reg
|
|
|
|
|
|
#24 |
|
Gee! These Aren't Roasted!
![]() Join Date: Sep 2007
Beans: 159
Ubuntu 9.10 Karmic Koala
|
Re: HOWTO: Change colors of wine applications
Thanks! But I think its too bright
|
|
|
|
|
|
#25 |
|
5 Cups of Ubuntu
![]() Join Date: Dec 2007
Beans: 19
|
Re: HOWTO: Change colors of wine applications
Thanks, that looks a lot better.
My menu text (Ubuntu 7.10) is still grey instead of black, is there any way to fix that? |
|
|
|
|
|
#26 |
|
Dipped in Ubuntu
![]() Join Date: Sep 2006
Beans: 537
Ubuntu 8.04 Hardy Heron
|
Re: HOWTO: Change colors of wine applications
__________________
Loving Ubuntu every step of the way. |
|
|
|
|
|
#27 | |
|
A Carafe of Ubuntu
![]() Join Date: Jan 2007
Location: Florida
Beans: 128
Ubuntu 8.04 Hardy Heron
|
Re: HOWTO: Change colors of wine applications
Quote:
__________________
Lee | http://leeunderwood.org/ "Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened." - Sir Winston Churchill |
|
|
|
|
|
|
#28 | |
|
5 Cups of Ubuntu
![]() |
Quote:
...however... its way slower and eats a ton of your cpu usuage just by for example selecting another tab.
__________________
Assumption is the mother of all f*ckups. |
|
|
|
|
|
|
#29 | |
|
100% Pure Ubuntu
![]() Join Date: Feb 2007
Location: New York
Beans: 852
Ubuntu 9.10 Karmic Koala
|
Re: HOWTO: Change colors of wine applications
Quote:
I fixed some mappings and got it working so that it does everything automatically now; reads the color codes from various places, creates a .reg file, and then imports that into the Wine registry. So you just run the script once after changing themes and it updates. Although some of your choices looked better than nothing, and work pretty well on some themes, they don't work on all, so I've disabled them for now so we can find the real settings. It's a lot harder than I expected to get the correct colors that the system is currently using:
tooltips1 = gtk.Tooltips() ? 'gtk.Tooltips' object has no attribute 'style'
If anyone can help with this, it would be very appreciated. Also, it took me a while (and tweaking in actual Windows) to figure out what all the Wine registry values do. Some are obvious, but others are not. I still don't know what ButtonAlternateFace does. (As far as I can tell, "ButtonAlternativeFace" is just a typo of "ButtonAlternateFace".) I wish there were more documentation for this, but I'll post what I've found somewhere so that others don't have to reverse-engineer it again like I did. I also want to look into importing font faces, sizes, and widget sizes as well. I'm sure some of these would be a further improvement, while others would just make Wine look stupid. Attached is the script Edit: Latest version is on Launchpad: http://bazaar.launchpad.net/~endolit...-scraper/files
__________________
"Please remember to do things the Ubuntu way. There is always more than one solution to a problem, choose the one you think will be the easiest for the user. ... Try to think as a green user and choose the simplest solution." — Code of Conduct Last edited by Endolith; October 21st, 2008 at 04:46 PM.. Reason: latest version is on Launchpad |
|
|
|
|
|
|
#30 |
|
100% Pure Ubuntu
![]() Join Date: Feb 2007
Location: New York
Beans: 852
Ubuntu 9.10 Karmic Koala
|
Re: HOWTO: Change colors of wine applications
The spreadsheet of Wine color names is too big to upload here, but I created a page explaining them all anyway:
http://www.endolith.com/wordpress/20...3/wine-colors/
__________________
"Please remember to do things the Ubuntu way. There is always more than one solution to a problem, choose the one you think will be the easiest for the user. ... Try to think as a green user and choose the simplest solution." — Code of Conduct |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|