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

Platform specific window options. #1730

Merged

Conversation

casperstorm
Copy link
Member

This PR enables us to add some platform specific window options.
For macOS it means we can set three new variables:

    /// Hides the window title.
    pub title_hidden: bool,
    /// Makes the titlebar transparent and allows the content to appear behind it.
    pub titlebar_transparent: bool,
    /// Makes the window content appear behind the titlebar.
    pub fullsize_content_view: bool,

An example below is shown where all three of the above mentioned variables are enabled:

Settings {
        window: iced::window::Settings {
            platform_specific: iced::window::PlatformSpecific {
                title_hidden: true,
                titlebar_transparent: true,
                fullsize_content_view: true,
            },
            ..Default::default()
        },
    ..Default::default()
}

Screenshot 2023-02-23 at 2 21 16 PM

@hecrj hecrj added feature New feature or request shell labels Feb 23, 2023
@hecrj hecrj added this to the 0.9.0 milestone Feb 23, 2023
src/window/settings.rs Outdated Show resolved Hide resolved
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.

Thank you!

I think we can expose the iced_winit struct directly, since the platform specific settings are already internal details. I did this in the last commit.

@hecrj hecrj force-pushed the feat/platform-specific-window-options branch from bad9520 to 4405a3d Compare March 14, 2023 10:32
@hecrj hecrj enabled auto-merge March 14, 2023 10:32
@hecrj hecrj merged commit d7fffaa into iced-rs:master Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request shell
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants