Author |
Message |
zigbert

Joined: 29 Mar 2006 Posts: 6541 Location: Valåmoen, Norway
|
Posted: Fri 28 Sep 2007, 03:45 Post subject:
individual gtktheme Subject description: How to set a unique fontsize or gtktheme for one program. |
|
How to set a unique fontsize or gtktheme for one program.
I want a bigger fontsize in a <tree>
Sigmund
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13648 Location: Karlsruhe, Germany
|
Posted: Fri 28 Sep 2007, 14:52 Post subject:
|
|
Code: | export GTK2_RC_FILES=$GTK2_RC_FILES:/etc/gtk/gtkrc.black
yourprogram & |
see attached picture
Mark
Description |
|
Filesize |
22.81 KB |
Viewed |
844 Time(s) |

|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6541 Location: Valåmoen, Norway
|
Posted: Fri 28 Sep 2007, 17:23 Post subject:
|
|
Thank you!!!
Sigmund
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6541 Location: Valåmoen, Norway
|
Posted: Mon 03 Mar 2008, 10:08 Post subject:
|
|
Is it possible to set a unique fontsize for only radiobuttons?
_________________ Stardust resources
|
Back to top
|
|
 |
HairyWill

Joined: 26 May 2006 Posts: 2946 Location: Southampton, UK
|
Posted: Mon 03 Mar 2008, 13:35 Post subject:
|
|
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: community website, screenshots, puplets, wiki, rss
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6541 Location: Valåmoen, Norway
|
Posted: Mon 03 Mar 2008, 14:22 Post subject:
|
|
Code: | 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
_________________ Stardust resources
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13648 Location: Karlsruhe, Germany
|
Posted: Mon 03 Mar 2008, 15:19 Post subject:
|
|
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: | GtkRadioButton::indicator_size = 20 |
So here it looks like this:
Code: | style "default"
{
GtkRadioButton::indicator_size = 20
bg[SELECTED] = "#336699"
base[SELECTED] = "#336699"
base[INSENSITIVE] = "#336699"
base[ACTIVE] = "#336699"
|
Mark
_________________ my recommended links
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13648 Location: Karlsruhe, Germany
|
Posted: Mon 03 Mar 2008, 15:24 Post subject:
|
|
ok, the font:
In your custom theme, add this in the end:
Code: | style "radiobutton" = "default"
{
font_name = "Sans 20"
}
widget_class "*RadioButton*" style "radiobutton"
|
Mark
_________________ my recommended links
|
Back to top
|
|
 |
HairyWill

Joined: 26 May 2006 Posts: 2946 Location: Southampton, UK
|
Posted: Mon 03 Mar 2008, 15:42 Post subject:
|
|
Sigmund
You certainly don't need to justify your design decisions to me I was just curious. I look forward to seeing the result.
_________________ Will
contribute: community website, screenshots, puplets, wiki, rss
Last edited by HairyWill on Wed 19 Mar 2008, 06:37; edited 1 time in total
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6541 Location: Valåmoen, Norway
|
Posted: Tue 04 Mar 2008, 03:24 Post subject:
|
|
Mighty MU fixed it again
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: | 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
_________________ Stardust resources
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6541 Location: Valåmoen, Norway
|
Posted: Tue 18 Mar 2008, 11:30 Post subject:
|
|
Here's next question
Code: | #! /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
_________________ Stardust resources
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13648 Location: Karlsruhe, Germany
|
Posted: Tue 18 Mar 2008, 11:58 Post subject:
|
|
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
_________________ my recommended links
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6541 Location: Valåmoen, Norway
|
Posted: Tue 18 Mar 2008, 13:41 Post subject:
|
|
Sorry to hear, but thanks for a good answer.
Sigmund
_________________ Stardust resources
|
Back to top
|
|
 |
Eyes-Only

Joined: 10 Aug 2006 Posts: 1046 Location: La Confederation Abenaquaise
|
Posted: Tue 18 Mar 2008, 16:29 Post subject:
|
|
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.
*~*~*~*~*~*
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6541 Location: Valåmoen, Norway
|
Posted: Tue 18 Mar 2008, 19:26 Post subject:
|
|
pStopWatch has this gtkrcs Code: | 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" |
_________________ Stardust resources
|
Back to top
|
|
 |
|