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

Ability to configure minimize/maximize/restore buttons #6669

Open
TheColorRed opened this issue Oct 28, 2024 · 2 comments · May be fixed by #6675
Open

Ability to configure minimize/maximize/restore buttons #6669

TheColorRed opened this issue Oct 28, 2024 · 2 comments · May be fixed by #6675
Labels
api Changes or additions to APIs enhancement New feature or request priority:low Lowest priority. The issue is kept open for tracking purpose, but noone is actively working on this

Comments

@TheColorRed
Copy link
Contributor

TheColorRed commented Oct 28, 2024

When creating a window, I would like to be able to do the following to the window:

  • Remove the minimize button
  • Remove the maximize/restore button
  • Don't allow the user to interact with other windows until the dialog is closed (unless the dialog opens another dialog).

These are common features of windows in applications. Currently you can only force the window to be on top, but these additional features would be helpful.

In this pseudo code, I would make the app the parent by passing the app to the .set_parent() (or whatever it would be called). You may not even need to pass the app to the function but I don't really know. Then there would also be functions to enable/disable the minimize/maximize buttons:

export component MyDialog inherits Window {}
fn main() {
  let app = MainWIndow::new();

  app.on_open_dialog(move || {
    let win = MyDialog::new().unwrap();
    win.set_minimizable(false);
    win.set_maximizable(false);
    win.set_parent(app);
    win.show();
  });

  app.run();
}
@Enyium
Copy link
Contributor

Enyium commented Oct 28, 2024

I proposed the latter in #6607.

The button issue is supported in winit through its WindowButtons type and the APIs that use it, which Slint could make use of. The Window component also has the no-frame property. I think customizability support for these window buttons should also be realized using properties, which Slint's Dialog component, that seems to inherit Window, could use to hide some buttons by default.

@FloVanGH FloVanGH added the need triaging Issue that the owner of the area still need to triage label Oct 28, 2024
@ogoffart ogoffart changed the title Windows that don't have minimize/maximize/restore buttons and disable interacting with parent window Ability to configure minimize/maximize/restore buttons Oct 28, 2024
@ogoffart
Copy link
Member

Modal dialog is already tracked in #6607
I'm going to keep this issue for adding ability to configure the title bar buttons.

@ogoffart ogoffart added enhancement New feature or request priority:low Lowest priority. The issue is kept open for tracking purpose, but noone is actively working on this api Changes or additions to APIs and removed need triaging Issue that the owner of the area still need to triage labels Oct 28, 2024
@TheColorRed TheColorRed linked a pull request Oct 31, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Changes or additions to APIs enhancement New feature or request priority:low Lowest priority. The issue is kept open for tracking purpose, but noone is actively working on this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants