Page 1 of 1
individual gtktheme
Posted: Fri 28 Sep 2007, 07:45
by zigbert
How to set a unique fontsize or gtktheme for one program.
I want a bigger fontsize in a <tree>
Sigmund
Posted: Fri 28 Sep 2007, 18:52
by MU
Code: Select all
export GTK2_RC_FILES=$GTK2_RC_FILES:/etc/gtk/gtkrc.black
yourprogram &
see attached picture
Mark
Posted: Fri 28 Sep 2007, 21:23
by zigbert
Thank you!!!
Sigmund
Posted: Mon 03 Mar 2008, 14:08
by zigbert
Is it possible to set a unique fontsize for only radiobuttons?
Posted: Mon 03 Mar 2008, 17:35
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?
Posted: Mon 03 Mar 2008, 18:22
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
Posted: Mon 03 Mar 2008, 19:19
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
Posted: Mon 03 Mar 2008, 19:24
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
Posted: Mon 03 Mar 2008, 19:42
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.
Posted: Tue 04 Mar 2008, 07:24
by zigbert
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: 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
Posted: Tue 18 Mar 2008, 15:30
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
Posted: Tue 18 Mar 2008, 15:58
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
Posted: Tue 18 Mar 2008, 17:41
by zigbert
Sorry to hear, but thanks for a good answer.
Sigmund
Posted: Tue 18 Mar 2008, 20:29
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"
Posted: Tue 18 Mar 2008, 23:26
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"