gtkrc file: how to define tab background color? [SOLVED]

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

gtkrc file: how to define tab background color? [SOLVED]

#1 Post by Argolance »

Hello,
Does anybody knows, inside a "gtkrc" gtk theme file, where tab background color can be defined (to suit with other defined colors). Below, for example, pnethood, which contains tabs and shows them... Grey.
Most of colors seem to be set in this part of the gtkrc configuration file but all I tried to do has no effect on. Is a special line missing? Or is this color defined anywhere else?
font_name = "DejaVu Sans 12"
fg[NORMAL] = "#000000" #Foreground text of nearly all widgets (not editor text)
fg[PRELIGHT] = "#000000" #Foreground text as you mouse-over something
fg[ACTIVE] = "#000000" #Foreground text of non-selected but available widgets
fg[SELECTED] = "#000000" #The foreground of something as you click on it, or which is already selected
fg[INSENSITIVE] = "#8B8989" #Foreground text of inactive buttons, etc.

bg[NORMAL] = "#FFF7AE" #The background of every non-clickable/non-active element
bg[PRELIGHT] = "#FFFFFF" #??
bg[ACTIVE] = "#FFf265" #The background of Evolutions's icons, selected folder, shorcut panel, etc.
bg[SELECTED] = "#fff47f" #The background of something as you click on it, or which is already selected
bg[INSENSITIVE] = "#fffce5" #Background of un-clickable widgets

base[NORMAL] = "#ffffff" #Background for just about everything (editor windows, Evolution's folders, etc.)
base[SELECTED] = "#fff265" #Background of selected text in a list when window is in foreground
base[ACTIVE] = "#fff7bf" #Background of selected text in a list when window not in foreground
base[PRELIGHT] = "#ffffff" #??
base[INSENSITIVE]= "#fffce5" #Background of un-clickable widgets

# text[INSENSITIVE]= "#9B9B9B" #Un-selectable text
text[SELECTED] = "#000000" #Foreground of selected text in a list when window is in foreground
text[ACTIVE] = "#000000" #Certain highlighted/selected things
# text[PRELIGHT] = "#353535"
I made many other themes, but never encountered this problem! :shock:

Thank you for your attention.

Cordialement.
Attachments
171252_380x562_easyshot.png
(36.49 KiB) Downloaded 417 times
Last edited by Argolance on Tue 02 Oct 2012, 10:22, edited 1 time in total.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#2 Post by musher0 »

Hello, argolance.

A test with gcolor2 revealed that it is none of the defined colours. (See pic.)
Maybe this data panel is fed into pnethood by some other progr? gxmessage, maybe? Or it may be pre-defined by the GTK theme. Have you tried changing the GTK theme?

Best of luck ! :)
Attachments
colourCCCCCC.jpg
(29.13 KiB) Downloaded 406 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#3 Post by technosaurus »

Code: Select all

style "notebook"
{
 engine "pixmap" {
    image 
      {
        function        = EXTENSION
	recolorable     = TRUE
	state		= ACTIVE
	file            = "tab2.png"
	border          = { 6,6,6,6 }
	stretch         = TRUE
      }

    image 
      {
        function        = EXTENSION
	recolorable     = TRUE
	file            = "tab1.png"
	border          = { 6,6,6,6 }
	stretch         = TRUE
      }
  }
}
or

Code: Select all

style "notebook"
{
  engine "pixmap" 
    {
    image 
      {
        function        = EXTENSION
	recolorable     = TRUE
	state		= ACTIVE
	file            = "notebook1.png"
	border          = { 6,6,6,6 }
	stretch         = TRUE
      }

    image 
      {
        function        = EXTENSION
	recolorable     = TRUE
	file            = "notebook2.png"
	border          = { 6,6,6,6 }
	stretch         = TRUE
      }
    image 
      {
        function        = BOX_GAP
	recolorable     = TRUE
	file            = "up.png"
	border          = { 2,2,2,2 }
	stretch         = TRUE
	gap_file        = "blank.png"
	gap_border      = { 0, 0, 0, 0 }
	gap_start_file  = "blank.png"
	gap_start_border= { 0, 0, 0, 0 }
	gap_end_file    = "blank.png"
	gap_end_border  = { 0, 0, 0, 0 }
      }
  }
}
then at the end of the gtkrc file put:
class "GtkNotebook" style "notebook"

not sure if you can use just colors?
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#4 Post by Argolance »

Hello,
Thank you for answering.
@musher0
A test with gcolor2 revealed that it is none of the defined colours. (See pic.)
The way I came to this conclusion was a bit laborious :? : I commented lines or replaced the initial colors with #FF00FF (magenta) to see what occurs... On the other side, I learnt a lot about this gtkrc file!
Maybe this data panel is fed into pnethood by some other progr?
This was just an example: this occured with all GUIs containing tabs!
Have you tried changing the GTK theme
Of course, and it was correct!

@technosaurus
I replaced the second proposal which was already (and word for word!), present in the existing gtkrc file (which served me as work-base) with the first one: bingo!
This works perfectly. :D

Cordialement.
Thank you!
Attachments
120859_1920x1200_easyshot.png
(39.41 KiB) Downloaded 413 times

Post Reply