Xfce Forum

Sub domains
 

You are not logged in.

#1 2015-11-22 05:10:58

infinite
Member
Registered: 2015-11-03
Posts: 91

[Solved] Xfce 4.8 = theme : location file unknow

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 ?? hmm

Edit : Excuse my terrible english .

Last edited by infinite (2015-11-22 05:13:03)

Offline

#2 2015-11-23 03:40:55

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: [Solved] Xfce 4.8 = theme : location file unknow

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

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2015-11-26 10:58:45

infinite
Member
Registered: 2015-11-03
Posts: 91

Re: [Solved] Xfce 4.8 = theme : location file unknow

dead-code@Machine:~$ xfconf-query -c xfwm4 -p /general/theme
Wallis
dead-code@Machine:~$ 

Offline

#4 2015-11-26 14:47:32

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: [Solved] Xfce 4.8 = theme : location file unknow

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.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2015-11-27 06:57:32

infinite
Member
Registered: 2015-11-03
Posts: 91

Re: [Solved] Xfce 4.8 = theme : location file unknow

ToZ wrote:

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

#6 2015-11-27 19:18:40

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: [Solved] Xfce 4.8 = theme : location file unknow

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.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2015-11-29 14:31:42

infinite
Member
Registered: 2015-11-03
Posts: 91

Re: [Solved] Xfce 4.8 = theme : location file unknow

ToZ wrote:

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

#8 2015-11-29 19:04:10

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: [Solved] Xfce 4.8 = theme : location file unknow

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).


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#9 2015-12-01 15:50:56

infinite
Member
Registered: 2015-11-03
Posts: 91

Re: [Solved] Xfce 4.8 = theme : location file unknow

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 ? smile

==============

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

#10 2015-12-01 23:09:20

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: [Solved] Xfce 4.8 = theme : location file unknow

infinite wrote:
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 ? smile

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)


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#11 2015-12-02 10:36:01

infinite
Member
Registered: 2015-11-03
Posts: 91

Re: [Solved] Xfce 4.8 = theme : location file unknow

Thanks for link me smile , 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

#12 2015-12-02 11:17:20

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: [Solved] Xfce 4.8 = theme : location file unknow

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.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#13 2015-12-03 15:33:53

infinite
Member
Registered: 2015-11-03
Posts: 91

Re: [Solved] Xfce 4.8 = theme : location file unknow

ToZ wrote:
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 .

ToZ wrote:

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

#14 2015-12-03 16:21:48

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: [Solved] Xfce 4.8 = theme : location file unknow

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).

infinite wrote:

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.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#15 2015-12-03 18:25:45

infinite
Member
Registered: 2015-11-03
Posts: 91

Re: [Solved] Xfce 4.8 = theme : location file unknow

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 =

ToZ wrote:

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.

====================================

ToZ wrote:

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 .

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 ...

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 .

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 .

Last edited by infinite (2015-12-03 18:45:36)

Offline

#16 2015-12-03 19:15:41

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: [Solved] Xfce 4.8 = theme : location file unknow

infinite wrote:
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:

infinite wrote:

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.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#17 2015-12-08 12:21:09

infinite
Member
Registered: 2015-11-03
Posts: 91

Re: [Solved] Xfce 4.8 = theme : location file unknow

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 sad

Offline

#18 2015-12-08 13:43:44

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: [Solved] Xfce 4.8 = theme : location file unknow

infinite wrote:

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 sad

"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.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#19 2015-12-09 19:35:25

infinite
Member
Registered: 2015-11-03
Posts: 91

Re: [Solved] Xfce 4.8 = theme : location file unknow

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

#20 2015-12-09 20:42:37

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: [Solved] Xfce 4.8 = theme : location file unknow

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.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#21 2015-12-11 01:42:21

infinite
Member
Registered: 2015-11-03
Posts: 91

Re: [Solved] Xfce 4.8 = theme : location file unknow

ToZ wrote:

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 smile

Offline

Board footer

Powered by FluxBB