Drawpile icon indicating copy to clipboard operation
Drawpile copied to clipboard

Changing window size adjusts dock length

Open vipperz opened this issue 1 year ago • 3 comments

I've noticed that whenever I try to drag a drawpile window to be smaller and drag it back up to cover the whole screen again, it changes how the docks were. Making some longer or small to the point they're shrunk all the way to where you can't tell where they are. Not sure if this has been brought up before.

https://github.com/user-attachments/assets/5f093678-c299-42f3-826a-244d85fbaba0

On a side note, would be nice to have Navigator, Palettes, and Color Wheel docks to have a limit to how far they can shrink.

vipperz avatar Jul 21 '24 21:07 vipperz

I guess this is arguably a bug, but kinda just how the underlying dock system from Qt works. So unsure if it's something we can actually do anything about.

Giving those docks a non-zero minimum size would definitely make sense though, since they're not useful when you squeeze them into unexistence.

askmeaboutlo0m avatar Jul 21 '24 21:07 askmeaboutlo0m

The mentioned docks now have a larger minimum size so that you can no longer shrink them out of existence, thanks for reporting that.

The thing with the docks is trickier. I looked at Krita, they seem to behave differently, so it may be something we can steal from there.

askmeaboutlo0m avatar Jul 22 '24 09:07 askmeaboutlo0m

Hopefully it won't be too jarring to implement it, if you're able to take it from Krita.

Thank you for the dock size limits. I sort of feel that the size limit for the Wheel is a little too small, but I do understand that screen resolutions come into play. I appreciate all your work!

vipperz avatar Jul 22 '24 18:07 vipperz

I couldn't figure out how Krita does this exactly, but I think I solved it in a reasonable way. The program will now try to remember your "intended" dock layout and restore it when the window resizes. Depending on how you laid your docks out, there can be some weirdness while you're resizing the window where docks shrink smaller and then pop to a bigger size once you hit their minimum size, but I don't think that's a significant enough issue to try and chase it down.

It's available in the continuous release: https://github.com/drawpile/Drawpile/releases/tag/continuous

askmeaboutlo0m avatar Dec 29 '24 13:12 askmeaboutlo0m

There does seem to be some weirdness in the Color Palette getting longer and the Navigator remaining its minimal size when having the window maximized again, but it's not as drastic as it was. Implementing the Reference dock was a very lovely idea that makes the issue less concerning in general, for me at least.

Thank you so much for your work on this!

vipperz avatar Dec 29 '24 20:12 vipperz