After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 591721 - provide a way for all resizable windows to have a resize grip
provide a way for all resizable windows to have a resize grip
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other All
: Normal enhancement
: 3.0
Assigned To: Cody Russell
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2009-08-13 17:22 UTC by William Jon McCann
Modified: 2010-10-12 22:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Really rough first patch (13.82 KB, patch)
2010-02-02 00:48 UTC, Cody Russell
none Details | Review
Updated patch (13.14 KB, patch)
2010-09-15 15:28 UTC, Cody Russell
none Details | Review
Improved patch (21.65 KB, patch)
2010-09-16 20:18 UTC, Cody Russell
none Details | Review

Description William Jon McCann 2009-08-13 17:22:04 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.
Comment 1 Matthias Clasen 2009-08-13 17:32:00 UTC
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.
Comment 2 Christian Dywan 2009-08-13 21:45:54 UTC
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.
Comment 3 Cody Russell 2010-02-02 00:48:46 UTC
Created attachment 152801 [details] [review]
Really rough first patch

This is still missing several edge cases, but just wanted to post a first draft.
Comment 4 Cody Russell 2010-09-15 15:28:56 UTC
Created attachment 170350 [details] [review]
Updated patch

Updated for git master.
Comment 5 Cody Russell 2010-09-16 20:18:44 UTC
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.
Comment 6 Cody Russell 2010-09-16 21:23:01 UTC
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
Comment 7 Cody Russell 2010-09-16 21:42:25 UTC
More notes:

* Shape the grip window to restrict the grippy to the drawn triangle
* If window is only vertically resizable, show the south cursor.
Comment 8 Cody Russell 2010-09-16 21:43:42 UTC
* draw the grip last, not first.
Comment 9 Matthias Clasen 2010-09-28 10:56:44 UTC
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
Comment 10 Matthias Clasen 2010-10-12 22:26:42 UTC
This has been merged