Skip to content

Add watchface settings page#87

Draft
dodoradio wants to merge 2 commits into
AsteroidOS:masterfrom
dodoradio:add-watchface-settingspage
Draft

Add watchface settings page#87
dodoradio wants to merge 2 commits into
AsteroidOS:masterfrom
dodoradio:add-watchface-settingspage

Conversation

@dodoradio
Copy link
Copy Markdown
Contributor

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.

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.
IMG_20230521_112308~2

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

dodoradio added 2 commits May 21, 2023 12:14
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.
@dodoradio dodoradio force-pushed the add-watchface-settingspage branch from 8271047 to 5d38d7f Compare May 21, 2023 11:15
Copy link
Copy Markdown
Member

@FlorentRevest FlorentRevest left a comment

Choose a reason for hiding this comment

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

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)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

moWerk added a commit to moWerk/asteroid-settings that referenced this pull request Apr 26, 2026
WatchfaceSettingsContainer presents a watchface settings page alongside
a removal page in a horizontally swipeable ListView with PageDot
indicator. WatchfaceRemovePage provides standalone trash-icon removal
with RemorseTimer, active watchface guard and layerStack navigation.
Pop before model mutation avoids LayerStack destroy-of-undefined crash.

Co-authored-by: Arseniy Movshev <dodoradio@outlook.com>
Closes AsteroidOS#87
moWerk added a commit to moWerk/asteroid-settings that referenced this pull request Apr 27, 2026
WatchfaceSettingsContainer presents watchface settings in a vertical
Flickable with a PageHeader showing the watchface name. A remove
button with trash icon sits below the settings content, triggering an
inline RemorseTimer with active watchface guard and dconf fallback.

WatchfaceRemovePage provides standalone full-page removal for community
watchfaces without settings. Centered trash icon with tap-anywhere
RemorseTimer trigger. Both pages pop via layerStack.pop(currentLayer)
before model mutation to avoid LayerStack destroy-of-undefined crash.

Co-authored-by: Arseniy Movshev <dodoradio@outlook.com>
Closes AsteroidOS#87
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.

2 participants