GNOME Bugzilla – Bug 591721
provide a way for all resizable windows to have a resize grip
Last modified: 2010-10-12 22:26:42 UTC
Would be nice for the toolkit to provide a way for all resizable windows to have a resize grip even if they don't need a status bar. And also should advertise whether the window has a resize grip to the window manager so the compositor has the ability to add one if necessary. It seems that OS X already does something like this.
It would probably be possible to move the thing we currently do in GtkStatusBar into GtkWindow itself, so that it can be turned on for every toplevel window. One thing that we would possibly loose is the way in which GtkStatusBar makes sure that an included label is ellipsised _before_ the resize handle, not underneath it. Doing this would also make it easier to do one thing that I've wanted for a long time: hide the resize grip if a window is maximized.
I like the idea because it would let me have a grip in windows without statusbars. What about a style property "resize-grip-extents" to a) allow statusbars and other widgets to take the grip into account b) make the grip bigger in accessible themes c) turn it off if somebody dislikes it.
Created attachment 152801 [details] [review] Really rough first patch This is still missing several edge cases, but just wanted to post a first draft.
Created attachment 170350 [details] [review] Updated patch Updated for git master.
Created attachment 170438 [details] [review] Improved patch This improves a few things, gets rid of hard-coded sizes in favor of letting you configure the resize grip sizes, disables the resize grips if the window maximizes or fullscreens, and changes it so that if you have scrollbars that are right at the edge of the window then they will adjust the positions of the steppers if they intersect with the window grips. Run ./tests/testtreeview to see an example of the steppers auto-adjusting. There is one issue that remains, which wasn't an issue when I originally wrote this against a 2.x branch but came up when I ported it over to git master. If you run ./tests/testtreeview you'll notice that the steppers don't auto-adjust when the window first appears, but they do once you resize the window. If anyone has any ideas why this is happening, let me know. Otherwise I'll try to look into it further later.
Some issues mclasen found in irc: * grips on non-resizable windows * ftl flipping only semi-works (grip flips SW, cursor stays SE) * resizing from SW corner is weird * zorder issue * remove grippy from GtkStatusbar
More notes: * Shape the grip window to restrict the grippy to the drawn triangle * If window is only vertically resizable, show the south cursor.
* draw the grip last, not first.
This work is being continued in the resizegrips branch now. Some issues have been fixed. Some are still to do: - make sure we hide/show the grips as appropriate wrt to the resizable and has-resize-grip properties and the maximized/fullscreen state of the window, and the actual resizability of the window - maybe show a different cursor if the window is only resizable in one direction - remove the statusbar grip - would be nice to make the grip size and shape themable - write api docs and porting guide
This has been merged