individual gtktheme

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

individual gtktheme

#1 Post by zigbert »

How to set a unique fontsize or gtktheme for one program.
I want a bigger fontsize in a <tree>

Sigmund

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#2 Post by MU »

Code: Select all

export GTK2_RC_FILES=$GTK2_RC_FILES:/etc/gtk/gtkrc.black
yourprogram &
see attached picture :D

Mark
Attachments
gtkrcfor1progonly.jpg
(22.81 KiB) Downloaded 878 times

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#3 Post by zigbert »

Thank you!!!

Sigmund

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#4 Post by zigbert »

Is it possible to set a unique fontsize for only radiobuttons?

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#5 Post by HairyWill »

Surely this is like putting font declarations in your HTML. I know little about gtk theming but would think you would need a strong reason to override your users theme choice. What happens when they have a customised theme that makes all the text double the size? Will your overidden theme still make sense?
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#6 Post by zigbert »

Code: Select all

export GTK2_RC_FILES=/usr/local/pburn/gtk/gtkrc-UNIQUE:/etc/gtk-2.0/gtkrc
This will call the standard gtk2-theme in Puppy3 which is defined by the file /etc/gtk-2.0/gtkrc. My changes for Pburn will override the original, but still use the original settings when not specified in /usr/local/pburn/gtk/gtkrc-UNIQUE. I made the radiobutton look like a flame (relax, it was just for fun). But what I want to do is making radiobutton-text bold and larger, since this is the most important option in the burning process. To prevent large text in preferences-dialog, just reset gtk by running 'export GTK2_RC_FILES=/etc/gtk-2.0/gtkrc'

Hope this explain my idea

Sigmund

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#7 Post by MU »

not shure about the font-size.
But you can change the size of the checkbox.

In your theme, add one line to the default-style.

Code: Select all

GtkRadioButton::indicator_size = 20
So here it looks like this:

Code: Select all

style "default"
{
GtkRadioButton::indicator_size = 20


  bg[SELECTED] = "#336699"
  base[SELECTED] = "#336699"
  base[INSENSITIVE] = "#336699"
  base[ACTIVE] = "#336699"
  
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#8 Post by MU »

ok, the font:

In your custom theme, add this in the end:

Code: Select all

style "radiobutton" = "default"
{
  font_name = "Sans 20"
}

widget_class "*RadioButton*" style "radiobutton"

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#9 Post by HairyWill »

Sigmund
You certainly don't need to justify your design decisions to me I was just curious. I look forward to seeing the result.
Last edited by HairyWill on Wed 19 Mar 2008, 10:37, edited 1 time in total.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#10 Post by zigbert »

Mighty MU fixed it again :D

The gtkrc file gets only info about
- Bold text
- Color of active radiobutton
- radiobutton prelight color

This shouldn't interfere with nearly any gtk-theme. The only I can see; If background is orange.... That's not a very big problem.

Code: Select all

style "default"
{
#GtkRadioButton::indicator_size = 12	#increase if using larger alternative button-image 
}


style "radiobutton" = "default"
{
  font_name = "Sans bold 12"
	fg[ACTIVE]		= "#FF6C00"		#textcolor of chosen burnmode
	fg[PRELIGHT]	= "#B87545"		#textcolor when mouse is over button
}
widget_class "*RadioButton*" style "radiobutton" 
Here's the result
Image

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#11 Post by zigbert »

Here's next question

Code: Select all

#! /bin/bash
echo 'style "specialmono"
{
	font_name="Mono 20"
	fg[NORMAL]		= "#FF0000"
	base[NORMAL]	= "#333333"
}
class "*" style "specialmono"' > /tmp/gtkrc_mono
export GTK2_RC_FILES=/tmp/gtkrc_mono:/root/.gtkrc-2.0:/etc/gtk-2.0/gtkrc

gtklogfileviewer /var/log/messages "Stop" 0 0 600 350

export p='
<window>
 <edit><input file>/var/log/messages</input></edit>
 <button><label>Stop</label></button>
</window>'
gtkdialog3 --program=p --center
Why doesn't gtkdialog editor-text react on red text setting, and why doesn't gtklogfileviewer react at all on gtk-settings in text-window?

Sigmund

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#12 Post by MU »

Gtklogfileviewer is using a "TextView" widget.
That has an own, very complicated syntax to use fonts, colours, links, pictures and such.
You might compare that to HTML, but not as easy to set up.
It is somehow like the Gecko engine of Mozilla, an own rendering system, that can not be influenced by standard Gtk-settings.

The font-settings could be set in the sourcecode only.

In main.c around line 300 you see "Courier", here the fontfamily is defined.
Below, there are some colour-definitions.

They are applied further down, around line 370 using "textiters".

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#13 Post by zigbert »

Sorry to hear, but thanks for a good answer.

Sigmund

User avatar
Eyes-Only
Posts: 1043
Joined: Thu 10 Aug 2006, 06:32
Location: La Confederation Abenaquaise

#14 Post by Eyes-Only »

A really fascinating thread! And I liked those screenshots showing what you're doing Zigbert. Really sharp-looking my friend!

It's really neat all these little "extra special looks" that we can do with Linux to individualize and make even moreso our personal computers truly "our personal computers"!

This was one of the special things I enjoyed about running a Windows shell for years, and what I love most about using Linux. :)

Keep up the great work Zigbert!

Amicalement,

Eyes-Only
"L'Peau-Rouge"
*~*~*~*~*~*
Proud user of LXpup and 3-Headed Dog. 8)
*~*~*~*~*~*

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#15 Post by zigbert »

pStopWatch has this gtkrcs

Code: Select all

style "text"
{	font_name="Mono 60"
	base[NORMAL]	= "#000000" }
class "*ist*"	style "text"
style "special"
{	font_name="Sans bold 30"
	fg[NORMAL]		= "#FF0000" }
class "*b*"	style "special"
Image

Post Reply