Open Arcnor opened 1 month ago
My assumption is that a
resizeable
"trait" (sorry if that's not the right term!) can be added, similar to themoveable
one.
Yes, that is correct.
I'm working on this.
Ah, then minimize/maximize have to be added.
Implemented now in master
and skia_2024
branches.
I've finally tested this, seems to work mostly ok, although (and talking about the "Child Windows" example) depending on how far into the window the mouse cursor is, it either resizes the window or triggers the scrollbar behavior (when talking about the bottom/right areas) / moves the window (when talking about the top area), but the mouse cursor is still the resize one.
There is probably a difference between the area that triggers the cursor change and the area that actually effects the resizing behavior.
I've finally tested this, seems to work mostly ok, although (and talking about the "Child Windows" example) depending on how far into the window the mouse cursor is, it either resizes the window or triggers the scrollbar behavior (when talking about the bottom/right areas) / moves the window (when talking about the top area), but the mouse cursor is still the resize one.
There is probably a difference between the area that triggers the cursor change and the area that actually effects the resizing behavior.
Right! Good observation. The active areas overlap. What I should do is move the resize area outside the scroll bar's active area. I'll see what I can do!
Try it now. master
and skia_2024
Need more cursors. I added two cursors for the corner sizing (north-to-east and south-to-west) for the Mac, example:
I also fixed the correct "sizing" cursors on the Mac.
If you can add the switches for setting these new cursors for GTK and Windows, that would be great. If not, I'll have this open and get back to it later. See:
void set_cursor(cursor_type type)
in base_view.cpp
Awesome. I actually noticed that corners were missing as well, but didn't want to bother you anymore 🙂.
I'll check and test Windows corner cursors (it's IDC_SIZENWSE
and IDC_SIZENESW
there), will also check GTK docs but not sure I'll be able to test the implementation, will let you know.
So I've implemented and tested Windows, the corner cursor seems to need a bit of tinkering. The area in which the cursor appear seems to be very small, and also the cursor can go from "h cursor" -> "diagonal cursor" -> "h cursor" (for example) when slowly panning the cursor from the right side of the window until you get to the corner. Same with the "v cursor".
As for GTK3 I'm having a bit of a hard time finding the diagonal cursor. I see there should be one on this image (although this might be GTK2?):
However, I can't find any diagonal cursors on the docs: https://docs.gtk.org/gdk3/enum.CursorType.html
So I've implemented and tested Windows, the corner cursor seems to need a bit of tinkering. The area in which the cursor appear seems to be very small, and also the cursor can go from "h cursor" -> "diagonal cursor" -> "h cursor" (for example) when slowly panning the cursor from the right side of the window until you get to the corner. Same with the "v cursor".
For sure. Right now the margin is just 5px. You are welcome to make some adjustments.
Did some refactoring and renames.
I'm going to move this to a feature branch (resizable_window and resizable_window_skia) until it is complete.
Done. This is moved to the resizable_window
and resizable_window_skia
branches now.
Currently child windows cannot be resized, only moved and/or closed. My assumption is that a
resizeable
"trait" (sorry if that's not the right term!) can be added, similar to themoveable
one.