How to Make Wine Apps Match Your GTK ThemeBy Shaon, Gaea News Network
Wednesday, November 3, 2010
I always believed that the concept of Wine somewhat defeats the purpose of a Linux as an open source operating system. But anyways there is really no doubt that it is an incredible piece of software. But yes the Wine in its native form is somewhat of a highly dated look with the Windows 95 like theme and all. A highly popular Linux distribution Ubuntu went all out to make Wine match their Human theme. But on the down side the tabs are just plain squares and frankly boring. But there are many ways to to do just that and do it in a step by step process by fiddling with the registry. We ill discuss not one but two methods to do just that. It is to be noted that method 2 is far more customizable and does not limit the customization to a single theme.
The simplest way to get the theme running on Wine would be using a registry change. You should grab the Wine 0.9.46 to go ahead with the theme.
First of all get the above color scheme by copying and pasting the following code into your respective ~/.wine/user.reg file. The theme may be found here
“ActiveBorder”=”239 235 231″
“ActiveTitle”=”210 141 70″
“AppWorkSpace”=”177 170 163″
“Background”=”0 0 0″
“ButtonAlternateFace”=”181 181 181″
“ButtonDkShadow”=”115 106 96″
“ButtonFace”=”239 235 231″
“ButtonHilight”=”253 250 248″
“ButtonLight”=”239 235 231″
“ButtonShadow”=”179 175 171″
“ButtonText”=”0 0 0″
“GrayText”=”179 175 171″
“Hilight”=”248 206 140″
“HilightText”=”0 0 0″
“InactiveBorder”=”239 235 231″
“InactiveTitle”=”239 235 231″
“InactiveTitleText”=”60 60 59″
“InfoText”=”0 0 0″
“InfoWindow”=”239 235 231″
“Menu”=”239 235 231″
“MenuBar”=”239 235 231″
“MenuHilight”=”248 245 242″
“MenuText”=”0 0 0″
“Scrollbar”=”203 193 183″
“TitleText”=”255 255 255″
“Window”=”255 255 255″
“WindowFrame”=”0 0 0″
“WindowText”=”0 0 0″
But the problem with this method is that it would render most of the Wine versions dreadfully slow and unusable for most purposes. The woeful fonts may be then solved by downloading and installing msttcorefonts (It will install the fonts throughout the system and Firefox as well). You can try mix and matching with other themes such as the Clearlooks theme but be aware that a software installation that might have taken 5 minutes to shoot way past the hour mark. It reports a considerable boost with the 1.1.4 version of Wine. The reason I am detailing the procedure because it is essential to know how to do things the hard way first.
First off download the script . This method would work for most of the themes available in the market today. The methodology behind this script is that it trie to scrape colors from the GTK engine. The GTK engine is free and the colors may be used any way whatsoever. The Winecfg font may be ideal for usage with Ubuntu. The author of the script says in his blog
To really do it correctly, I guess I would have to make separate color mappings for each GTK engine. That doesn’t sound like fun…
Clear looks themes now will work perfectly without any hitch on rhis Pyrhon 2.0 script as it seems. Further support for Ubuntu Studio’s theme is provided.
The Darklooks theme has an issue however as certain GTk windows would look great on the Wine window but as of now full support is not guaranteed. Since the GTK title bar of the theme is locked somehow. .
Immedeate success may not be guaranteed with the script but the key is in finding the color values in the Windows/Wine registry. For Windows registries, “name”=”data” pairs are called “values”. Read more about this section in Wikipedia .
There are 31 color values in Windows Xp and Wine. The names however are different in the Winecfg configuration dialog. One theoretical way of achieving the codes of the color is by using the CSS2 system colors. The scheme would directly map to a number of Windows color. But on the downside they don’t really translate well on screen.
Wine/Windows registry Wine Configuration Item CSS2
ActiveBorder Active Border ActiveBorder
ActiveTitle Active Title Bar ActiveCaption
AppWorkSpace Application Workspace AppWorkspace
Background Desktop Background
ButtonAlternateFace Controls Alternate Background
ButtonDkShadow Controls Dark Shadow
ButtonFace Controls Background ButtonFace
ButtonHilight Controls Highlight ButtonHighlight
ButtonLight Controls Light
ButtonShadow Controls Shadow ButtonShadow
ButtonText Controls Text ButtonText
GradientActiveTitle Active Title Bar Gradient
GradientInactiveTitle Inactive Title Bar Gradient
GrayText Gray Text GrayText
Hilight Selection Background Highlight
HilightText Selection Text HighlightText
HotTrackingColor Hot Tracked Item
InactiveBorder Inactive Border InactiveBorder
InactiveTitle Inactive Title Bar InactiveCaption
InactiveTitleText Inactive Title Text InactiveCaptionText
InfoText ToolTip Text InfoText
InfoWindow ToolTip Background InfoBackground
Menu Menu Background Menu
MenuBar Menu Bar
MenuHilight Menu Highlight
MenuText Menu Text MenuText
Scrollbar Scrollbar Scrollbar
TitleText Active Title Text CaptionText
Window Window Background Window
WindowFrame Window Frame WindowFrame
WindowText Window Text WindowText
Furthermore CSS3 has deprecated the values and replace it by the appearance property. There is another configuration in Wine called the ‘Message Box Text’ but its value is unchangable. But the catch is that in Wine/Windows only some of the above color appears for specific configuration.
Now in order to display menus in 3D as oppossed to the standard flat ones some more brainstorming would be required. The procedure is relatively simple with setting it by flipping one of the bits in the UserPreferencesMask value in [HKEY_CURRENT_USERControl PanelDesktop]. A few tips in mind to do this are
* Menu Background for menus, also background for menu bars in 3D mode
* MenuBar Background for menu bars. Not seen with default 3D menus
* MenuHilight Selected item background Highlight for flat menus. Not seen in default 3D menu mode; Hilight is used for this, instead.
* MenuText Menu text
* Hilight Background of selected text, background of selected menu item in 3D menu mode
* HilightText Selected text
* HotTrackingColor Hover color for single-click navigation
* InfoText Tooltip text
* InfoWindow Tooltip background
* AppWorkSpace Background color of multiple-document interface
* Background Background color of the Windows desktop
* Window Background color of notepad,
*Scroll bar-Background of scrollbar.
This is found in only a few applications, Firefox will definitely support it but the same can not be said for Internet Explorer, MS Word and the Notepad.
The Scrollbar would be colored as any 3D button but the background is gray in most apps. Another interesting aspect of this method is that the bottom right corner of the Notepad between the scrollbar changes but the scrollbars are not. No suitable explanation was found of this anomaly. It would be appreciated if the readers could leave some comments about their experience with the issue. What method are you using?
Tags: Linux, Notepad, Open Source, Ubuntu, wine