-
Notifications
You must be signed in to change notification settings - Fork 43
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
Common widget GzColor (Citadel) #410
Conversation
Signed-off-by: youhy <[email protected]>
Signed-off-by: youhy <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-gui3 #410 +/- ##
=========================================
Coverage 66.10% 66.10%
=========================================
Files 29 29
Lines 3216 3216
=========================================
Hits 2126 2126
Misses 1090 1090 Continue to review full report at Codecov.
|
Signed-off-by: youhy <[email protected]>
Signed-off-by: youhy <[email protected]>
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.
Looking good! Just a few comments
Signed-off-by: youhy <[email protected]>
Signed-off-by: youhy <[email protected]>
Signed-off-by: youhy <[email protected]>
include/ignition/gui/qml/GzColor.qml
Outdated
|
||
|
||
GridLayout { | ||
id: root |
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.
Let's name this to something else like gzColorRoot
for safety
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.
Fix in 8835c72
include/ignition/gui/qml/GzColor.qml
Outdated
property alias b: b_spin.value | ||
property alias a: a_spin.value | ||
|
||
property bool textVisible: false |
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.
nit: textVisible
isn't very descriptive. Can we rename this to showColorText
?
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.
Remove textVisible
in 8835c72
Signed-off-by: youhy <[email protected]>
Signed-off-by: youhy <[email protected]>
Signed-off-by: youhy <[email protected]>
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.
Looks good so far! A couple of things,
Anytime the color dialog is open, this warning appears in the terminal:
Gtk-Message: 11:24:17.963: GtkDialog mapped without a transient parent. This is discouraged.
This happened before anytime the native dialog is used (but doesn't happen with Fortress' material color dialog). It would be nice to resolve it so it doesn't spam the console if a user changes colors often.
Also, when I select a custom color, the color appears twice next to the custom color section:
Signed-off-by: youhy <[email protected]>
I don't have this warning on Ogre but I think I might know how to fix this. An attempt to fix is included in 86d1b1a.
This seems to be a bug of Qt. Even if I use the example code from their official page, this bug still persists. https://doc.qt.io/qt-5/qml-qtquick-dialogs-colordialog.html All the other changes have also been included to commit 86d1b1a |
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.
Thanks for iterating. A few more minor comments.
I don't have this warning on Ogre but I think I might know how to fix this. An attempt to fix is included in 86d1b1a.
I didn't see the attempt to fix the warning. Was it included in that commit? The warning still appears.
Also, when I select a custom color, the color appears twice next to the custom color section
This seems to be a bug of Qt. Even if I use the example code from their official page, this bug still persists. https://doc.qt.io/qt-5/qml-qtquick-dialogs-colordialog.html
I see, it does the same w/o this PR too. Strange, this wasn't an issue before. Anyways, thanks for looking into this
Signed-off-by: youhy <[email protected]>
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.
LGTM, nice work!
Anytime the color dialog is open, this warning appears in the terminal:
Gtk-Message: 11:24:17.963: GtkDialog mapped without a transient parent. This is discouraged.
This message is coming from the OS's native dialog, not from this PR. The fix would be to use Qt's color dialog but there is no way to easily use that through QML currently.
All the requested changes have been made.
New feature
Summary
Pack RGB color GUI into a common widget
GzColorRGB.qml
Replace the color GUI in
Grid3d
with the common widgetTest it
(New)
(Deprecated)
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.