Draft
Conversation
Signed-off-by: Arseniy Movshev <dodoradio@outlook.com>
This allows the watchface to ship an embedded settings page. To make use of this, watchface qml file must have `property Component settingsPage` referencing the `id` of the `Component` which contains the settings page qml. The watchface page only shows the 'gear' icon when this property is present, which serves as an indicator that the current watchface has a settings page. This can be accessed with another tap. The gear icon appears with a short delay, as the watchface must be loaded before the `settingsPage` property can be checked.
8271047 to
5d38d7f
Compare
Member
FlorentRevest
left a comment
There was a problem hiding this comment.
Approach and code looks fine to me.
Leaving the design review to @eLtMosen
| z: 2 | ||
| visible: !previewPng.previewExists | ||
| active: visible | ||
| active: visible || (watchface === folderModel.folder + "/" + fileName) |
Member
There was a problem hiding this comment.
This watchface === folderModel.folder + "/" + fileName is used quite extensively, maybe we should extract it into a bool property selected so it's easier to understand what it means.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This allows the watchface to ship an embedded settings page.
To make use of this, watchface qml file must have
property Component settingsPagereferencing theidof theComponentwhich contains the settings page qml.The watchface page only shows the 'gear' icon when this property is present, which serves as an indicator that the current watchface has a settings page. This can be accessed with another tap.
The gear icon appears with a short delay, as the watchface must be loaded before the
settingsPageproperty can be checked.an example implementation of such a watchface can be found here: https://dodorad.io/uploads/analog-classy-roman.qml
This also adds the watchface filename to the selector
The visuals of these two commits might need some tweaking. On a first glance, for example, the way that the gear icon and text overlap isn't very pretty.

There is still some discussion about whether this is the best way to implement watchface settings, so this is still a draft for now.