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

Fix ordering issues when with_menu(None) is called before setting the window builder #2903

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

ealmloff
Copy link
Member

This example currently shows the default menu even though the menu is explicitly set to None:

use dioxus::{desktop::WindowBuilder, prelude::*};

fn main() {
    let window = WindowBuilder::new()
        .with_always_on_top(false)
        .with_resizable(false)
        .with_title("Marionette");

    let config = dioxus::desktop::Config::new()
        // The menu is set here
        .with_menu(None)
        // But then reset to the default here
        .with_window(window);
    let launcher = LaunchBuilder::new().with_cfg(config);
    launcher.launch(app);
}

fn app() -> Element {
    rsx! {
        "hello world"
    }
}

This PR fixes that issue

@ealmloff ealmloff added bug Something isn't working desktop Suggestions related to the desktop renderer labels Aug 29, 2024
@ealmloff ealmloff merged commit aa0ea44 into DioxusLabs:main Aug 29, 2024
15 checks passed
@ealmloff ealmloff deleted the fix-menu-none-ordering branch August 29, 2024 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working desktop Suggestions related to the desktop renderer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants