forked from Blendman974/faceclaw
Phone screen input shows gesture help for wake (and not random other gesture-help)
This commit is contained in:
1 parent
22c31f4240
commit
f01214f4a0
8 files changed
+73
-12
No files matched your search
@@ -1127,8 +1127,14 @@ export class MainViewModel extends RemoteControlsViewModel {
|
||||
return dashboardController.glassesDisplayLabel();
|
||||
}
|
||||
|
||||
protected override get padDisplayAsleep(): boolean {
|
||||
return dashboardController.glassesDisplayAsleep();
|
||||
}
|
||||
|
||||
private refreshPadFocusLine(): void {
|
||||
this.notifyPropertyChange("padFocusLine", this.padFocusLine);
|
||||
this.notifyPropertyChange("padFocusClass", this.padFocusClass);
|
||||
this.notifyPropertyChange("padWakeHintVisibility", this.padWakeHintVisibility);
|
||||
}
|
||||
|
||||
async onPadTap(): Promise<void> {
|
||||
|
||||
@@ -33,6 +33,23 @@ export class RemoteControlsViewModel extends Observable {
|
||||
return this._controlsTab === "ring" ? "tab-button tab-button-selected" : "tab-button";
|
||||
}
|
||||
|
||||
/**
|
||||
* The watch face's status line reads "Display off": dim it and show the wake
|
||||
* gesture under it. The host overrides this and notifies padFocusClass and
|
||||
* padWakeHintVisibility when it changes.
|
||||
*/
|
||||
protected get padDisplayAsleep(): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
get padFocusClass(): string {
|
||||
return this.padDisplayAsleep ? "pad-focus pad-focus-asleep" : "pad-focus";
|
||||
}
|
||||
|
||||
get padWakeHintVisibility(): "visible" | "collapse" {
|
||||
return this.padDisplayAsleep ? "visible" : "collapse";
|
||||
}
|
||||
|
||||
onSettingsTabTap(): void {
|
||||
this.setControlsTab("settings");
|
||||
}
|
||||
|
||||
@@ -104,10 +104,14 @@
|
||||
font-size: 20;
|
||||
color: #ffffff;
|
||||
}
|
||||
.pad-legend {
|
||||
font-size: 11;
|
||||
/* "Display off": dimmed like the dark screen it describes. */
|
||||
.pad-focus-asleep {
|
||||
color: #8a8a8a;
|
||||
margin-bottom: 8;
|
||||
}
|
||||
.pad-wake-hint {
|
||||
font-size: 13;
|
||||
color: #6a6a6a;
|
||||
margin-top: 4;
|
||||
}
|
||||
.action-row {
|
||||
margin-top: 6;
|
||||
|
||||
@@ -52,10 +52,12 @@
|
||||
</StackLayout>
|
||||
|
||||
<!-- Watch tab: centered in the leftover height, capped at the 1.5:1 face
|
||||
aspect (watchFaceWidth = min(available, 1.5 x face height). -->
|
||||
<GridLayout visibility="{{ watchTabVisibility }}" width="{{ watchFaceWidth }}" height="{{ watchFaceHeight }}" horizontalAlignment="center" verticalAlignment="center" class="touchpad" android:tap="{{ onPadTap }}" android:doubleTap="{{ onPadDoubleTap }}" android:longPress="{{ onPadLongPress }}" android:swipe="{{ onPadSwipe }}" touch="{{ onPadTouch }}">
|
||||
<Label isUserInteractionEnabled="false" text="{{ padFocusLine }}" class="pad-focus" horizontalAlignment="center" verticalAlignment="center" />
|
||||
<Label isUserInteractionEnabled="false" text="▲▼ swipe ● select ●● back ‒ menu" class="pad-legend" horizontalAlignment="center" verticalAlignment="bottom" />
|
||||
aspect (watchFaceWidth = min(available, 1.5 x face height). The star
|
||||
rows center the status line, plus the wake hint under it while the
|
||||
display is off (a double-tap is the only gesture that wakes it). -->
|
||||
<GridLayout visibility="{{ watchTabVisibility }}" width="{{ watchFaceWidth }}" height="{{ watchFaceHeight }}" rows="*,auto,auto,*" horizontalAlignment="center" verticalAlignment="center" class="touchpad" android:tap="{{ onPadTap }}" android:doubleTap="{{ onPadDoubleTap }}" android:longPress="{{ onPadLongPress }}" android:swipe="{{ onPadSwipe }}" touch="{{ onPadTouch }}">
|
||||
<Label row="1" isUserInteractionEnabled="false" text="{{ padFocusLine }}" class="{{ padFocusClass }}" horizontalAlignment="center" />
|
||||
<Label row="2" isUserInteractionEnabled="false" text="●● wake" visibility="{{ padWakeHintVisibility }}" class="pad-wake-hint" horizontalAlignment="center" />
|
||||
</GridLayout>
|
||||
|
||||
<!-- Ring tab: a touchpad on the ring's own scheme. Vertical swipes only
|
||||
|
||||
Reference in new issue
Block a user