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

Todo demo: implement the dialog as a separate window #2094

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

Conversation

ogoffart
Copy link
Member

No description provided.

@ogoffart
Copy link
Member Author

ogoffart commented Jan 20, 2023

Only the Rust part is in this PR, the dialog is still in the todo.slint because of the C++

@ogoffart
Copy link
Member Author

(The problem with this approach is that there is no "modality" concept or window parenting relationship)

Copy link
Member

@tronical tronical left a comment

Choose a reason for hiding this comment

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

Despite the lack of modality, I think this is a good improvement. I'm in favor.

import { StandardButton } from "std-widgets.slint";

component ConfirmDialog inherits Dialog {
confirm_popup_text := Text {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
confirm_popup_text := Text {
Text {

@bjorn
Copy link
Contributor

bjorn commented Nov 28, 2023

I've had rebased this change on master at commit 3deb620 and it seemed to still work quite alright (apart from window parenting, which I think is critical for such a dialog), but somewhere on the road to Slint 1.3 it seems something broke about the window positioning (no longer centered) and size (both the main window and the dialog appear to get a default size from somewhere), so with latest master it looks like this:

image

(and btw, on latest master the existing dialog implementation appears to be non-functional, it's not possible to close the window without marking all as done first, since clicking "Yes" on the pop-up only closes the pop-up)

Compare to this change rebased on 3deb620:

image

While playing around with the todo example I noticed it is also suffering from exceptionally long compile times. This simple app with rather minimal Slint code is taking over 2 minutes to compile on my system! The Rust compiler has to process 15300 lines of generated Rust code...

(I've pushed the rebased patch to bjorn@2504b9f)

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.

None yet

3 participants