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 a way so a slint Window can programmatically be switched to fullscreen-mode. #6665

Open
bennysj opened this issue Oct 27, 2024 · 4 comments · May be fixed by #6931
Open

Implement a way so a slint Window can programmatically be switched to fullscreen-mode. #6665

bennysj opened this issue Oct 27, 2024 · 4 comments · May be fixed by #6931
Labels
a:language-slint Compiler for the .slint language (mO,bF) 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

@bennysj
Copy link

bennysj commented Oct 27, 2024

Implement a way so a slint Window can programmatically be switched to fullscreen-mode.
Ideally this can just be a in-out property on the Window item.

Example:

export component AppTestWindow inherits Window {
    width: 600px;
    height: 500px;
    full-screen: true; // in-out parameter that can possibly be connected to Switch setting or anything else
}

bennysj added a commit to bennysj/slint that referenced this issue Oct 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 slint-ui#6665
@tronical
Copy link
Member

@bennysj
Copy link
Author

bennysj commented Oct 27, 2024

Yes and no, I want an easy way to toggle full-screen mode from the slint code

@tronical
Copy link
Member

I'd say that this is close to "business logic", not sure if intrinsic to the design. Why not define a callback that you can implement and the toggle as needed?

@bennysj
Copy link
Author

bennysj commented Oct 27, 2024

I understand your point. Yes the callback would also work.
I just think it's so much easier to implement the UI-logic if this is exposed in Window component, and just like 'width' 'height' 'visible' etc properties, it makes sense to also have 'full-screen' for the Window component.

@FloVanGH FloVanGH added the need triaging Issue that the owner of the area still need to triage label Oct 28, 2024
@ogoffart ogoffart added enhancement New feature or request a:language-slint Compiler for the .slint language (mO,bF) priority:low Lowest priority. The issue is kept open for tracking purpose, but noone is actively working on this and removed need triaging Issue that the owner of the area still need to triage labels Oct 28, 2024
@bennysj bennysj linked a pull request Nov 27, 2024 that will close this issue
bennysj added a commit to bennysj/slint that referenced this issue Dec 3, 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 slint-ui#6665
bennysj added a commit to bennysj/slint that referenced this issue Dec 3, 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 slint-ui#6665
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:language-slint Compiler for the .slint language (mO,bF) 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