Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add a window drag resize task #2642

Merged
merged 3 commits into from
Jan 16, 2025
Merged

feat: add a window drag resize task #2642

merged 3 commits into from
Jan 16, 2025

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!

@@ -1112,7 +1112,7 @@ pub fn native_key_code(
}
}

/// 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