[PD] GUI toolkits and custom GUIs WAS: Integra Live 1.5 released

Hans-Christoph Steiner hans at at.or.at
Fri Jan 18 23:59:24 CET 2013


On 01/18/2013 05:31 PM, Jonathan Wilkes wrote:
> ----- Original Message -----
> 
>> From: Hans-Christoph Steiner <hans at at.or.at>
>> To: pd-list at iem.at
>> Cc: 
>> Sent: Friday, January 18, 2013 4:31 PM
>> Subject: [PD] GUI toolkits and custom GUIs WAS: Integra Live 1.5 released
>>
>> On 01/18/2013 04:14 PM, Jonathan Wilkes wrote:
>>>>  ________________________________
>>>>  From: Leandro da Mota Damasceno <lemota at gmail.com>
>>>>  To: Jonathan Wilkes <jancsika at yahoo.com> 
>>>>  Cc: Pierre-Olivier Boulant <po.boulant at free.fr>; pd-list 
>> <pd-list at iem.at> 
>>>>  Sent: Friday, January 18, 2013 2:40 PM
>>>>  Subject: Re: [PD] [announce] Integra Live 1.5 released
>>>>
>>>>
>>>>  So if we wanted to improve the GUI we would have to drop tcl/tk all 
>> together or make it messy and heavy?
>>>
>>>
>>>  Depends on which features of the interface you want to improve.  Ivica 
>> improved the logic
>>>  that controls when scrollbars appear in a patch in Pd-l2ork, as well as 
>> more efficient
>>>  movement and manipulation of iemguis.  However, stuff like gradients in a 
>> patch, zooming
>>>  on a canvas, better handling of fonts, and many other issues require 
>> "messes" of code.
>>>
>>>  -Jonathan
>>
>> It also depends on what you mean by "improve".  I personally want 
>> Pd's GUI to
>> look and act as native as possible on any given platform, and it turns out
>> that Tk is one of the better GUI toolkits for doing that.  Tk is quite slow
>> for raw drawing, so that's a problem.
> 
> Tk doesn't do that at all in GNU/Linux, as far as I can tell.  That's why that
> gui plugin is called gtk-look, because it looks somewhat like a gtk window but
> does not act like it.  For example: click the File menu, then click it again to
> close it (which is how gtk menus work).  It won't close.  In fact tk menus work
> exactly this way on any distro that uses x11 as its window system, regardless
> of the look-and-feel of the distro.  Controlling/standardizing look-and-feel is
> what every desktop environment and window manager is there to do in the first
> place, even/especially the behemoths like kde and gnome.  Setting aside some
> Gnome 3 ui nonsense, most modern gui toolkits seem to be aware of basic
> common features among them and have "sane" defaults that essentially
> standardize the ux for GNU/Linux users.  Keeping with this example-- clicking
> through a menu in Minitube (built with Qt) is exactly the same experience as
> clicking through a menu in Firefox (probably gtk).  Clicking through a tk menu
> is not the same as these.
> 
> Nor is bringing up a file selection menu.  The length of the full path
> determines the width of the file selection menu ("Open" menu), and the icon to
> climb up one directory is to the RIGHT of this string.  Thus if you start inside a
> directory that has a long path and you want to climb out, say, two levels, each
> time you click the icon the window gets smaller and the icon moves out from under
> your mouse, making it unnecessarily burdensome to quickly climb out to the root
> directory.  The "open" dialogue for Qt and Gtk look exactly the same in Gnome 
> because it is actually the _native_ dialogue for the DE/WM/whatever.
> 
> If the ttk theming engine can be used to change this behavior that'd be great, but
> I couldn't find any documentation that even hints that it does.  In fact on OSX this
> ttk theming engine actually guesses wrong at the bgcolor for a dialog window
> (which took me awhile to figure out with the search plugin).
> 
> Anyway I guess tk was developed at a time when you could actually claim "x" as
> a "platform", but unless you're comfortable using the phrase "information
> superhighway" and putting rainbow dividers on your webpage then "emulating
> motif" shouldn't really count as native look-and-feel.
> 
> -Jonathan 

This is true, but its also much more difficult situation since when you're
talking X11, you're talking GNOME/GTK, KDE/QT, XFCE, OpenBox, Fluxbox, etc.
etc.  So then Pd would have to detect which of those it should look like.
What do you do when someone is running XFCE with GNOME and KDE apps?

One solution is plugins for each of those, then the user can choose.  It would
be great if someone could get Ttk theming working with Pd, here are some tips:
http://blog.ssokolow.com/archives/2011/05/02/making-tk-applications-a-bit-less-ugly/
http://blog.ssokolow.com/archives/2011/10/01/installing-a-new-ttktile-theme/
http://www.ellogon.org/petasis/tcltk-projects/tilegtk

Here's one plugin I use by Lorenzo Sutton, which gives you GTK open and save
panels (muuuch better):
https://puredata.info/downloads/zenity-gtk-open-save

.hc





More information about the Pd-list mailing list