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 Fri 01 Aug 2014, 00:22
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
HowTo: Change appearance of window & controls.?
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [11 Posts]  
Author Message
sunburnt


Joined: 08 Jun 2005
Posts: 5010
Location: Arizona, U.S.A.

PostPosted: Tue 03 Dec 2013, 23:33    Post subject:  HowTo: Change appearance of window & controls.?  

I`ve been told the WM controls the appearance of the windows.

Is this a theme thing.? Or is that just color schemes, etc.?

I want to completely alter the appearance of windows and widgets.
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2226

PostPosted: Wed 04 Dec 2013, 03:16    Post subject:  

The window frame, titlebar and resizebar are all controlled by the wm. Whether it is themeable is up to the particular window manager. Anything inside the window is controlled by the toolkit used -again. themeability is up to the toolkit. Since any given user may not use the same window manager as you, changes to the window itself are outside the scope of a particular program's code. And, since any particular user may use a different toolkit theme than you do, themeing your app is also outside its' scope. Instead of trying to dictate exactly how the app will appear, one should concentrate on making it appear 'OK' under any toolkit, theme or WM. What this means practically, is that one should concentrate on clean design -with just the right amount of 'extras' like separators, outlines, padding and spaces so that it all works well everywhere.

That said, you can go against the rules with some gtk apps by using a specific gtkrc file for the program -although the program must include the ability to specify and use a particular gtkrc file. But, if you give users a purple background with pink letters or other such things and rule out their ability to change those things, then you will not have many users.
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5010
Location: Arizona, U.S.A.

PostPosted: Wed 04 Dec 2013, 12:43    Post subject:  

Very good, thank you for the succinct explanation. It clarifies a lot.
So I need to work on both the WM`s window frame and GTK`s theme.

Buttons are changeable ( seen many different types ), are other widgets too.?
Text areas, scroll sliders, check, radio, and tab panels, usually look the same.
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2226

PostPosted: Wed 04 Dec 2013, 14:38    Post subject:  

"Buttons are changeable ( seen many different types ), are other widgets too.?
Text areas, scroll sliders, check, radio, and tab panels, usually look the same."

They are all themeable under gtk, if you mean those that are not part of the window itself.
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Wed 04 Dec 2013, 16:48    Post subject:  

Dear guys,

Quote:
"Buttons are changeable ( seen many different types ), are other widgets too.?
Text areas, scroll sliders, check, radio, and tab panels, usually look the same."


The last part is patently wrong. All the above elements, and icons, are themeable in GTK and QT. I have done it many times. I have also designed/modded WM themes, which is another kettle of fish. QT4 has an option to use GTK themes, too. Themeing is fun, so just google around a bit. There are also GTK engines for this purpose (GTK2), and GTK3 uses CSS for this purpose.

With kind regards,
vovchik
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5010
Location: Arizona, U.S.A.

PostPosted: Wed 04 Dec 2013, 18:26    Post subject:  

Hi vovchik; What I ment about the appearance is text areas are sunk, scroll has slot, etc.
I know like buttons the scroll puck part is a pix that can be changed ( looked at /theme ).

# Description: I want a simple beveled panel for the window, top bevel is the title bar.
All 4 beveled border surfaces should be sizable. Usually left and right bevels are the same.
Bottom bevel if made wide enough could be merged into any status area.
Ideally increase the resize grab areas from just the edge to the entire quadrant of the window.

I need to know how to draw the beveled panel on the window, or use multiple pix to do it.
I`ve made BaCon draw a number of working widgets on it`s Canvas. So this familiar to me.

Optional popup buttons. Just the scroll puck with no "slot slider area". It`s just screen clutter.
Text appears directly on the window panel, so a transparent text panel area BG,
or BG is the same as the window and text area has no sunk border appearance to it`s panel.
Most of the rest of the widgets are easy enough to modify, tab may be a little tricky.

I noticed Puppy has a JWM theme maker, but looks to be just colors and nothing more.

Need to learn making the PNG pix and coloring them. Is mtPaint good, or perhaps Gimp.?
And how the window and gtk theme`s work. Need to pick a WM, probably LXDE or XFCE.
.
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5010
Location: Arizona, U.S.A.

PostPosted: Thu 05 Dec 2013, 17:55    Post subject:  

Google has taught me that what I want for the window is not possible with "themes".

It looks like gtk might be doable. But it`s global color schemes, not widget by widget.
Some scroll bars have bumped area, if it were made same as window then it`s good.
Text area BG can probably be made the same as the window, but still the border.

I Googled for GTK skins and got what looks like wallpapers.

Found PyWF ( Python Widget Factory ) for drawing widgets ( probably what I`ll have to do...).
.
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4292

PostPosted: Mon 09 Dec 2013, 19:50    Post subject:  

in gtk 1 and 2 almost every widget (including user defined widgets) is themable using a gtkrc file... gtk3 uses some kind of css crap... recent jwm has removed the ability to change the bitmap images for minimize, close and maximize (I posted some decent ones in a thread here if you have a version that can use them) ... I think joe is changing it (may have already) to use full color images
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5010
Location: Arizona, U.S.A.

PostPosted: Mon 09 Dec 2013, 21:11    Post subject:  

Thanks technosaurus; That`s my understanding of it also.
But by "changing the appearance", I mean new widget appearances or "skins".
In looking at most of what I could find about GTK, some widgets ( slider ) have several types.

I want to really change the looks, not just colors. And the window appearance too.
.
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4292

PostPosted: Mon 09 Dec 2013, 21:24    Post subject:  

take a look at /usr/share/themes/Citrus-cut/*

You can override the widgets with custom images...

In my simple icon tray thread, one of my defunct experimental versions used a gtkrc file to change the window background to a stretched image (the window was maximized and stripped of title and border in code to make it the desktop image).

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5010
Location: Arizona, U.S.A.

PostPosted: Mon 09 Dec 2013, 22:18    Post subject:  

Interesting way to take over the desktop. Could have some use for sure.

For the window I`d probably need to draw on a blank X one with XCB.
I want to change it`s border appearance mainly.

The scroll and sliders I want to eliminate the slide areas.
And text areas I want to eliminate the border all together.

I`ll look at /usr/share/themes/Citrus-cut/* UPDATE: Don`t have it in my Precise. I`ll look for it.

Thanks again Techno.
P.S. I liked your thread on populating /dev from /sys, a thought I had too, need to reread it.
.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [11 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
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.0904s ][ Queries: 12 (0.0295s) ][ GZIP on ]