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

Implement full-screen property for slint Window item #6931

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bennysj
Copy link

@bennysj bennysj commented Nov 27, 2024

Make it possible to programatically to switch to full-screen mode via a new property in the Windows item.
The SLINT_FULLSCREEN environment variable will default set this property to true. However settings this property in the slint code will override the SLINT_FULLSCREEN.

Fixes #6665

Make it possible to programatically to switch to full-screen mode
via a new property in the Windows item.
The SLINT_FULLSCREEN environment variable will default set this
property to true. However settings this property in the slint code
will override the SLINT_FULLSCREEN.

Fixes slint-ui#6665
@CLAassistant
Copy link

CLAassistant commented Nov 27, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@ogoffart ogoffart left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the PR!

Comment on lines +965 to +967
fn init(self: Pin<&Self>, _self_rc: &ItemRc) {
#[cfg(feature = "std")]
self.full_screen.set(std::env::var("SLINT_FULLSCREEN").is_ok());
Copy link
Member

@ogoffart ogoffart Nov 28, 2024

Choose a reason for hiding this comment

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

IIRC, this is called after all properties have been initialized, so that'd overwrite the property set in the .slint file
(But I might remember wrong)

@tronical
Copy link
Member

Looks overall good to me. Two comments:

  • I'd prefer if the gallery example didn't have this switch. Just a thought :)
  • Documentation for this new property is missing.

@tronical tronical added this to the 1.9 milestone Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement a way so a slint Window can programmatically be switched to fullscreen-mode.
4 participants