Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Refresh dialogs correctly, fixes #1866 #1931
Refresh dialogs correctly, fixes #1866 #1931
Changes from all commits
0afcea3
fc8854e
822dee2
7414f5b
8ff886f
f9a9ff6
9e6b35a
f34f979
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have removed the part
.Max(obj[3].Size())
because it makes the dialog button ignore the theme change (sizing variables). @andydotxyz do you know if there was a reason to have that part?By removing it, a test image from the color picker changed, however it seems that before this change, that test image was wrong:
Left side is after this change and right side is before this change:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't recall - but this is the change 72cac28
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I see, that change breaks
dialog.NewProgress...
, however:btnMin := obj[3].MinSize().Max(obj[3].Size())
Isn't the above code breaking the principle that objects inside a Layout cannot manipulate manually their size neither their position? @andydotxyz
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I have seen that both
dialog.NewProgress
anddialog.NewProgressInfinite
are deprecated and the message says:// Deprecated: Create a new custom dialog with a widget.ProgressBarInfinite() inside.
So using
dialog.NewCustom
the widget would be inside dialog content and not as a button as it is done currently insidedialog.NewProgress
.However it is still possible to make the dialog.NewProgress looks like before, doing this:
But NewCustom always render a dismiss button, I think there should be a way to tell dialog.NewCustom to not render that button if user does not want it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are describing
widget.NewModalPopUp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I didn't understand, what do you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, what I was meaning is: isn't a dialog with no buttons a modal popup?
I.e. dialogs are dismissable using buttons, to do something that isn't you can show a modal popup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either way, for now perhaps the right thing to do is place a comment next to that line saying "// TODO remove once progress dialogs are gone" - if there is no sensible way to fix the issue with this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the comment in the deprecation should be fixed.
Anyhow, as I am sure you agree, we can't break the feature even if it's deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see, yes you are right.
By doing it, a wrong test image needs to be committed, is that ok?
We could update dialog.NewProgress with the above code, then we don't need to commit wrong test images, while ensuring the same behavior.
Yes, I think.
Completely, agreed.