Stupid Question Again - Proportional Scaling
Richard Gaskin
ambassador at fourthworld.com
Sun Mar 18 12:57:02 EDT 2018
Peter Reid wrote:
>> I have a sub-stack that contains an image. I want the user to be
>> able to drag the corners and edges of the sub-stack window to make
>> the window and its image larger or smaller, but the window and
>> image must maintain their original aspect ratio ? no stretching,
>> no empty borders etc.
...
> It's a pity that this proved a bit more convoluted than perhaps it
> should have been.
How often do we see apps that constrain window resizing?
There are probably a few, and now one more. But it's not common, and
apparently what few OS APIs may be provided for such hooks aren't easy
to access or at least often used, or we might see more of it.
LC tends to provide easy access to common UI objects and behaviors that
the OSes make easy to use. When we pursue and edge case is where things
get tricky.
If your solution is working well for what you need then it's probably
not worth revisiting the design. But one thing I've learned from my
customers is that they sometimes resize windows for reasons I didn't
anticipate.
As designers, we tend to think of resizing a window as something we do
to view the window's content. In that use case, if the content is
square there's certainly no harm, and perhaps some benefit, in
constraining the user's resize action to keep the window square as well.
But I've found sometimes users resize windows to remove visual clutter
from their desktop. This can result in a window with empty space along
at least two edges if the content within it has no sensible way to make
full use of the window's content region.
Yet in some cases, I have to ask: why not let the user define their own
preferred rect for the window, and I'll do my job of making the interior
fit as usably and attractively as I can within whatever the user wants
to do.
Of course I have no idea what you're building, and there may be some
excellent reasons to constrain the user's resize action.
But if maintaining the image within the window to maximally fit the
window's rect while maintaining its proportions is the goal, a suitably
neutral color filling the card would seem to suffice as at least as well
as whatever clutter may be behind the window outside of its bounds, no?
Certainly simpler to write. :) When I find myself working hard against
the grain of what OSes suggest for common UI elements, sometimes it
helps me pause and reconsider *why* I'm doing that, to see if there's a
more with-the-grain approach the maintains consistency for the user
experience.
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
____________________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list