[GRASSGUI] Re: opacityDialog

Michael Barton michael.barton at asu.edu
Fri May 25 18:55:11 EDT 2007


Martin,


On 5/25/07 6:00 AM, "Martin Landa" <landa.martin at gmail.com> wrote:

> Michael,
> 
> 2007/5/23, Michael Barton <michael.barton at asu.edu>:
>> I did try that and here's why I went to a spinner.
>> 
>> I like sliders. But...the slider looks bad (doesn't format quite right) and
>> takes up a lot of room (at least on my Mac version) when used in a
>> customtreectrl.
>> 
>> I love contextual menus, but strongly resist putting something there that is
>> not also available elsewhere (i.e., with a left mouse click). To do
>> otherwise means that it is visually hidden and the user has to know that it
>> exists a priori in order to use that feature. To the best of my knowledge,
>> this is contrary to standard interface guidelines.
>> 
>> So this would mean putting an 'opacity' popup button somewhere--either in
>> the properties dialog or in the tree item line and then creating a text
>> object that would need to be updated dynamically every time the opacity
>> control is changed. I decided that a spinner was easier to implement than a
>> button and some kind of text that would need to be updated (always tricky).
>> It offers direct user access to the function. You can type or spin, it
>> offers direct user feedback to the state of opacity without any updating
>> code.
> 
> OK, on the other hand I feel wx.SpinCtrl in layer tree as a
> "disturbing" feature. I think there is  place only for 'layer name'
> and checkbox (enable/disable). The widget for setting transparency can
> be hidden somewhere I guess (it is just property of layer). Moreover
> it is sometimes buggy (see the screenshot).

The only controls I can find for interactively changing a variable in a
continuous manner are a spinctrl and a slider. So we are stuck with one or
the other.

I don't see where this is buggy. It might not look as aesthetically pleasing
because the spin control directly follow the text rather than being aligned
at the end. That may (or may not) be fixable. This would apply to any
control placed in the customtreectrl in this way.

While it would not take care of alignment, something that might be more
visually appealing would be a graphical button whose color changes from dark
green (or grey) to white in response to opacity settings. Clicking the
button could bring up a dialog with a slider. However, this would require
considerably more code than simply using a spinctrl in place of a graphical
button. Something to think about though.

> 
> Anyway it would be great to add transparency support to GRASS display
> architecture (then it could be available from d.rast GUI form). (?)
> 

We can simply add this to the form for any command that starts with d.*,
then it would be more like the situation in the current TclTk GUI.

Thinking of this brings us back to more wxPython-based control of rendering.
You mentioned creating a driver. I assume that you are thinking about using
wx.ImageFromStream for a direct wx image driver. Before launching into that,
it would probably be good to redo the compositing in wxPython and not use
g.pnmcomp. I suppose it's doable within wx.Image. This would make it easier
to switch from the PNG driver to a wx driver.

Michael




__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton 




More information about the grass-gui mailing list