opacityDialog

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

opacityDialog

Martin Landa
Hi Michael,

maybe it would be better to use for changing layer opacity level
instead of wx.SpinCtrl *wx.Slider*. The attached patch shows one of
the way (not so elegant) how to do it.

Popup Menu -> "Change Opacity" -> opacity ialog

What do you think?

Martin

--
Martin Landa <[hidden email]> * http://gama.fsv.cvut.cz/~landa *

_______________________________________________
grassgui mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/grassgui

opacityDialog.diff (15K) Download Attachment
opacityDialog.png (28K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: opacityDialog

Michael Barton
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.

Michael

On 5/23/07 7:31 AM, "Martin Landa" <[hidden email]> wrote:

> Hi Michael,
>
> maybe it would be better to use for changing layer opacity level
> instead of wx.SpinCtrl *wx.Slider*. The attached patch shows one of
> the way (not so elegant) how to do it.
>
> Popup Menu -> "Change Opacity" -> opacity ialog
>
> What do you think?
>
> Martin

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

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


_______________________________________________
grassgui mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/grassgui
Reply | Threaded
Open this post in threaded view
|

Re: opacityDialog

Martin Landa
Michael,

2007/5/23, Michael Barton <[hidden email]>:

> 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).

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

Martin

--
Martin Landa <[hidden email]> * http://gama.fsv.cvut.cz/~landa *

_______________________________________________
grassgui mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/grassgui

gism-spinctrl.png (23K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: opacityDialog

Michael Barton
Can we wrap it into a properties dialog for d.* commands? (copying Daniel on
this).

Michael




On 5/25/07 6:00 AM, "Martin Landa" <[hidden email]> wrote:

> Michael,
>
> 2007/5/23, Michael Barton <[hidden email]>:
>> 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).
>
> Anyway it would be great to add transparency support to GRASS display
> architecture (then it could be available from d.rast GUI form). (?)
>
> Martin

__________________________________________
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 

_______________________________________________
grassgui mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/grassgui
Reply | Threaded
Open this post in threaded view
|

Re: opacityDialog

Michael Barton
In reply to this post by Martin Landa
Martin,


On 5/25/07 6:00 AM, "Martin Landa" <[hidden email]> wrote:

> Michael,
>
> 2007/5/23, Michael Barton <[hidden email]>:
>> 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 

_______________________________________________
grassgui mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/grassgui
Reply | Threaded
Open this post in threaded view
|

Re: Re: opacityDialog

Glynn Clements

Michael Barton wrote:

> > 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.

As the opacity applies to the way that that command's output is
composited, rather than affecting the command itself, it would make
more sense to base the decision on whether the command is associated
with a layer tree.

--
Glynn Clements <[hidden email]>

_______________________________________________
grassgui mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/grassgui
Reply | Threaded
Open this post in threaded view
|

Re: Re: opacityDialog

Michael Barton
Good point. Hadn't thought of it that way.

Michael


On 5/26/07 12:07 AM, "Glynn Clements" <[hidden email]> wrote:

>
> Michael Barton wrote:
>
>>> 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.
>
> As the opacity applies to the way that that command's output is
> composited, rather than affecting the command itself, it would make
> more sense to base the decision on whether the command is associated
> with a layer tree.

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

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


_______________________________________________
grassgui mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/grassgui