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 Mon 29 Aug 2016, 17:49
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Eye Candy
Theme (Gtk-2) features in detail, revisited.
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [13 Posts]  
Author Message
torm


Joined: 07 Mar 2015
Posts: 61

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


Joined: 07 Mar 2015
Posts: 61

PostPosted: 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 Rolling Eyes
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.
ptheme-00.pet
Description  ptheme fix for tahrpup605
pet

 Download 
Filename  ptheme-00.pet 
Filesize  740 Bytes 
Downloaded  2 Time(s) 
xml-info_colors.png
 Description   background color
 Filesize   22.79 KB
 Viewed   38 Time(s)

xml-info_colors.png


Last edited by torm on Sat 27 Aug 2016, 14:22; edited 1 time in total
Back to top
View user's profile Send private message 
torm


Joined: 07 Mar 2015
Posts: 61

PostPosted: 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"
combo-text_color.png
 Description   illustration
 Filesize   11.98 KB
 Viewed   35 Time(s)

combo-text_color.png


Last edited by torm on Sat 27 Aug 2016, 14:25; edited 1 time in total
Back to top
View user's profile Send private message 
torm


Joined: 07 Mar 2015
Posts: 61

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


Joined: 07 Mar 2015
Posts: 61

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


Joined: 07 Mar 2015
Posts: 61

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


Joined: 07 Mar 2015
Posts: 61

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


Joined: 07 Mar 2015
Posts: 61

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


Joined: 07 Mar 2015
Posts: 61

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


Joined: 07 Mar 2015
Posts: 61

PostPosted: 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.
s-shot-theme1.jpg
 Description   preview
 Filesize   46.41 KB
 Viewed   28 Time(s)

s-shot-theme1.jpg

fonts-01.pet
Description  installs fonts to /usr/share/fonts/default/TTF
pet

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

 Download 
Filename  pixmap-industrial-01.pet 
Filesize  26.38 KB 
Downloaded  1 Time(s) 

Last edited by torm on Sat 27 Aug 2016, 14:42; edited 2 times in total
Back to top
View user's profile Send private message 
torm


Joined: 07 Mar 2015
Posts: 61

PostPosted: Wed 21 Oct 2015, 11:24    Post subject:  

(moved here)
Test theme 2 (version -02, 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.
s-shot-theme2.png
 Description   preview
 Filesize   37.25 KB
 Viewed   27 Time(s)

s-shot-theme2.png

gtk2-jwm-wall_v02.pet
Description  Gtk-2 and JWM theme, wallpaper-1024x768
pet

 Download 
Filename  gtk2-jwm-wall_v02.pet 
Filesize  45.88 KB 
Downloaded  4 Time(s) 
murrine32bit.pet
Description  libmurrine.so engine
pet

 Download 
Filename  murrine32bit.pet 
Filesize  61.07 KB 
Downloaded  2 Time(s) 

Last edited by torm on Sat 27 Aug 2016, 14:46; edited 1 time in total
Back to top
View user's profile Send private message 
solo


Joined: 14 Nov 2013
Posts: 374

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


Joined: 07 Mar 2015
Posts: 61

PostPosted: 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.
s-shot-theme3.jpg
 Description   preview
 Filesize   62.41 KB
 Viewed   27 Time(s)

s-shot-theme3.jpg

B3t_test-02.pet
Description  Gtk2 and JWM theme, wallpaper-1024x768
pet

 Download 
Filename  B3t_test-02.pet 
Filesize  166.9 KB 
Downloaded  4 Time(s) 
icons-cursor-02.pet
Description  icons and cursor theme
pet

 Download 
Filename  icons-cursor-02.pet 
Filesize  219.29 KB 
Downloaded  4 Time(s) 
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [13 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Eye Candy
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.0838s ][ Queries: 12 (0.0050s) ][ GZIP on ]