The time now is Wed 03 Mar 2021, 01:29
All times are UTC - 4 |
Page 1 of 3 [44 Posts] |
Goto page: 1, 2, 3 Next |
Author |
Message |
torm

Joined: 07 Mar 2015 Posts: 186
|
Posted: Tue 22 Sep 2015, 10:32 Post subject:
Theme (Gtk-2) features in detail, revisited. |
|
Hello.
I'll try to collect here some basic tips for Gtk-2 themes (maybe some other theme or
desktop related things also.. ) for anyone who is adopting themes into Puppy,
or maybe trying to create something new.
For base system there will be 32bit TahrPup605PAE
http://murga-linux.com/puppy/viewtopic.php?t=96178
This is a version of Puppy that I use for everyday tasks.
-
For those on different version or make of Puppy -not all examples will work and/or some
workarounds may be needed. As example -> if it has different version of GtkDialog/Qt/JWM,
different or missing fonts, missing gtk2 engines, libraries and so on. I'll try to do my best
to help out on those occasions, then again, help from actual users of those systems may give
better results -and is most welcome.
As far as Gtk-2 is still used
lets get started with Gtk-2 theme details..
Last edited by torm on Sat 27 Aug 2016, 14:17; edited 1 time in total
|
Back to top
|
|
 |
torm

Joined: 07 Mar 2015 Posts: 186
|
Posted: Tue 22 Sep 2015, 10:33 Post subject:
|
|
Un-themed "xml_info" color.
It gives that strange detail on some GtkDialog text background areas.
(-see the screenshot below-)
A real mystery for anyone not having pTheme on the system..
Well, those who have pTheme installed, can skip to next post
One way is to create a folder /root/.config/ptheme
and put a file named as "gtkdialog_active" there,
with the following content:
Code: | BOX_SPLASH_BG='#82B0BB'
BOX_SPLASH_BG_GRADIENT=true
BOX_SPLASH_FG='#222'
SVG_BAR_COLOR_USED='#006793'
SVG_BAR_COLOR_TOTAL='#444'
SVG_BAR_COLOR_TEXT='#bbb'
SVG_BAR_HEIGHT=24
SVG_TEXT_COLOR='#002A4A'
SVG_TEXT_SHADOW_COLOR='#CFEFFF'
XML_BUTTON_ICON_HEIGHT_HUGE=60
XML_BUTTON_ICON_HEIGHT_BIG=35
XML_BUTTON_ICON_HEIGHT_MINI=16
XML_BUTTON_ICON_HEIGHT_NORMAL=20
XML_INFO_OPACITY=0.0 #background opacity
XML_INFO_COLOR1='#00FF00' #background color
XML_INFO_COLOR2='#000000' #gradient spot color
XML_INFO_MODE=flat #drawing mode: 'gradient' or 'flat'
XML_PIXMAP_HEIGHT_HUGE=100
XML_PIXMAP_HEIGHT_BIG=60
XML_PIXMAP_HEIGHT_ICON=48
XML_PIXMAP_HEIGHT_NORMAL=20
XML_SCALEGRIP_SIZE=20 |
..that should make it transparent and acceptable for most gtk2 themes.
The line with "XML_INFO_OPACITY=0.0 #background opacity" does it.
For TahrPup605 -just click the "ptheme-00.pet" below.
Also..
One can address it from favorite Gtk2 theme.
With "pixmap" engine it's something like this in
class "GtkNotebook*" style "notebook"
add the following:
Code: | image
{
function = BOX
file = "no.png"
border = {1, 1, 1, 1}
stretch = TRUE
} |
..where "no.png" is a transparent 4x4 pixmap. Can be any pixmap.
Replaces the background.
Description |
ptheme fix for tahrpup605
|

Download |
Filename |
ptheme-00.pet |
Filesize |
740 Bytes |
Downloaded |
924 Time(s) |
Description |
background color |
Filesize |
22.79 KB |
Viewed |
2017 Time(s) |

|
Last edited by torm on Sat 27 Aug 2016, 14:22; edited 1 time in total
|
Back to top
|
|
 |
torm

Joined: 07 Mar 2015 Posts: 186
|
Posted: Tue 22 Sep 2015, 10:35 Post subject:
|
|
Dark(or mixed) theme and combobox-menu text colors.
To set some drop-down-menu text color, so it would act the same as fg color.
(if actual "text" is normally set to black and "base" to white)
Using dark menu background, and blue text that should turn to white
when I move cursor over it (a PRELIGHT state):
Code: | style "cbm_item_text"
{
text[NORMAL] = "#00A2FF"
text[PRELIGHT] = "#FFFFFF"
}
widget "*.gtk-combobox-popup-menu.*" style "cbm_item_text" |
A similar thing for the combobox label or preselected item:
Code: | style "cbm_presel_item_text"
{
text[NORMAL] = "#DFE1E6"
text[PRELIGHT] = "#FFFFFF"
}
widget_class "*.<GtkComboBox>.<GtkCellView>" style "cbm_presel_item_text" |
Description |
illustration |
Filesize |
11.98 KB |
Viewed |
2000 Time(s) |

|
Last edited by torm on Sat 27 Aug 2016, 14:25; edited 1 time in total
|
Back to top
|
|
 |
torm

Joined: 07 Mar 2015 Posts: 186
|
Posted: Tue 22 Sep 2015, 10:37 Post subject:
|
|
Dark (or mixed) theme and list item text color.
If the colors are mess...
these can be adjusted. Change colors to whatever looks best.
Code: | style "some_list"
{
fg[NORMAL] = "#000000"
fg[SELECTED] = "#FFFFFF"
bg[SELECTED] = "#004FCF"
base[NORMAL] = "#C0C6CC"
}
widget_class "*<GtkListItem>*" style "some_list"
widget_class "*<GtkList>*" style "some_list" |
---------------------------------------------------------------------------
Something for XKB keyboard selection (dark or mixed) menu:
Code: | style "col_clist"
{
fg[NORMAL] = "#000000"
fg[SELECTED] = "#61FF61"
bg[SELECTED] = "#1E2023"
base[NORMAL] = "#B1B2BA"
}
widget_class "*.<GtkScrolledWindow>.<GtkCList>" style "col_clist" |
Last edited by torm on Sat 27 Aug 2016, 14:28; edited 1 time in total
|
Back to top
|
|
 |
torm

Joined: 07 Mar 2015 Posts: 186
|
Posted: Tue 22 Sep 2015, 10:38 Post subject:
|
|
Visible "focus" item on GtkButton and GtkNotebook*
For some theme I just want to remove it...
With "pixmap" engine
in style "default" or in style "button" and/or style "notebook":
Code: | image
{
function = FOCUS
file = "no.png"
border = {1, 1, 1, 1}
stretch = TRUE
} |
..will replace the focus that is drawn by the engine.
"no.png" can be just transparent 4x4 pixmap in gtk-2.0 dir.
For "murrine" engine -in style default, button.. and/or notebook:
focusstyle = 0
..will disable focus drawing.
Adding in style default:
GtkButton::focus-padding = 0
..will remove any extra space on buttons fill used for drawing focus.
(it will also make buttons smaller in default size)
Last edited by torm on Sat 27 Aug 2016, 14:30; edited 1 time in total
|
Back to top
|
|
 |
torm

Joined: 07 Mar 2015 Posts: 186
|
Posted: Tue 22 Sep 2015, 10:39 Post subject:
|
|
In-theme set icons.
Any custom Gtk icons can be used to appear with chosen theme only.
Just create a "icons" folder inside the theme "gtk-2.0" folder, and place icons there.
Inside "icons" folder create "iconrc" file with a similar text:
Code: | style "icons"
{
## for Gtk
stock["gtk-ok"] ={{ "ok.png" }}
stock["gtk-apply"] = {{ "apply.png" }}
stock["gtk-cancel"] = {{ "cancel.png" }}
stock["gtk-about"] = {{ "about.png" }}
stock["gtk-go-down"] = {{ "go-dn.png" }}
# stock["gtk-dnd"] = {{ " .png" }}
# stock["gtk-goto-bottom"] = {{ " .png"}}
# stock["gtk-clear"] = {{ " .png" }}
# stock["gtk-preferences"] = {{ " .png" }}
stock["gtk-open"] ={{ "fld.png" }}
stock["gtk-directory"] = {{ "fld.png" }}
stock["gtk-dialog-question"] = {{ "what.png" }}
# stock["gtk-missing-image"] = {{ "non.png" }} # use with care
## for RoxFM
stock["rox-show-hidden"] = {{"hid.png"}}
stock["rox-show-details"] = {{"det.png"}}
stock["rox-select"] = {{"sel.png"}}
## for RoxFM and Gtk
stock["gtk-close"] = {{ "cancel.png" }}
stock["gtk-go-up"] = {{ "go-up.png" }}
stock["gtk-home"] = {{ "home.png" }}
stock["gtk-refresh"] = {{"refresh.png"}}
# stock["gtk-zoom-in"] = {{" .png"}}
# stock["gtk-zoom-fit"] = {{" .png"}}
# stock["gtk-jump-to"] = {{" .png"}} # bookmarks
# stock["gtk-sort-ascending"] = {{" .png"}}
# stock["gtk-help"] = {{" .png"}}
}
class "GtkWidget" style "icons" |
(note: any lines with a leading #-sign are not read by the engine)
One can pick just some of them, or add more, this is just an example.
Like only Rox-toolbar icons, etc. (any gtk icon can be changed, a
program called "Icon Finder" with: 'Menu->GTK stock icons' will give a
preview of all Gtk icons that are used on the system with correct names.)
Then inside theme "gtkrc" file add (before any style) the following line:
Code: | include "icons/iconrc" |
so that engine would find and use this setting.
/--/
The same thing can be done from a "default" or some other single style.
For exaple to theme (rox-)toolbar with custom icons/font/text-color:
note: location inside gtkrc may matter here,
and pixmaps should probably be in size 24x24 for Rox toolbar
Code: |
style "tool_rox"
{
stock["gtk-go-up"] = {{ "icons/pix_0.png" }}
stock["gtk-go-down"] = {{ "icons/pix_1.png" }}
stock["rox-show-details"] = {{ "icons/pix_2.png" }}
stock["rox-show-hidden"] = {{ "icons/pix_3.png" }}
stock["rox-select"] = {{ "icons/pix_4.png" }}
stock["gtk-close"] = {{ "icons/pix_5.png" }}
font_name = "Fjalla One 9"
fg[NORMAL] = "#474747"
fg[PRELIGHT] = "#000000"
fg[ACTIVE] = "#000000"
}
widget_class "GtkWindow.GtkVBox.GtkToolbar.GtkButton.GtkHBox.GtkLabel" style "tool_rox"
widget_class "GtkWindow.GtkVBox.GtkToolbar.GtkButton.GtkVBox.GtkLabel" style "tool_rox"
widget_class "GtkWindow.GtkVBox.GtkToolbar.GtkButton.GtkHBox.GtkImage" style "tool_rox"
widget_class "GtkWindow.GtkVBox.GtkToolbar.GtkButton.GtkVBox.GtkImage" style "tool_rox" |
/--/
To set custom size for the icons, in "gtkrc" file (before any style) one may add:
Code: | gtk-icon-sizes = "panel-menu=24,24:panel=22,22:gtk-button=16,16:gtk-large-toolbar=22,22" |
where 22,22 or 16,16... will be the sizes in pixels.
Scaling may blur the png images, so set to actual pixmap size if possible,
or even better -use images in correct sizes ( maybe not 256x256 Wink.
To remove button icons like on "Ok" and similar (works for some) add (before any style):
Code: |
gtk-button-images = 0 |
Then..
Application can have its own set of "stock" icons.
For example - any GtkDialog based app..
Or even some feature to change these icons.
And it can (or not) be merged with the current global theme.
Last edited by torm on Sat 27 Aug 2016, 14:33; edited 1 time in total
|
Back to top
|
|
 |
torm

Joined: 07 Mar 2015 Posts: 186
|
Posted: Tue 22 Sep 2015, 10:40 Post subject:
|
|
In-theme set TTF-font.
Can be set in theme "gtkrc" in style "default" with:
Code: | font_name="DejaVu Sans 10" |
where ten is the size. Changes font for this theme only.
Some wigets can support its own setting. As:
Code: | style "menubar_font"
{
font_name="DejaVu Sans Bold 10"
}
class "GtkMenubar" style "menubar_font"
widget_class "*<GtkMenuBar>.<GtkMenuItem>.<GtkLabel>" style "menubar_font" |
will then set only menubar font to bold (can be also a different font or size),
while leaving all else as is.
Some gtk2 engines provide effects like shadows and similar for fonts.
Last edited by torm on Sat 27 Aug 2016, 14:34; edited 3 times in total
|
Back to top
|
|
 |
torm

Joined: 07 Mar 2015 Posts: 186
|
Posted: Tue 22 Sep 2015, 10:41 Post subject:
|
|
Gtk2 theme engines.
If some downloaded theme looks a lot different from what was expected..
look into (open with text editor..) /tmp/xerrs.log to see if there's something missing (scroll
to the bottom of the file) on the system.
It could be one of the following engines ( not a complete list.. ) :
murrine (libmurrine.so 199K)
clearlooks (libclearlooks.so 153K)
ubuntulooks (libubuntulooks.so 71K, libubuntulooks.la 1496B)
equinox (libequinox.so 135K, libequinox.la 1105B)
xfce (libxfce.so 48K, libxfce.la 1235B)
crux-engine (libcrux-engine.so 51K)
aurora (libaurora.so 96K)
nodoka (libnodoka.so 79K)
svg (libsvg.so 36K, libsvg.la 1716B)
nimbus (libnimbus.so 110K)
adwaita (libadwaita.so 9644B)
galaxy (libgalaxy.so 52K)
glide (libglide.so 68K)
thinice (libthinice.so 43K)
hcengine (libhcengine.so 47K)
industrial (libindustrial.so 47K)
mist (libmist.so 41K)
luaengine (libluaengine.so 181K)
redmond95 (libredmond95.so 51K)
ia_ora (libia_ora.so 70K)
smooth (libsmooth.so 197K)
......
...
needs to be installed first. Normally Puppy has pixmap engine (libpixmap.so 38K) as a
default preinstalled. Some of the above engines can be found on the forum, look into:
"Gtk themes for Puppy4+ Dingo"
If not there, one can just grab it from compatible distro, and paste into:
/usr/lib/gtk-2.0/2.10.0/engines/
folder, and change to the theme again to see if it looks okay now.
Semi-transparent menus (or window borders) and other bling seen on the theme exchange sites
may not be related to theme engines. Look for xcompmgr or kcompmgr...
PS.
"/tmp/xerrs.log" can also point out (including line numbers for Geany) some other useful
and detailed information (drag a link on the desktop for quick access?).
Last edited by torm on Sat 27 Aug 2016, 14:36; edited 1 time in total
|
Back to top
|
|
 |
torm

Joined: 07 Mar 2015 Posts: 186
|
Posted: Wed 14 Oct 2015, 07:12 Post subject:
|
|
Gtk2 engine defaults.
To see what the engine looks like "as-is", without any custom settings..
Create folder MyTest_00 (any "original" name, without spaces in it) in:
/usr/share/themes/
inside MyTest_00, create folder with a name:
gtk-2.0
in the folder "gtk-2.0", create blank file named:
gtkrc
open file "gtkrc" with text editor, and add following:
Code: |
style "default"
{
engine "ubuntulooks"
{
}
}
class "GtkWidget" style "default" |
..where engine name can be anything one does have on the system,
ubuntulooks was here just for example.
Save file "gtkrc" and select theme MyTest_00 with Chtheme or similar.
From there.. one can go and add some adjustments for widgets or colors..
Last edited by torm on Sat 27 Aug 2016, 14:37; edited 1 time in total
|
Back to top
|
|
 |
torm

Joined: 07 Mar 2015 Posts: 186
|
Posted: Wed 21 Oct 2015, 11:23 Post subject:
|
|
Test theme, using "pixmap" and "industrial" Gtk-2 theme engines.
-
Please install fonts pet first.
( does NOT include DejaVuSans fonts, size... )
"Industrial" 32bit lib (libindustrial.so) is included with the theme pet.
Description |
preview |
Filesize |
46.41 KB |
Viewed |
2016 Time(s) |

|
Description |
installs fonts to /usr/share/fonts/default/TTF
|

Download |
Filename |
fonts-01.pet |
Filesize |
59.18 KB |
Downloaded |
881 Time(s) |
Description |
installs gtk2 theme and libindustrial.so
|

Download |
Filename |
pixmap-industrial-01.pet |
Filesize |
26.38 KB |
Downloaded |
860 Time(s) |
Last edited by torm on Sat 27 Aug 2016, 14:42; edited 2 times in total
|
Back to top
|
|
 |
torm

Joined: 07 Mar 2015 Posts: 186
|
Posted: Wed 21 Oct 2015, 11:24 Post subject:
|
|
(moved here)
Test theme 2 (version -03, minor clean-up of gtkrc)
Semi-inverted darkgray Gtk2 and JWM theme, wallpaper.
Preconfigured for older 17" CRT 4:3 displays with 1024x768@75.* resolution.
Credits.
bg_1024x768.png is inspired (not a copy) by a wallpaper found on Box-Look.org
Gtk2 theme is 'Murrine -fied' upon the apperarance of "mint-x-mod, mod by dirn" SVG theme.
JWM theme is for: jwm -v = JWM vgit-976 ( built-in = jwm-933-i686 )
To use png button-pixmaps for JWM, one may need to update JWMDesk ( to a version 2.* ).
Then place "btns4" folder (in my-documents/clipart/pixmaps_for..) to
/usr/local/jwmdesk/jwm_button_themes/..
If pixmaps look fuzzy, set window border area (using JWMDesk) to 25x5x5x5 pixel.
Please look for font-pet and pTheme-fix in above posts.
There is also a "murrine" engine below,
that is already pre-installed in tahrpup605 32bit, if needed.
PS.
One may use some pixmap tiles or a different color background for Rox filemanager,
example is at the end of the gtkrc.
 |
Description |
gtk2 and jwm theme, wallpaper 1024x768
|

Download |
Filename |
gtk2-jwm-wall_v03.pet |
Filesize |
45.98 KB |
Downloaded |
856 Time(s) |
Description |
preview |
Filesize |
37.25 KB |
Viewed |
2016 Time(s) |

|
Description |
libmurrine.so engine
|

Download |
Filename |
murrine32bit.pet |
Filesize |
61.07 KB |
Downloaded |
883 Time(s) |
Last edited by torm on Wed 14 Sep 2016, 10:13; edited 2 times in total
|
Back to top
|
|
 |
solo

Joined: 14 Nov 2013 Posts: 390
|
Posted: Sat 24 Oct 2015, 06:46 Post subject:
|
|
X11 color name list
Sometimes X11 color name descriptors are being used instead of the hex color name.
Here's an example from the .jwmrc-tray file:
Code: | <Swallow name="xload" width="32">
xload -nolabel -bg "#444443" -fg DeepSkyBlue -hl white
</Swallow> |
You can see both forms are being used in the same declaration.
There's a handy list of these X11 color names along with their RGB values, which is called rgb.txt, and can be found in the /usr/share/X11/ folder.
|
Back to top
|
|
 |
torm

Joined: 07 Mar 2015 Posts: 186
|
Posted: Sat 27 Aug 2016, 14:49 Post subject:
|
|
(moved here)
Test theme 3
Gtk2 and JWM theme, wallpaper.
One can get (Murrine gtk2 engine,) fonts and pTheme-fix from above posts.
Credits:
Wallpaper uses Puppy logo as modified detail, from /usr/share/doc/..
Most Rox/gtk/desk icons are from Faenza icon theme, and
there's a small selection of Mad-Shiny-Black icons, for mime and drive icons.
Cursor theme is from LXPup.
Description |
gtk2 and jwm theme, wallpaper 1024x768
|

Download |
Filename |
B3_test-03.pet |
Filesize |
166.93 KB |
Downloaded |
844 Time(s) |
Description |
preview |
Filesize |
62.41 KB |
Viewed |
2060 Time(s) |

|
Description |
icons and cursor theme
|

Download |
Filename |
icons-cursor-02.pet |
Filesize |
219.29 KB |
Downloaded |
875 Time(s) |
|
Back to top
|
|
 |
torm

Joined: 07 Mar 2015 Posts: 186
|
Posted: Sun 15 Jan 2017, 06:39 Post subject:
|
|
Extended use of Gtk2 themes.
Theme splitting.
gtkrc can be split into several rc-files, like gtkrc + icons.rc + buttons.rc +.. etc.,
in different locations(folders), add the:
Code: | include "icons/icons.rc"
include "button/buttons.rc" |
to the main gtkrc file.
For that matter one could share the same iconset or any other detail for multiple
themes without the need to copy it from one (theme)folder to another,
using full path or "pixmap_path".
Filemanagers.
Using multiple rc-files may also speed up theme adjustment
when using custom widget sub-themes for filemanagers and/or panels.
Like when using XFCE with Thunar one could comment out
Code: | # include "roxfm.rc" |
from gtkrc and vice versa, so that widget look-up time would be faster.
|
Back to top
|
|
 |
torm

Joined: 07 Mar 2015 Posts: 186
|
Posted: Wed 15 Mar 2017, 17:58 Post subject:
|
|
Extended use example. (ROX filemanager)
This should work from include or directly from gtkrc.
For text shadows, one will need libmurrine.so
installed on the system.
---- To start with, there is Gtk2 lookup/merge:
- class styles
- wiget_class styles
- widget styles
More general styles should have "class" statement, while more specific styles
should use "widget_class" or "widget" statements.
---- Location inside gtkrc-file matters:
- if placed/read last, gets more of a priority..
So first there should be wide use defaults, then, -at the end of gtkrc, different
widget-specific details.
---------------------------
As an example we'll use ROX filemanager, as it is most likely around to play with.
ROX window and toolbar details.
Later we can combine these widgets in a few styles,
while for now I'll edit these one by one..
Notice that, example settings and pixmap-names are only theoretical,
and widget (class) names are direct and real.
1. Toolbar
Code: | style "test-1"
{
...example settings
}
widget "rox-filer.GtkVBox.GtkToolbar" style "test-1" |
Example settings:
font_name = "Fjalla One 9" # will set information area font, on the right from buttons
fg[NORMAL] = "#FFFFFF" # font color
GtkToolbar::button-relief=GTK_RELIEF_NORMAL # how the "button border" on the toolbar looks
# possible values:
# GTK_RELIEF_NORMAL
# GTK_RELIEF_HALF
# GTK_RELIEF_NONE
xthickness = 2 # size x
ythickness = 0 # size y
GtkToolbar::internal-padding = 3 # just experiment
# ...and the background of ROX toolbar, not affecting any other app.
# just remember that toolbar may get resized with button label location change..
# 18 will hold on to upper edge, so that icon background on the buttons will follow
# toolbar design and vice versa, if resized. Pixmap vertical size 25+ pixels then..
engine "pixmap"
{
image
{
function = BOX
detail = "toolbar"
file = "somefile-name.png"
border = { 4, 4, 18, 4}
stretch = TRUE
}
}
----------------------------------------
2. Toolbar buttons
Code: | style "test-2"
{
...example settings
}
widget "rox-filer.GtkVBox.GtkToolbar.GtkButton" style "test-2" |
Example settings:
GtkButton::inner-border = { 2, 2, 2, 2 } # adjust size
GtkButton::default-border = { 0, 0, 0, 0 } #
# it is intended to combine these settings, so that way... we can have
# more direct control over size details
engine "pixmap"
{
image
{
function = BOX
detail = "button"
file = "some-otherfile-name.png"
border = { 4, 4, 18, 4}
stretch = TRUE
}
}
# if GtkToolbar::button-relief=GTK_RELIEF_NORMAL is set, then
# one may want to add NORMAL, PRELIGHT, ACTIVE, INSENSITIVE
# for the different button states..
------------------------------------------
3. Toolbar button icons
Code: | style "test-3"
{
...example settings
}
widget "rox-filer.GtkVBox.GtkToolbar.GtkButton.GtkVBox.GtkImage" style "test-3"
widget "rox-filer.GtkVBox.GtkToolbar.GtkButton.GtkHBox.GtkImage" style "test-3" |
# GtkVBox and GtkHBox depend on if the label is placed next or below the icon.
# It will share the same look, while it can look different depending on the placement.
# Now, we'll make it more interesting..
Example settings:
stock["gtk-go-up"] = {{"icon1.png", LTR, NORMAL},
{"icon2.png", LTR, PRELIGHT},
{"icon3.png", LTR, ACTIVE}}
stock["gtk-jump-to"] = {{"icon4.png", LTR, NORMAL},
{"icon5.png", LTR, PRELIGHT},
{"icon6.png", LTR, ACTIVE}}
# stock["rox-show-details"] =
# stock["rox-show-hidden"] =
# stock["rox-select"] =
# stock["gtk-close"] =
#...
# ..so we can have different icons for different states.
# It is purely design question using it that way,
# one may want to animate the size (using transparent border) for normal/hovered/pressed
# icons, other add a glow around hovered, etc.
# Icons can be 24x24 pixel png-s with transparency.
# That gives us icon theme that follows current Gtk2 theme on-the-fly
# Icon folder can be shared by different themes, see my previous post up.
# NB! ..notice the ',' behind first two states.
# For Right-To-Left locales, use RTL instead of LTR.
-----------------------------------------------------------------------
4. Toolbar button labels
Code: | style "test-4"
{
...example settings
}
widget "rox-filer.GtkVBox.GtkToolbar.GtkButton.GtkVBox.GtkLabel" style "test-4"
widget "rox-filer.GtkVBox.GtkToolbar.GtkButton.GtkHBox.GtkLabel" style "test-4" |
Example settings:
font_name = "Fjalla One 9" # if standandalone style
fg[NORMAL] = "#FFFFFF" # font colors, example..
fg[ACTIVE] = "#FFFFFF"
fg[PRELIGHT] = "#FFFFFF"
fg[INSENSITIVE] = "#FFFFFF"
# if set as a standalone style after rox-button style,
# one may add also:
engine "murrine"
{
textstyle = 1
text_shade = 0.01
}
# .. to add subtle shadow under glyphs,
# just don't mix different engines inside the same style.
--------------------------------------------------------------
Now combine them..
( only for reference, use real colors and pixmaps in gtkrc.. )
Code: |
style "comb_1"
{
stock["gtk-go-up"] = {{"icon1.png", LTR, NORMAL},
{"icon2.png", LTR, PRELIGHT},
{"icon3.png", LTR, ACTIVE}}
stock["gtk-jump-to"] = {{"icon4.png", LTR, NORMAL},
{"icon5.png", LTR, PRELIGHT},
{"icon6.png", LTR, ACTIVE}}
stock["rox-show-details"] = {{"icon7.png", LTR, NORMAL},
{"icon8.png", LTR, PRELIGHT},
{"icon9.png", LTR, ACTIVE}}
stock["rox-show-hidden"] = {{"icon10.png", LTR, NORMAL},
{"icon11.png", LTR, PRELIGHT},
{"icon12.png", LTR, ACTIVE}}
stock["rox-select"] = {{"icon13.png"}}
stock["gtk-close"] = {{"icon14.png"}} # no different states, only one icon
xthickness = 2
ythickness = 0
GtkButton::inner-border = { 2, 2, 2, 2 }
GtkButton::default-border = { 0, 0, 0, 0 }
GtkToolbar::internal-padding = 3
engine "pixmap"
{
image
{
function = BOX
detail = "toolbar"
file = "somefile-name.png"
border = { 4, 4, 18, 4}
stretch = TRUE
}
image
{
function = BOX
detail = "button"
file = "some-otherfile-name.png"
border = { 4, 4, 18, 4}
stretch = TRUE
}
}
}
widget "rox-filer.GtkVBox.GtkToolbar" style "comb_1"
widget "rox-filer.GtkVBox.GtkToolbar.GtkButton" style "comb_1"
widget "rox-filer.GtkVBox.GtkToolbar.GtkButton.GtkVBox.GtkImage" style "comb_1"
widget "rox-filer.GtkVBox.GtkToolbar.GtkButton.GtkHBox.GtkImage" style "comb_1"
style "comb_2"
{
font_name = "Fjalla One 9"
fg[NORMAL] = "#FFFFFF"
fg[ACTIVE] = "#FFFFFF"
fg[PRELIGHT] = "#FFFFFF"
fg[INSENSITIVE] = "#FFFFFF"
engine "murrine"
{
textstyle = 1
text_shade = 0.01
}
}
widget "rox-filer.GtkVBox.GtkToolbar.GtkButton.GtkVBox.GtkLabel" style "comb_2"
widget "rox-filer.GtkVBox.GtkToolbar.GtkButton.GtkHBox.GtkLabel" style "comb_2"
style "comb_3" # different color for info-text on toolbar
{
font_name = "Fjalla One 9"
fg[NORMAL] = "#FF0000"
engine "murrine"
{
textstyle = 1
text_shade = 0.01
}
}
widget "rox-filer.GtkVBox.GtkToolbar.GtkLabel" style "comb_3" |
--------------------------------------------------------------
5. Toolbar view-details
# toolbar area that appears if details button was clicked
# TODO: no wildcards...
Code: | style "test-5"
{
...example settings
}
widget_class "*ViewDetails*GtkButton" style "test-5"
widget_class "*ViewDetails*GtkButton.*.GtkLabel" style "test-5" |
Example settings:
font_name = "Fjalla One 8" # make it use a smaller font
GtkButton::inner-border = { 6, 6, 2, 2 } # adjust label placement
fg[NORMAL] = "#A0A6AE"
fg[PRELIGHT] = "#FFFFFF"
fg[ACTIVE] = "#0000FF"
engine "pixmap"
{
image
{
function = BOX
file = "anotherfile-name.png"
border = { 1, 1, 1, 1 }
stretch = TRUE
}
}
# can have more states for button, while change of label color may do the trick here..
--------------------------------------------------------------
Now that we have toolbar configured to our likes..
some notes about other rox widgets..
--------------------------------------------------------------
6. ROX window ViewCollection background.
Code: | style "test-6"
{
bg_pixmap[NORMAL] = "some_tile.png" # bg_pixmap to tile in rox window
bg[INSENSITIVE] = "#DFE3E8" # may need adjusting..
fg[NORMAL] = "#000000" #
}
widget_class "<GtkWindow>.<GtkVBox>.<GtkHBox>.<ViewCollection>*" style "test-6" |
--------------------------------------------------------------
7. ROX window scrollbar
Code: | style "test-7"
{
...usual scrollbar settings, for ROX window only, different color/size.. etc.
}
widget "rox-filer*Scrollbar" style "test-7" |
# one may want to set this right after default scrollbar style,
# and it could help if default scrollbar style is defined at "class" level
--------------------------------------------------------------
8. ROX window progressbar
# may appear with multiple-file operations
Code: | style "test-8"
{
... settings for ROX window progressbar only.
}
widget "rox-filer*GtkProgressBar" style "test-8" |
# one may want to set this right after default progressbar style,
# and it could help if default progressbar style is defined at "class" level
--------------------------------------------------------------
9. ROX panel
# there are some who may use it..
Code: | # rox panel border color and background area
style "roxpanel_0"
{
fg[NORMAL] = "#ff0000"
engine "pixmap"
{
image
{
function = FLAT_BOX
file = "panel_tile1.png"
border = { 1, 1, 1, 1 }
stretch = TRUE
}
}
}
widget "rox-panel.GtkAlignment" style "roxpanel_0"
widget "rox-panel.GtkAlignment.GtkViewport" style "roxpanel_0"
# icon(button) background area
style "roxpanel_1"
{
engine "pixmap"
{
image
{
function = FLAT_BOX
state = NORMAL
file = "panel_button_normal.png"
border = { 2, 2, 2, 2 }
stretch = TRUE
}
image
{
function = FLAT_BOX
state = PRELIGHT
file = "panel_button_prelight.png"
border = { 2, 2, 2, 2 }
stretch = TRUE
}
}
}
widget "rox-panel.GtkAlignment.GtkViewport.GtkHBox.GtkHBox.panel-icon" style "roxpanel_1"
widget "rox-panel.GtkAlignment.GtkViewport.GtkVBox.GtkVBox.panel-icon" style "roxpanel_1"
# icon(button) label color, font and shadow
style "roxpanel_text"
{
font_name = "Fjalla One 9"
fg[NORMAL] = "#FF0000"
fg[PRELIGHT] = "#FFFFFF"
engine "murrine"
{
textstyle = 1
text_shade = 0.01
}
}
widget "rox-panel.GtkAlignment.GtkViewport.GtkHBox.GtkHBox.panel-icon.GtkLabel" style "roxpanel_text"
widget "rox-panel.GtkAlignment.GtkViewport.GtkVBox.GtkVBox.panel-icon.GtkLabel" style "roxpanel_text"
# separator ( -ish thing.. ) background
style "roxpanel_2"
{
engine "pixmap"
{
image
{
function = FLAT_BOX
file = "panel_tile3.png"
border = { 1, 1, 1, 1 }
stretch = TRUE
}
}
}
widget "rox-panel.GtkAlignment.GtkViewport.GtkHBox.GtkEventBox" style "roxpanel_2"
widget "rox-panel.GtkAlignment.GtkViewport.GtkVBox.GtkEventBox" style "roxpanel_2" |
--------------------------------------------------------------
10. Custom ROX folders.
It should be well known, then again, I'll point it out here anyway..
Just place some I-like-this-icon-for-mydocuments-folder.png in folder for
what it should appear for, then rename it to .DirIcon there.
It will "disappear" and folder should now be presented with this new icon,
independent from icon theme.
--------------------------------------------------------------
I hope.. it was interesting to read
Description |
scrollbar example for ROX |
Filesize |
140.79 KB |
Viewed |
1786 Time(s) |

|
|
Back to top
|
|
 |
|
Page 1 of 3 [44 Posts] |
Goto page: 1, 2, 3 Next |
|
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
|