Skip to content

feat: add a window drag resize task#2642

Merged
hecrj merged 3 commits intoiced-rs:masterfrom
tsuza:master
Jan 16, 2025
Merged

feat: add a window drag resize task#2642
hecrj merged 3 commits intoiced-rs:masterfrom
tsuza:master

Conversation

@tsuza
Copy link
Contributor

@tsuza tsuza commented Oct 16, 2024

When implementing a custom title bar, most things are straight forward: minimizing, maximizing, closing, dragging, and the context menu.
However, there is one small issue: resizing. Since you have to turn off decorations, the border also gets disabled, and there is no easy way to specifically enable that through winit ( afaik ).

This PR exposes winit's drag_resize_window to give an easier time to resize the window, which is especially useful for the case I mentioned above.

Hopefully everything is up to standard!

}

/// Converts some [`UserAttention`] into it's `winit` counterpart.
/// Converts some [`UserAttention`] into its `winit` counterpart.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is technically out of scope, but I noticed this typo so I figured I'd fix it while I'm at it.

Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! Thanks 🥳

I think this may be a good escape hatch for achieving drag resize functionality while we figure out #1542.

@hecrj hecrj enabled auto-merge January 16, 2025 11:20
@hecrj hecrj merged commit 24297c5 into iced-rs:master Jan 16, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

addition feature New feature or request shell

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants