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

Add compact variant for pane grid controls #2555

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

mtkennerly
Copy link
Contributor

Right now, when the pane grid controls would overlap with the title content, we hide the title content altogether. That's good for avoiding visual issues, but can be confusing for a user when the title content is also interactable and disappears when they try to select it. This PR adds an alternative compact variant to the pane grid controls, which allows overlap.

aOyg83AKHX.mp4

@mtkennerly mtkennerly force-pushed the feature/pane-grid-compact-controls branch from 18c0f15 to 3a434c9 Compare August 22, 2024 16:44
@mtkennerly
Copy link
Contributor Author

Not sure what the Mac failure is about. There's no specific error message that I can see:

image

@hecrj hecrj added this to the 0.13 milestone Aug 23, 2024
@hecrj hecrj added feature New feature or request widget layout addition labels Aug 23, 2024
Comment on lines +50 to +59
impl<'a, Message, Theme, Renderer> From<Element<'a, Message, Theme, Renderer>>
for Controls<'a, Message, Theme, Renderer>
where
Theme: container::Catalog,
Renderer: core::Renderer,
{
fn from(value: Element<'a, Message, Theme, Renderer>) -> Self {
Self::new(value)
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Nice. No breaking changes!

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.

The PaneGrid logic is getting quite complicated.

I wonder if at some stage we could make a Controls trait and allow users to fine-tune this kind of logic to their liking. Maybe we can think about that if we ever need further control.

Overall looks good! Let's merge! 🚢

@hecrj hecrj merged commit 84e766f into iced-rs:master Aug 23, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants