You are not logged in.
Pages: 1
Hello ,
I'm trying since a long time to modify the theme :
/usr/share/themes/Xfce-basic
Question is : Where does the color of the title background color by default , come from ??
Under next , the file "gtkrc" at :
/usr/share/themes/Xfce-basic/gtk-2.0
style "default"
{
GtkButton::default_border = {0, 0, 0, 0}
GtkButton::default_outside_border = {0, 0, 0, 0}
GtkButton::default_spacing = 8
GtkButton::focus-line-width = 1
GtkButton::focus-padding = 2
GtkMenuBar::shadow_type = out
GtkPaned::handle_full_size = 1
GtkToolbar::shadow_type = out
GtkWidget::interior_focus = 1
GtkRange::slider_width = 14
GtkRange::stepper_size = 14
GtkRange::stepper_spacing = 0
GtkRange::trough_border = 0
engine "xfce"
{
smooth_edge = true
grip_style = none
boxfill
{
fill_style = plain
}
}
}
widget_class "*" style "default"
style "button" = "default"
{
xthickness = 2
ythickness = 2
engine "xfce"
{
smooth_edge = true
grip_style = none
boxfill
{
fill_style = gradient
orientation = vertical
shade_start = 1.10
shade_end = 1.00
}
}
}
widget_class "*Button*" style "button"
class "*Button*" style "button"
# This is for ROX-Filer
#
style "rox" = "default"
{
bg[NORMAL] = "#ffffff"
bg[ACTIVE] = "#ffffff"
}
widget_class "*Collection" style "rox"
style "scrollbar" = "default"
{
xthickness = 2
ythickness = 2
engine "xfce"
{
smooth_edge = true
grip_style = none
boxfill
{
fill_style = plain
}
}
}
widget_class "*Scrollbar*" style "scrollbar"
class "*Scrollbar*" style "scrollbar"
widget_class "*GtkScale*" style "scrollbar"
class "*GtkScale*" style "scrollbar"
================
Useful informations :
window manager : xfwm4
Gtk :
$ dpkg -l | grep libgtk
ii libgtk-3-0 3.4.2-0ubuntu0.8 GTK+ graphical user interface library
ii libgtk-3-bin 3.4.2-0ubuntu0.8 programs for the GTK+ graphical user interface library
ii libgtk-3-common 3.4.2-0ubuntu0.8 common files for the GTK+ graphical user interface library
ii libgtk2.0-0 2.24.10-0ubuntu6.2 GTK+ graphical user interface library
ii libgtk2.0-bin 2.24.10-0ubuntu6.2 programs for the GTK+ graphical user interface library
ii libgtk2.0-common 2.24.10-0ubuntu6.2 common files for the GTK+ graphical user interface library
$
OS :
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.4 LTS"
$
============
What "Default" in "gtkrc" , can be ??
I found a theme who has the same name , at :
/usr/share/themes/Default
which contain :
balou gtk-2.0-key gtk-3.0 xfce-notify-4.0 xfwm4
and in "xfwm4" , there is the ".xpm" files .
But in those "title-active.xpm" from 1 to 5 : The color which correspond of the title background color by default , does'nt appear !
That the cause of my question , where does this color , come from ??
Here .. any idea ??
Edit : Excuse my terrible english .
Last edited by infinite (2015-11-22 05:13:03)
Offline
Question is : Where does the color of the title background color by default , come from ??
Should come from the xfwm4 theme. What do you have set as your Window Manager theme? Or:
xfconf-query -c xfwm4 -p /general/theme
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
dead-code@Machine:~$ xfconf-query -c xfwm4 -p /general/theme
Wallis
dead-code@Machine:~$
Offline
The Window Manager theme that you are using is called "Wallis". You need to edit the files in Wallis' xfwm4 folder to make changes to any of the window decorations such as the title background colour.
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
The Window Manager theme that you are using is called "Wallis". You need to edit the files in Wallis' xfwm4 folder to make changes to any of the window decorations such as the title background colour.
Yes i have selected "Wallis" as the xfwm4 theme and in the same time ( they work together ) : "Xfce-basic" .
They are both in the same location :
/usr/share/themes
I can access to "Wallis" in : Menu>Parameters>Window Manager
I can access to "Xfce-basic" in : Menu>Parameters>Apparence
But i still don't know where the title background color for "Xfce-basic" come from .
For exemple , if i delete all themes exept "Xfce-basic" , the question is still available .
Offline
In case you haven't already come across it, this page describes how xfwm4 themes work.
If you look at the title-3-active.xpm file in /usr/share/themes/Wallis/xfwm4/, you'll see information about the colour codes being used to create this element. In a nutshell, each character (.+@$#) corresponds to a colour. xfwm4 also supports gtk colour pickup. For example:
"# c #C0C0FF s active_color_1"
...the # symbol refers to the "active_colour_1" gtk pickup (the #C0C0FF is ignored in this case because of the gtk pickup information following it) which, if you reference the link above, translates to the "bg[selected]" gtk element. If you look at the gtk theme's (in your case Xfce-basic) information in /usr/share/theme/Xfce-basic/gtk-2.0/gtkrc, you'll find that "bg[selected]" translates to:
bg[SELECTED] = "#4b6983"
...so therefore, the colour #4b6983 is used. If you change that line to read:
bg[SELECTED] = "#ff0000"
...and re-load the Appearance theme by selecting another and coming back to it, you'll notice that the window title background will change to red as well.
Keep in mind that when you change colours like this, you are changing the colour for gtk widgets as well (which may or may not be want you want). If you want to change just the window background title background colour but not the gtk widget, edit all of the related /usr/share/themes/Wallis/xfwm4/title*.xpm files and remove the gtk pickup part and leave only the colour. So for example, this:
"# c #C0C0FF s active_color_1",
...would change to this:
"# c #FF0000",
..and reload the xfwm4 theme for the colour change to take effect.
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
If you look at the gtk theme's (in your case Xfce-basic) information in /usr/share/theme/Xfce-basic/gtk-2.0/gtkrc, you'll find that "bg[selected]" translates to:
bg[SELECTED] = "#4b6983"
...so therefore, the colour #4b6983 is used.
This line doesn't appear in my file . Please look at my post #1 .
Last edited by infinite (2015-11-29 14:33:35)
Offline
If no colour mappings are specified, then the default built-in GTK2 colours are used. The built-in GTK2 theme is Raleigh.
(Your distro may also specify a default gtk2 theme/settings - look at /usr/share/gtk-2.0/gtkrc).
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
If no colour mappings are specified, then the default built-in GTK2 colours are used. The built-in GTK2 theme is Raleigh.
(Your distro may also specify a default gtk2 theme/settings - look at /usr/share/gtk-2.0/gtkrc).
First , Thank you ;
How do you know that ? Can you link me your source ?
==============
Well , for "Raleigh" here the content of :=
/usr/share/themes/Raleigh/gtk-2.0/gtkrc
#
# This theme is the default theme if no other theme is selected.
#
Next , i might print the output of "ls" , but "find" is more precise and shorter . If you prefer i can also use "ls" .
dead-code@Machine:~$ sudo find /usr/share -iname 'gtk-2.0'
/usr/share/pyshared/gtk-2.0
/usr/share/themes/Xfce-4.4/gtk-2.0
/usr/share/themes/Xfce-orange/gtk-2.0
/usr/share/themes/Xfce-winter/gtk-2.0
/usr/share/themes/Xfce-saltlake/gtk-2.0
/usr/share/themes/Xfce/gtk-2.0
/usr/share/themes/Xfce-dawn/gtk-2.0
/usr/share/themes/Xfce-4.2/gtk-2.0
/usr/share/themes/Xfce-b5/gtk-2.0
/usr/share/themes/Xfce-4.6/gtk-2.0
/usr/share/themes/Xfce-dusk/gtk-2.0
/usr/share/themes/Xfce-kde2/gtk-2.0
/usr/share/themes/Xfce-redmondxp/gtk-2.0
/usr/share/themes/Xfce-stellar/gtk-2.0
/usr/share/themes/Raleigh/gtk-2.0
/usr/share/themes/Xfce-basic/gtk-2.0
/usr/share/themes/Xfce-curve/gtk-2.0
/usr/share/themes/Xfce-4.0/gtk-2.0
/usr/share/themes/Xfce-kolors/gtk-2.0
/usr/share/themes/Xfce-cadmium/gtk-2.0
/usr/share/themes/Xfce-smooth/gtk-2.0
/usr/share/themes/Xfce-light/gtk-2.0
dead-code@Machine:~$
As you can see : "/usr/share/gtk-2.0" = doesn't exist .
Last edited by infinite (2015-12-01 15:52:58)
Offline
ToZ wrote:If no colour mappings are specified, then the default built-in GTK2 colours are used. The built-in GTK2 theme is Raleigh.
(Your distro may also specify a default gtk2 theme/settings - look at /usr/share/gtk-2.0/gtkrc).First , Thank you ;
How do you know that ? Can you link me your source ?
Can't remember the exact source where I first read about it, but there is some information in the Arch GTK+ Wiki. By built-in, my understanding is that its hard-coded in the gtk source.
As you can see : "/usr/share/gtk-2.0" = doesn't exist
Perhaps your distro doesn't ship with one. Its optional.
EDIT: I think I found the source in the GTK code where it specifies the default built-in colours. Look at lines 328 - 350 in gtkstyle.c. They seem to correspond to the Raleigh colour palette.
Last edited by ToZ (2015-12-02 02:09:45)
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thanks for link me , i'm gonna read it , it can be useful ..
------------------
Again , this destination file doesn't exist : "root/gtk/gtkstyle.c"
root@Machine:/root# ls -a
. .bashrc .config .gtk-bookmarks .local
.. .cache .gstreamer-0.10 .gvfs .profile
root@Machine:/root#
root@Machine:/root# sudo find / -iname 'gtkstyle.c'
root@Machine:/root#
Offline
Again , this destination file doesn't exist : "root/gtk/gtkstyle.c"
It won't exist on your system - its part of the source code that gets compiled into the gtk2 libraries.
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
infinite wrote:Again , this destination file doesn't exist : "root/gtk/gtkstyle.c"
It won't exist on your system - its part of the source code that gets compiled into the gtk2 libraries.
Thanks .
EDIT: I think I found the source in the GTK code where it specifies the default built-in colours. Look at lines 328 - 350 in gtkstyle.c. They seem to correspond to the Raleigh colour palette.
I'm not sure that i understand your point .
Because , on the contrairy , the content of :
/usr/share/themes/Raleigh/gtk-2.0/gtkrc
which is :
#
# This theme is the default theme if no other theme is selected.
#
Is not Valid , because i've alreday selected the "Wallis" theme .
Offline
We've kind of been discussing a couple of related issues. From what I understand, you are trying to determine where the background colour of the Window Manager theme's (Wallis) titlebar is coming from.
First, just to make sure we are on the same page, there are two types of themes in Xfce; Appearance (GTK) themes and Window Manager (xfwm4) themes. To add to this, you can specify in xfwm4 themes to use colours from the active GTK (Appearance) theme (an option to bring some similarity between the two).
GTK themes are hierarchical, starting from the built-in theme and style information layered on. See the priority section in this document. What this means is that if you don't specify a GTK theme, if you have no overrides and your distro has no set defaults, the default Raleigh colours (built-in hard-coded) will be used. Theme style information can be found in a number of locations. We have been talking about the gtk-2.0 folder in the themes located at /usr/share/theme.
xfwm4 themes will be defined in the /usr/share/theme/xfwm4 folder. Each graphic element of the window manager theme is represented by xpm files. These xpm files can contain gtk colour pickup codes - these can be used to include elements of the GTK theme in xfwm4 themes.
In your case above:
- Appearance(GTK) theme = Xfce-basic
- Window manager (xfwm4) theme = Wallis
1. The Wallis theme xpm files include GTK colour pickup codes. This means that for certain elements (including title background) it will use the GTK theme's (Xfce-basic) colour definitions.
2. If the GTK theme's colour definitions are removed (or if you specify no theme at all), GTK will go up the priority chain to find the appropriate colour definitions. The highest level of this chain are the built-in hard-coded colours (which are the Raleigh theme colours).
3. To change the colour of the title background, you have options:
- Edit the Wallis xpm files, remove the gtk colour code pickup statements and change the actual colour definition code.
- Leave the GTK colour pickup codes in the xpm files and instead change the GTK colour definitions by either editing/adding them to the Xfce-basic/gtk-2.0/gtkrc file or use one of the override files (e.g. ~/.gtkrc-2.0).
Because , on the contrairy , the content of :
/usr/share/themes/Raleigh/gtk-2.0/gtkrc
which is :
# # This theme is the default theme if no other theme is selected. #
Since the Raleigh colours are hard-coded into the GTK libraries, there is no need to specify them here. If this file is empty, it will go up the chain and use the built-in hard-coded same Raleigh colours.
I hope I'm understanding your questions correctly.
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
From what I understand, you are trying to determine where the background colour of the Window Manager theme's (Wallis) titlebar is coming from.
Not exactly , you said it yourself =
In your case above:
- Appearance(GTK) theme = Xfce-basic
- Window manager (xfwm4) theme = Wallis
1. The Wallis theme xpm files include GTK colour pickup codes. This means that for certain elements (including title background) it will use the GTK theme's (Xfce-basic) colour definitions.
====================================
First, just to make sure we are on the same page, there are two types of themes in Xfce; Appearance (GTK) themes and Window Manager (xfwm4) themes.
Yes , i agree .
To add to this, you can specify in xfwm4 themes to use colours from the active GTK (Appearance) theme (an option to bring some similarity between the two).
I'm not sure i understand you ...
GTK themes are hierarchical, starting from the built-in theme and style information layered on. See the priority section in this document. What this means is that if you don't specify a GTK theme, if you have no overrides and your distro has no set defaults, the default Raleigh colours (built-in hard-coded) will be used. Theme style information can be found in a number of locations. We have been talking about the gtk-2.0 folder in the themes located at /usr/share/theme.
Thanks , i'm gonna increase that .
These xpm files can contain gtk colour pickup codes - these can be used to include elements of the GTK theme in xfwm4 themes.
I didn't knew that .
Last edited by infinite (2015-12-03 18:45:36)
Offline
ToZ wrote:From what I understand, you are trying to determine where the background colour of the Window Manager theme's (Wallis) titlebar is coming from.
Not exactly , you said it yourself =
If my understanding is incorrect, please correct me. Everything I've been talking about is showing you how the titlebar background colour is determined. Based on your first post:
Question is : Where does the color of the title background color by default , come from ??
.
ToZ wrote:To add to this, you can specify in xfwm4 themes to use colours from the active GTK (Appearance) theme (an option to bring some similarity between the two).
I'm not sure i understand you ...
Re-read this and this. In a nutshell:
"+ c #FFFFFF",
...means that for every '+' character in the xpm file, use a pixel of colour #FFFFFF (white). While:
"+ c #FFFFFF s active_hilight_2",
...mean that for every '+' character in the xpm file, use a pixel of colour active_hilight_2 GTK pickup. This translates to the GTK theme's "light[normal]" colour. If the theme doesn't specify a colour code for this value, then gtk uses the priority method to work up the chain. The top-level of the chain is hard-coded values (Raleigh colours) - so some colour will always be returned. This is the colour that is used.
ToZ wrote:GTK themes are hierarchical, starting from the built-in theme and style information layered on. See the priority section in this document. What this means is that if you don't specify a GTK theme, if you have no overrides and your distro has no set defaults, the default Raleigh colours (built-in hard-coded) will be used. Theme style information can be found in a number of locations. We have been talking about the gtk-2.0 folder in the themes located at /usr/share/theme.
Thanks , i'm gonna increase that .
There is really nothing here to increase - its just the way it works.
Toz wrote:These xpm files can contain gtk colour pickup codes - these can be used to include elements of the GTK theme in xfwm4 themes.
I didn't knew that .
As explained above.
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
I had read and re-read carefully the topic ..
So "Wallis" use Xfce-basic" colors , but because no title background color appear in this last theme location , gtk use the Raleigh gtk's hard coded theme .
Now , gtk use the Raleigh theme for this value :
active_color_1 bg[selected] Background color for active title
which is "hard-coded" in this filehttps://git.gnome.org/browse/gtk+/tree/ … ?h=gtk-2-8
Am i right ?
If so , i still don't know where is the color used for the title-background-color in this last file
Offline
I had read and re-read carefully the topic ..
So "Wallis" use Xfce-basic" colors , but because no title background color appear in this last theme location , gtk use the Raleigh gtk's hard coded theme .
Now , gtk use the Raleigh theme for this value :active_color_1 bg[selected] Background color for active title
which is "hard-coded" in this filehttps://git.gnome.org/browse/gtk+/tree/ … ?h=gtk-2-8
Am i right ?
Yes, this is how I understand it and this is how it works on my system.
If so , i still don't know where is the color used for the title-background-color in this last file
"active_color_1" uses "bg[selected]".
Line #347:
static const GdkColor gtk_default_selected_bg = { 0, GTK_BLUE };
..."GTK_BLUE" defined in line #332:
#define GTK_BLUE 0x4b4b, 0x6969, 0x8383
...defining RGB value of #4b6983.
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thanks a lot !! @ToZ
Edit: Finally, "xfwm4" is too hard to handle for a xfce4 beginner , there is too much possibilities .
Last edited by infinite (2015-12-09 19:36:15)
Offline
No worries. Theme design is a bit of a complicated beast. My kudos to those who design them.
You can make xfwm4 themes easier to design and manage by not using the gtk pickups and defining the colours themselves.
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
You can make xfwm4 themes easier to design and manage by not using the gtk pickups and defining the colours themselves.
Sure , that what i'm doing now
Offline
Pages: 1
[ Generated in 0.015 seconds, 7 queries executed - Memory usage: 694.99 KiB (Peak: 743.84 KiB) ]