Theming Zenity using gtkrc


Pleng

Well-Known Member
Joined
Dec 28, 2006
Messages
3,030
Aninhumer said:
I'm forgetting that we didn't have things like Zenity on the GP2X, and it should make quick interface creation a lot easier.

Having Zenity is a bit of a double-edged sword - yes gui's can be created quickly but they will never be finger-friendly interfaces.
 
Last edited by a moderator:
Pleng said:
Having Zenity is a bit of a double-edged sword - yes gui's can be created quickly but they will never be finger-friendly interfaces.
Perhaps someone could make something like Zenity which is optimised for the Pandora interface?
Make the buttons bigger, support game controls input etc.
 
Last edited by a moderator:
Aninhumer said:
Perhaps someone could make something like Zenity which is optimised for the Pandora interface?
Make the buttons bigger, support game controls input etc.
I think Jeff is creating just this here.
 
Last edited by a moderator:
yea bigger buttons are needed, bigger sliders, larger fonts in text boxes etc. I suppose it's open source? No reason Zenity itself couldn't be altered?
 
Pleng said:
No reason Zenity itself couldn't be altered?
Good luck getting your patch upstream...

EDIT : But it could be altered using the same method someguy99 used here :
http://www.gp32x.de/board/index.php?/topic/53952-guide-changing-the-desktop-icon-text-to-white/
 
Last edited by a moderator:
sebt I would have no idea where to begin updating Zenity and have no idea what patching upstream is anyway!

The problem with the gktrc conf method is that it would increase the size of EVERYTHING. That is, unless Zenity uses creates its widgets with their own class. In which case it's just a case of finding out the class name and yea, updating gtkrc.
 
sebt3 said:
Good luck getting your patch upstream...
It doesn't need to go upstream, we could still include it on the Pandora.
 
Last edited by a moderator:
Pleng said:
sebt I would have no idea where to begin updating Zenity and have no idea what patching upstream is anyway!
If you modify zenity code, you will want to have your new code included in the zenity official code. But the GTK/gnome folks haven't shown to be friendly with these kind of patch, especialy when it come to please a limited portion of their users...

Pleng said:
The problem with the gktrc conf method is that it would increase the size of EVERYTHING. That is, unless Zenity uses creates its widgets with their own class. In which case it's just a case of finding out the class name and yea, updating gtkrc.
I'm no gtk guy myself (well I was back in the days), but the gtk theming system is more powerfull than you seems to think. Here is an example :
http://www.roosmaa.net/making-gtk-scrollbars-more-touchscreen-friendly/
He only change the evince scollbar here.
So changing the size of the Zenity button looks doable this way.
 
Last edited by a moderator:
yes, the configuration you linked to shows that Evince widgets use a custom class:

Code:
widget_class "EvWindow.*.GtkScrolledWindow.*" style "big-scrolls"

what we need to know is if Zenity creates its widgets with a custom class. If it does, we need to know the name of the class. Then we can start working on something. This is going way off topic. Perhaps Mali would like to do his usual thread-splitting magic and put these posts in a thread in Software Hacking? (I'll pm him)
 
Pleng said:
what we need to know is if Zenity creates its widgets with a custom class.
No. "Evwindow." is the window name. So you can match using the widget class and th window name. That will be enough.
You could get the window name any X11 inspection tools (i just cant remember anyt ools name sorry, but xorg ship one for sure)
Or you could just check zenity code that should be pretty simple.


Pleng said:
Perhaps Mali would like to do his usual thread-splitting magic and put these posts in a thread in Software Hacking? (I'll pm him)
Thanks :)
 
Last edited by a moderator:
OK. I wouldn't know where to look for the source, or where in the source I'd find that information.

If somebody else want's to find out then I'll have a go at some customization. No promises on time scales, I'm supposed to be on holiday after all! :)

I think ideally a 'theme' needs to be agreed upon and hopefully included in a hotfix, so that apps can be designed with the new Zenity sizes taken into account.
 
If a new interface is done it should also work well with the D-pad. Not everyone likes mucking up the screen with their fingers or digging out the stylus and poking at the screen to load a game. The current zenity is not very good with a d-pad. It works but is awkward. This should be improved.
 
Dave

I'm a big fan of the dpad too, though I have found myself using the touch screen more than I had imagined I would have. Ideally interfaces should be designed from scratch with both the touch screen and the d-pad taken into account.

Unfortunately there are always going to be quick/dirty ports where devs are going to be using Zenity for speed/ease. The most I can realistically do is make it touch friendly (if somebody can give me the window name of the zenity dialogue). I'm no coding expert so I wouldn't even begin to know how to make it more d-pad friendly, I'm sorry.
 
Pleng, you made me dig way more than I initialy planned... anyway, here is what I have so far :

I found out that zenity is using standard windows, so you can only target these windows.
This will change zenity file chooser but also any file chooser :

Code:
style "big-scrolls" {
GtkRange::stepper-size = 30
GtkRange::slider-width = 30
}
style "big-buttons" {
    xthickness = 20
    GtkButton::default_border         = {30, 3, 30, 3}
    GtkButton::default-outside-border = {3, 3, 30, 3}
font_name = "Luxi Sans Bold Italic 24"

}
style "big-texts" {
font_name = "Luxi Sans Bold Italic 18"
}
widget_class "GtkFileChooserDialog.*.*" style "big-texts"
widget_class "GtkFileChooserDialog.*.GtkScrolledWindow.*" style "big-scrolls"
widget_class "*<GtkFileChooserDialog>*GtkHButtonBox*GtkButton*"               style "big-buttons"

This does look ugly as hell, but it should allow you to experiment and find something usefull for you and anyone.
I don't think this should be part of the default OS or all the guide someguy produced should be too.
But I'll be pleased to read your guide :)
 
Yea that's a problem then, the file chooser as is is probably already the most finger-friendly of the zenity dialogues. It's things like the CPU speed slider and the other configuration dialogues that really need care put into them. I'll try your theme out when I next have my Panda with me, though.
 
Back
Top