Just found an instance of resizable sheets on the Mac, and they solved this issue very nicely - they manage the both reposition the sheet as it's resized *and* keep the mouse pointer over the resize handle :)
They do this by resizing the width by 2 pixels for every 1 pixel in x-coordinate change. So if you move the mouse 5 pixels to the right, the sheet becomes 10 pixels wider, and due to the auto-resizing, 5 pixels get allocated to the left, and 5 to the right -- thus keeping the mouse cursor correctly over the resize handle. -R On Tue, Oct 27, 2009 at 9:59 AM, Todd Volkert <[email protected]> wrote: > Noel, if you're working on resizable sheets, the real tricky part is going > to be reconciling the position of the sheet with respect to the mouse cursor > (because the sheet will automatically re-center itself over its owner when > it's resized). > > Usually, when you resize a window, your cursor stays over the resize handle > while you resize the window. But if the window were to reposition itself > underneath you while you were dragging, this would change things -- and make > it fairly confusing for the user. It's almost as if you want the sheet to > hold off on repositioning itself until you release the mouse, and then > transition smoothly to its new position. > > -T > > > On Tue, Oct 27, 2009 at 9:50 AM, Greg Brown <[email protected]> wrote: > >> If the preferred size is not explicitly set, the window is set to its >> default size and we disallow resizing. Otherwise, we allow the user to >> change the size. >> >> We could allow the user to resize the window in either case, but then >> there would be no way for the user to tell the window to revert to its >> automatically calculated preferred size. We could add a button to the window >> trim that supported this, but for now we just disallow resizing in this >> case. >> >> >> On Tuesday, October 27, 2009, at 09:43AM, "Noel Grandin" < >> [email protected]> wrote: >> >Hi >> > >> >I'm looking at resizing support for Sheet, which is so far a pretty >> >copy'n'paste of the code from Frame, but one thing I don't get - the way >> >Pivot handles preferred-size. >> > >> >Why is resizing support on Frame conditional on a preferred-width or a >> >preferred-height being set? >> > >> >Thanks, Noel. >> > >> > >> > >
