-
Notifications
You must be signed in to change notification settings - Fork 75
Fixed color selection for map sketching #4274
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
base: master
Are you sure you want to change the base?
Conversation
Withalion
left a comment
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.
Now it's probably a good time to create component out of the solutions in MMSketchesDrawer.qml and MMFormPhotoSketchingPageDialog.qml.
📦 Build Artifacts Ready
|
Withalion
left a comment
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.
There is some additional work that needs to be done before we can proceed further
📦 Build Artifacts Ready
|
Withalion
left a comment
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 much nicer
Side note: I was able to scroll the colors without any issues on android, but it doesn't work at all on desktop.
Withalion
left a comment
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.
Great work!
📦 Build Artifacts Ready
|
| @@ -0,0 +1,30 @@ | |||
| import QtQuick | |||
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.
Missing licence header
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 in other files
| @@ -0,0 +1,30 @@ | |||
| import QtQuick | |||
|
|
|||
| MMRoundButton { | |||
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.
Is there any reason to base this from MMRoundButton? It seems like these two have nothing in common. You are rewriting the whole component here.
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 guess I was the one creating the initial Component and it made more sense in the previous version to modify MMRoundButton instead. As we are creating a new component here yeah it's good point to rebase the component.
| MMRoundButton { | ||
| id: root | ||
|
|
||
| required property color chosenColor |
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.
If the button is chosen or not is defined by the isSelected prop, right? In that case this is just a color, no matter if the button is selected or not.
| required property color chosenColor | |
| required property color buttonColor |
| width: __style.margin48 | ||
| height: __style.margin48 | ||
|
|
||
| color: root.isSelected ? __style.transparentColor : __style.lightGreenColor |
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.
The background color is lightGreen if the button is not selected? 🤔
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.
Yes it creates this slightly visible halo around the button. Important for white and similar colors, which can blend with background.
| MMComponents.MMListSpacer { implicitHeight: __style.margin20 } | ||
|
|
||
| ScrollView { | ||
| MMComponents.MMColorPicker{ |
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.
The width is never defined
| Layout.preferredHeight: scrollRow.height | ||
| Layout.preferredWidth: scrollRow.width |
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.
scrollRow is a nested id inside MMColorPicker. It should not be used outside of its file. Unless I am missing something, the width of the color picker should be set from outside, just like you set maximumWidth.
Modified the components inside the MMSKetchesDrawer.
Below there is the fixed UI:
ScreenRecording_12-22-2025.16-00-28_1.MP4