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

There is transparent part just under menu bar #7730

Open
ierturk opened this issue Feb 24, 2025 · 4 comments
Open

There is transparent part just under menu bar #7730

ierturk opened this issue Feb 24, 2025 · 4 comments
Labels
a:backend-winit Winit backend (mS,mO) a:platform-windows Issue specific to Windows (mT,bS) bug Something isn't working need triaging Issue that the owner of the area still need to triage

Comments

@ierturk
Copy link

ierturk commented Feb 24, 2025

Bug Description

There is transparent part just under menu bar as in the image below

Image

Reproducible Code (if applicable)

use slint::ComponentHandle;
use slint::ModelRc;
use slint::SharedString;
use slint::VecModel;

fn main() {
    let app_window = AppWindow::new().unwrap();

    let items = ["Delta", "Echo", "Foxtrot"];
    let model = VecModel::from_iter(items.iter().copied().map(SharedString::from));
    let model = ModelRc::new(model);
    app_window.set_dynamic_menu_items(model);
    app_window.run().unwrap();
}

slint::slint! {
    import { ComboBox } from "std-widgets.slint";

    export component AppWindow inherits Window {
        in property <[string]> dynamic-menu-items;
        MenuBar {
            Menu {
                title: "Static";
                MenuItem {
                    title: "Alpha";
                }

                MenuItem {
                    title: "Bravo";
                }

                MenuItem {
                    title: "Charlie";
                }
            }

            Menu {
                title: "Dynamic";
                for title in root.dynamic-menu-items: MenuItem {
                    title: title;
                }
            }
        }
    }
}

Environment Details

  • Slint Version: 1.10 / Nightly
  • Platform/OS: Windows 11
  • Programming Language: Rust
  • Backend/Renderer: Default

Product Impact

There is transparent part just under menu bar

@ierturk ierturk added bug Something isn't working need triaging Issue that the owner of the area still need to triage labels Feb 24, 2025
@ogoffart
Copy link
Member

Thanks for the bug report.
I cannot reproduce this bug, running your example on Windows.
Does it always happen as you start the app?

We use the muda crate to show the menu bar on windows, but maybe we're doing something wrong.

@ogoffart ogoffart added a:backend-winit Winit backend (mS,mO) a:platform-windows Issue specific to Windows (mT,bS) labels Feb 25, 2025
@ierturk
Copy link
Author

ierturk commented Feb 25, 2025

Thank you. Yes, this is persistent on my system. The Rust version is rustc 1.84.1 (e71f9a9a9 2025-01-27).
I attached the project

slint-nightly.zip

@tronical
Copy link
Member

I tried this on my Windows 10 installation and it's working as expected. Just cargo run brings it up correctly. Or is there anything else I should try to do to trigger this bug?

@ierturk
Copy link
Author

ierturk commented Feb 26, 2025

I don't know how to reproduce the bug. The cargo run gives the result in the attached image. My system is Windows 11. Do you need extra debug information from the app or system?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:backend-winit Winit backend (mS,mO) a:platform-windows Issue specific to Windows (mT,bS) bug Something isn't working need triaging Issue that the owner of the area still need to triage
Projects
None yet
Development

No branches or pull requests

3 participants