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 Sat 13 Feb 2016, 05:00
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Eye Candy
Theme tips and tricks.
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [12 Posts]  
Author Message
torm


Joined: 07 Mar 2015
Posts: 45

PostPosted: Tue 22 Sep 2015, 10:32    Post subject:  Theme tips and tricks.  

Theme tricks and workarounds in Puppy.

Not a "howto", just few things I've noticed.
Hope it would be interesting reading for anyone who is
adopting 3'rd party themes into Puppy,
or maybe trying to build something new.

If any of the workarounds are causing problems, please correct me.
Or my bad english.. Rolling Eyes

First Gtk-2.0 and dark themes.
Those usually need a bit of adjusting.
Back to top
View user's profile Send private message 
torm


Joined: 07 Mar 2015
Posts: 45

PostPosted: Tue 22 Sep 2015, 10:33    Post subject:  

"xml_info" color.

It gives that beige-ish detail on some notebook text background areas.
A real mystery for anyone not having pTheme on the system.. 8S
Found it discussed also here:
http://www.murga-linux.com/puppy/viewtopic.php?search_id=2123120295&t=94456
For "pixmap" engine it's something like this in
class "GtkNotebook*" style "notebook"
add the following:

image
{
function = BOX
file = "no.png"
border = {0, 0, 0, 0}
stretch = TRUE
}

..where "no.png" is a transparent 2x2 pixmap. Can be any pixmap.
Replaces background.

For murrine, equinox, clearlooks.. no idea. Then..
Locally I addressed the "xml_info" directly, by creating
/root/.config/ptheme/gtkdialog_active
and configured background as fully transparent:
XML_INFO_OPACITY=0.0
so it will not conflict with any theme.
Other than that it's just the same file as "usr/share/ptheme/gtkdialog/Default"
Or maybe it's better to set it alongside the theme, like:
XML_INFO_COLOR1='#DDDDDD'
to make it gray, or whatever color I need and stay on the safe side...
Don't see anything broken but ..who knows, right?
Hope someone can suggest how to address that from within gtkrc with these
engines.. (?)
Back to top
View user's profile Send private message 
torm


Joined: 07 Mar 2015
Posts: 45

PostPosted: Tue 22 Sep 2015, 10:35    Post subject:  

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 (as PRELIGHT state):

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:

style "cbm_presel_item_text"
{
text[NORMAL] = "#00a2ff"
text[PRELIGHT] = "#ffffff"
}
widget_class "*.<GtkComboBox>.<GtkCellView>" style "cbm_presel_item_text"
Back to top
View user's profile Send private message 
torm


Joined: 07 Mar 2015
Posts: 45

PostPosted: Tue 22 Sep 2015, 10:37    Post subject:  

GtkList item text color.

Dark theme and
multiple soundcard wizard
etc..
If the colors are mess ( white letters on white background? )
these can be adjusted. Change colors to whatever looks best.

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"
Back to top
View user's profile Send private message 
torm


Joined: 07 Mar 2015
Posts: 45

PostPosted: Tue 22 Sep 2015, 10:38    Post subject:  

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":

image
{
function = FOCUS
file = "no.png"
border = {0, 0, 0, 0}
stretch = TRUE
}

..will replace the focus that is drawn by the engine.
"no.png" can be just "dummy" transparent 2x2 pixmap in gtk-2.0 dir.

For "murrine" engine in style default, button.. and/or notebook:
focusstyle = 0
..will disable focus drawing.

Adding:
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)
Back to top
View user's profile Send private message 
torm


Joined: 07 Mar 2015
Posts: 45

PostPosted: Tue 22 Sep 2015, 10:39    Post subject:  

In-theme icons.

Any custom Gtk icons can be used to appear with chosen theme only.
Just create "icons" folder inside the theme "gtk-2.0" folder, and place icons there.
Inside "icons" folder create "iconrc" file with a similar text:

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"

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:
include "icons/iconrc"
so that engine would find and use this setting.
To set custom size for the icons, in "gtkrc" file (before any style) add:
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):
gtk-button-images = 0
Back to top
View user's profile Send private message 
torm


Joined: 07 Mar 2015
Posts: 45

PostPosted: Tue 22 Sep 2015, 10:40    Post subject:  

In-theme font.

Can be set in theme "gtkrc" in style "default" with:
font_name="DejaVu Sans 10"
where ten is the size. Changes font for this theme only.
Some wigets can support its own setting. As:

style "menubar"
{
font_name="DejaVu Sans Bold 10"
}
class "GtkMenubar" style "menubar"
class "GtkMenuBar*" style "menubar"
widget_class "*MenuBar.*" style "menubar"

will then set only menubar font to bold (can be also a different font or size),
while leaving all else as is.

Some general use and properly licensed (GPL or compatible)fonts could be
a useful thing ..here?
For gtk.
Or maybe for window managers, panels, wbar, conky, etc..
there should be a stand-alone topic? Mmm.. think I'll have to dig around some first Wink

Edit2:
Fontforge looks interesting, for adding local language(glyphs) support in fonts, etc.
Or one can create just a set of (fixed width or mono-spaced) digits for tray and conky..
PS. To use any other font for JWM tray clock.. it may be good idea to fix the clock area first to some size in .jwmrc-tray setting:
<Clock format="%H:%M" width="64" >PupClockset</Clock>
this way clock area width is reserved to 64, no matter what size or type of font is used.
Once there.. I also added after the clock setting:
<TrayButton popup="Leave" icon="/usr/local/lib/X11/someFile.png" >exec:/usr/sbin/logout_gui</TrayButton>
so that there will be a small power-off button placed at the right end of the panel.. (there can be a different log-out app for other Puppy versions, and use a real icon.. Wink )

Last edited by torm on Wed 14 Oct 2015, 07:05; edited 2 times in total
Back to top
View user's profile Send private message 
torm


Joined: 07 Mar 2015
Posts: 45

PostPosted: Tue 22 Sep 2015, 10:41    Post subject:  

Any tips and tricks for ..Office, Mozilla, VLC.. please share them
and links to similar existing posts or (sub-)topics are welcome.
Wink
Back to top
View user's profile Send private message 
torm


Joined: 07 Mar 2015
Posts: 45

PostPosted: Wed 14 Oct 2015, 07:12    Post subject:  

SVG colors and dark theme panel.

If some of the (preinstalled) svg icons are just too dark to be visible,
locate the svg icon (somewhere in usr/share/pixmaps/..) and open it with Geany text-editor.
For example I open "audio-volume-low.svg" in usr/share/retrovol/images

<?xml version="1.0" encoding="UTF-8"?>
<svg height="100" width="100" version="1.0">
<polygon
points="10 60, 10 40, 20 40, 40 25, 40 75, 20 60, 10 60"
style="fill: black; fill-opacity: 0.5; stroke: black;
stroke-width: 2;"/>
<path d="m 55,27 c 24,23 0,48 0,48" style="fill:none;stroke:#000000;stroke-width:7"/>
</svg>

..where "fill:" will define the inside area and "stroke:" the outline.
Transparency will be defined by "fill-opacity:" within 0.0 and 1.0, I think.. Confused
Geany has "Color chooser" on the toolbar, so if the theme has more complex colors than "black, white, gray.." choose some HTML color there. (just click on the color-wheel and copy/replace the color name, like #0000FF for blue..)
When in doupt, work with the copy.(if right-clicked for Rox-menu ->Display ->Show thumbnails then Rox will preview the results in that folder as a scaled thumbnails, once saved..)
Back to top
View user's profile Send private message 
torm


Joined: 07 Mar 2015
Posts: 45

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

Gtk 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..):
    adwaita (libadwaita.so 9644B) limited set of features for adwaita theme
    aurora (libaurora.so 96K) more or less comlete..
    clearlooks (libclearlooks.so 153K) multiple subthemes, full engine
    crux-engine (libcrux-engine.so 51K) an old, full engine
    equinox (libequinox.so 135K, libequinox.la 1105B) new engine from EDE
    glide (libglide.so 68K) full engine (not GLADE!)
    hcengine (libhcengine.so 47K) high contrast engine
    ia_ora (libia_ora.so 70K) some themes use that... ? fixme?
    industrial (libindustrial.so 47K) simple engine with rounded corners
    luaengine (libluaengine.so 181K) uses lua scripts for configuration..
    mist (libmist.so 41K) an old full engine
    murrine (libmurrine.so 199K) full engine with configurable features
    nodoka (libnodoka.so 79K) more or less comlete..
    redmond95 (libredmond95.so 51K) an old full engine
    smooth (libsmooth.so 197K) (more info needed on thatone..) fixme?
    svg (libsvg.so 36K, libsvg.la 1716B) uses svg pixmaps
    thinice (libthinice.so 43K) an old full engine
    ubuntulooks (libubuntulooks.so 71K, libubuntulooks.la 1496B) fork of clearlooks

...
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 are not 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 Wed 21 Oct 2015, 11:26; edited 1 time in total
Back to top
View user's profile Send private message 
torm


Joined: 07 Mar 2015
Posts: 45

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

Engine defaults.

To see what the engine looks like "as-is", without any custom settings..
Create folder MyTest_00 (any name without spaces in it) in:
/usr/share/themes/
inside MyTest_00, create folder named:
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..
Back to top
View user's profile Send private message 
solo


Joined: 14 Nov 2013
Posts: 295

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 
Display posts from previous:   Sort by:   
Page 1 of 1 [12 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: 1.5663s ][ Queries: 11 (1.2917s) ][ GZIP on ]