Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 20 Apr 2014, 22:20
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
individual gtktheme
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [15 Posts]  
Author Message
zigbert


Joined: 29 Mar 2006
Posts: 5562
Location: Valåmoen, Norway

PostPosted: 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
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Fri 28 Sep 2007, 14:52    Post subject:  

Code:
export GTK2_RC_FILES=$GTK2_RC_FILES:/etc/gtk/gtkrc.black
yourprogram &


see attached picture Very Happy

Mark
gtkrcfor1progonly.jpg
 Description   
 Filesize   22.81 KB
 Viewed   769 Time(s)

gtkrcfor1progonly.jpg

Back to top
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5562
Location: Valåmoen, Norway

PostPosted: Fri 28 Sep 2007, 17:23    Post subject:  

Thank you!!!

Sigmund
Back to top
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5562
Location: Valåmoen, Norway

PostPosted: Mon 03 Mar 2008, 10:08    Post subject:  

Is it possible to set a unique fontsize for only radiobuttons?
_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
HairyWill


Joined: 26 May 2006
Posts: 2949
Location: Southampton, UK

PostPosted: 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
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5562
Location: Valåmoen, Norway

PostPosted: 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
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: 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
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: 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
View user's profile Send private message Visit poster's website 
HairyWill


Joined: 26 May 2006
Posts: 2949
Location: Southampton, UK

PostPosted: 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
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5562
Location: Valåmoen, Norway

PostPosted: Tue 04 Mar 2008, 03:24    Post subject:  

Mighty MU fixed it again Very Happy

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
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5562
Location: Valåmoen, Norway

PostPosted: 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
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: 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
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5562
Location: Valåmoen, Norway

PostPosted: Tue 18 Mar 2008, 13:41    Post subject:  

Sorry to hear, but thanks for a good answer.

Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
Eyes-Only


Joined: 10 Aug 2006
Posts: 1046
Location: La Confederation Abenaquaise

PostPosted: 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. Smile

Keep up the great work Zigbert!

Amicalement,

Eyes-Only
"L'Peau-Rouge"

_________________
*~*~*~*~*~*
Proud user of LXpup and 3-Headed Dog. Cool
*~*~*~*~*~*
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5562
Location: Valåmoen, Norway

PostPosted: 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
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [15 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0719s ][ Queries: 12 (0.0050s) ][ GZIP on ]