Add Store support and unsigned app releases

This commit is contained in:
Tamas Csikel
2026-10-25 14:11:49 +01:00
parent 4975784491
commit d7e9fe4568
157 changed files with 22985 additions and 944 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,92 +0,0 @@
Copyright (c) 2016 The Inter Project Authors (https://github.com/rsms/inter)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION AND CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@@ -3,6 +3,59 @@
export component AppIcon inherits Rectangle {
in property <string> icon;
in property <color> ink: #ffffff;
// Store apps bring their own picture (app.toml: icon = "icon.png").
in property <image> image;
in property <bool> has-image: false;
// No picture and no built-in icon: the app name's first letter.
in property <string> letter;
property <bool> builtin: root.icon == "netflex" || root.icon == "youtube" || root.icon == "airplay" || root.icon == "miracast" || root.icon == "settings" || root.icon == "store" || root.icon == "steam";
if root.has-image: Image {
width: 100%;
height: 100%;
source: root.image;
image-fit: contain;
}
if !root.has-image && !root.builtin: Text {
width: 100%;
height: 100%;
horizontal-alignment: center;
vertical-alignment: center;
text: root.letter;
font-size: root.height * 0.72;
font-weight: 700;
color: root.ink;
}
if root.icon == "store": Rectangle {
// App Store: a shopping bag with a handle.
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M6.5 11h19l-1.4 15a2.5 2.5 0 0 1-2.5 2.3H10.4a2.5 2.5 0 0 1-2.5-2.3z";
fill: @linear-gradient(180deg, #8cc4ff 0%, #3d7fe0 100%);
}
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M11.5 14V9.5a4.5 4.5 0 0 1 9 0V14";
stroke: root.ink;
stroke-width: 2.4px;
stroke-line-cap: round;
}
}
if root.icon == "steam": Rectangle {
// Steam mark: the piston and valve in a disc (Simple Icons, CC0).
Path {
width: 100%; height: 100%;
viewbox-x: -3; viewbox-y: -3;
viewbox-width: 30; viewbox-height: 30;
commands: "M11.979 0C5.678 0 .511 4.86.022 11.037l6.432 2.658c.545-.371 1.203-.59 1.912-.59.063 0 .125.004.188.006l2.861-4.142V8.91c0-2.495 2.028-4.524 4.524-4.524 2.494 0 4.524 2.031 4.524 4.527s-2.03 4.525-4.524 4.525h-.105l-4.076 2.911c0 .052.004.105.004.159 0 1.875-1.515 3.396-3.39 3.396-1.635 0-3.016-1.173-3.331-2.727L.436 15.27C1.862 20.307 6.486 24 11.979 24c6.627 0 11.999-5.373 11.999-12S18.605 0 11.979 0zM7.54 18.21l-1.473-.61c.262.543.714.999 1.314 1.25 1.297.539 2.793-.076 3.332-1.375.263-.63.264-1.319.005-1.949s-.75-1.121-1.377-1.383c-.624-.26-1.29-.249-1.878-.03l1.523.63c.956.4 1.409 1.5 1.009 2.455-.397.957-1.497 1.41-2.454 1.012H7.54zm11.415-9.303c0-1.662-1.353-3.015-3.015-3.015-1.665 0-3.015 1.353-3.015 3.015 0 1.665 1.35 3.015 3.015 3.015 1.663 0 3.015-1.35 3.015-3.015zm-5.273-.005c0-1.252 1.013-2.266 2.265-2.266 1.249 0 2.266 1.014 2.266 2.266 0 1.251-1.017 2.265-2.266 2.265-1.253 0-2.265-1.014-2.265-2.265z";
fill: @linear-gradient(160deg, #ffffff 0%, #c7e4f8 100%);
}
}
if root.icon == "netflex": Rectangle {
// Netflex mark: mirrored "N" in three ribbons (from netflex/apps/web/public/favicon.svg).
@@ -107,7 +160,7 @@ export component AppIcon inherits Rectangle {
}
}
// SmartFox brand mark: a geometric fox head.
// Fennec OS brand mark: a geometric fox head.
export component FoxMark inherits Rectangle {
Path {
width: 100%; height: 100%;
@@ -293,3 +346,273 @@ export component PowerIcon inherits Rectangle {
stroke-line-cap: round;
}
}
export component AudioIcon inherits Rectangle {
in property <color> ink: #ffffff;
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M5 12h6l7-6v20l-7-6H5zM22 12a6 6 0 0 1 0 8M25 8a11 11 0 0 1 0 16";
stroke: root.ink;
stroke-width: 2.2px;
stroke-line-cap: round;
stroke-line-join: round;
}
}
// Siri Remote, front view (status capsule, facts).
export component RemoteIcon inherits Rectangle {
in property <color> ink: #ffffff;
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M12.5 3h7a3 3 0 0 1 3 3v20a3 3 0 0 1-3 3h-7a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3z";
stroke: root.ink;
stroke-width: 2.2px;
stroke-line-join: round;
}
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M12.6 10.5a3.4 3.4 0 1 0 6.8 0a3.4 3.4 0 1 0-6.8 0zM13.5 18.5a1.3 1.3 0 1 0 2.6 0a1.3 1.3 0 1 0-2.6 0zM15.9 18.5a1.3 1.3 0 1 0 2.6 0a1.3 1.3 0 1 0-2.6 0z";
fill: root.ink;
}
}
// Wired network (ethernet plug).
export component WiredIcon inherits Rectangle {
in property <color> ink: #ffffff;
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M9 6h14a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-3v4h-8v-4H9a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2zM16 23v5M12.5 10.5v3M16 10.5v3M19.5 10.5v3";
stroke: root.ink;
stroke-width: 2.2px;
stroke-line-cap: round;
stroke-line-join: round;
}
}
// Cast from a phone: screen with broadcast arcs in the corner.
export component CastIcon inherits Rectangle {
in property <color> ink: #ffffff;
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M4 11V8.5A2.5 2.5 0 0 1 6.5 6h19A2.5 2.5 0 0 1 28 8.5v15a2.5 2.5 0 0 1-2.5 2.5H17M4 16.5a9.5 9.5 0 0 1 9.5 9.5M4 21.5a4.5 4.5 0 0 1 4.5 4.5";
stroke: root.ink;
stroke-width: 2.2px;
stroke-line-cap: round;
stroke-line-join: round;
}
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M3 26a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0-3 0z";
fill: root.ink;
}
}
// Home media server.
export component ServerIcon inherits Rectangle {
in property <color> ink: #ffffff;
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M7 5h18a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2zM7 18h18a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2z";
stroke: root.ink;
stroke-width: 2.2px;
stroke-line-join: round;
}
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M9.5 9.5a1.4 1.4 0 1 0 2.8 0a1.4 1.4 0 1 0-2.8 0zM9.5 22.5a1.4 1.4 0 1 0 2.8 0a1.4 1.4 0 1 0-2.8 0z";
fill: root.ink;
}
}
export component CheckIcon inherits Rectangle {
in property <color> ink: #ffffff;
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M7 16.5l6 6L25.5 10";
stroke: root.ink;
stroke-width: 3px;
stroke-line-cap: round;
stroke-line-join: round;
}
}
export component AlertIcon inherits Rectangle {
in property <color> ink: #ffffff;
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M16 8v10";
stroke: root.ink;
stroke-width: 3px;
stroke-line-cap: round;
}
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M14.2 24a1.8 1.8 0 1 0 3.6 0a1.8 1.8 0 1 0-3.6 0z";
fill: root.ink;
}
}
export component ChevronIcon inherits Rectangle {
in property <color> ink: #ffffff;
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M12 7l9 9-9 9";
stroke: root.ink;
stroke-width: 2.6px;
stroke-line-cap: round;
stroke-line-join: round;
}
}
// Remote buttons in the pairing drawing.
export component BackGlyph inherits Rectangle {
in property <color> ink: #ffffff;
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M19 8l-8 8 8 8";
stroke: root.ink;
stroke-width: 3px;
stroke-line-cap: round;
stroke-line-join: round;
}
}
export component TvGlyph inherits Rectangle {
in property <color> ink: #ffffff;
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M7.5 8h17a1.5 1.5 0 0 1 1.5 1.5v11a1.5 1.5 0 0 1-1.5 1.5h-17A1.5 1.5 0 0 1 6 20.5v-11A1.5 1.5 0 0 1 7.5 8zM12 25.5h8";
stroke: root.ink;
stroke-width: 2.6px;
stroke-line-cap: round;
stroke-line-join: round;
}
}
export component PlayPauseGlyph inherits Rectangle {
in property <color> ink: #ffffff;
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M6 9.5v13l9-6.5z";
fill: root.ink;
}
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M19.5 10v12M25 10v12";
stroke: root.ink;
stroke-width: 2.8px;
stroke-line-cap: round;
}
}
export component MuteGlyph inherits Rectangle {
in property <color> ink: #ffffff;
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M5 12.5h4.5L16 7v18l-6.5-5.5H5z";
fill: root.ink;
}
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M20.5 12.5l7 7M27.5 12.5l-7 7";
stroke: root.ink;
stroke-width: 2.6px;
stroke-line-cap: round;
}
}
export component PlusGlyph inherits Rectangle {
in property <color> ink: #ffffff;
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M16 8v16M8 16h16";
stroke: root.ink;
stroke-width: 3px;
stroke-line-cap: round;
}
}
export component MinusGlyph inherits Rectangle {
in property <color> ink: #ffffff;
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M8 16h16";
stroke: root.ink;
stroke-width: 3px;
stroke-line-cap: round;
}
}
export component PowerGlyph inherits Rectangle {
in property <color> ink: #ffffff;
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M10.3 9.6a9 9 0 1 0 11.4 0M16 5.5v10";
stroke: root.ink;
stroke-width: 3px;
stroke-line-cap: round;
}
}
// One icon by name, for data-driven rows (home screen facts).
export component NamedIcon inherits Rectangle {
in property <string> name;
in property <color> ink: #ffffff;
if root.name == "remote": RemoteIcon { width: 100%; height: 100%; ink: root.ink; }
if root.name == "wifi": WifiIcon { width: 100%; height: 100%; ink: root.ink; }
if root.name == "wired": WiredIcon { width: 100%; height: 100%; ink: root.ink; }
if root.name == "display": DisplayIcon { width: 100%; height: 100%; ink: root.ink; }
if root.name == "cast": CastIcon { width: 100%; height: 100%; ink: root.ink; }
if root.name == "server": ServerIcon { width: 100%; height: 100%; ink: root.ink; }
if root.name == "check": CheckIcon { width: 100%; height: 100%; ink: root.ink; }
if root.name == "alert": AlertIcon { width: 100%; height: 100%; ink: root.ink; }
if root.name == "bluetooth": BluetoothIcon { width: 100%; height: 100%; ink: root.ink; }
}
// Store screen categories (settings.slint NavIcon 5..7).
export component StoreIcon inherits Rectangle {
in property <color> ink: #ffffff;
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M6.5 11h19l-1.4 15a2.5 2.5 0 0 1-2.5 2.3H10.4a2.5 2.5 0 0 1-2.5-2.3zM11.5 14V9.5a4.5 4.5 0 0 1 9 0V14";
stroke: root.ink;
stroke-width: 2.2px;
stroke-line-cap: round;
stroke-line-join: round;
}
}
export component LinkIcon inherits Rectangle {
in property <color> ink: #ffffff;
Path {
width: 100%; height: 100%;
viewbox-width: 32; viewbox-height: 32;
commands: "M14 18a5 5 0 0 0 7.1 0l4-4a5 5 0 0 0-7.1-7.1l-1.5 1.5M18 14a5 5 0 0 0-7.1 0l-4 4a5 5 0 0 0 7.1 7.1l1.5-1.5";
stroke: root.ink;
stroke-width: 2.4px;
stroke-line-cap: round;
stroke-line-join: round;
}
}

View File

@@ -1,7 +1,7 @@
// On-screen keyboard in the tvOS style: one horizontal row of characters,
// the text field above it and the mode chips below.
//
// Drawn inside the settings pane, which stays; the settings content fades out.
// Opens in place of the settings content, which fades out.
// Only text and icons are drawn here. The glass (field, key track, focus lens,
// chips) comes from `keyboard::glass` in Rust, which mirrors the geometry the
// App exports (kb-* properties): keep the two in sync.
@@ -16,7 +16,6 @@ export component KeyboardView inherits Rectangle {
in property <length> pane-y;
in property <length> pane-w;
in property <length> pane-h;
in property <length> back-x;
in property <length> field-x;
in property <length> field-y;
in property <length> field-w;
@@ -50,24 +49,23 @@ export component KeyboardView inherits Rectangle {
// ---- heading ----------------------------------------------------------
Text {
x: root.pane-x;
y: root.pane-y + 58 * root.u;
y: root.pane-y + 88 * root.u;
width: root.pane-w;
horizontal-alignment: center;
text: root.title;
font-family: "Inter Display";
font-weight: 800;
font-size: 46 * root.u;
letter-spacing: -1.2 * root.u;
font-weight: 700;
font-size: 48 * root.u;
letter-spacing: -0.8 * root.u;
color: #ffffff;
overflow: elide;
}
Text {
x: root.pane-x + 80 * root.u;
y: root.pane-y + 128 * root.u;
y: root.pane-y + 160 * root.u;
width: root.pane-w - 160 * root.u;
horizontal-alignment: center;
text: root.subtitle;
font-size: 23 * root.u;
font-size: 24 * root.u;
color: #ffffffa8;
overflow: elide;
}
@@ -114,12 +112,12 @@ export component KeyboardView inherits Rectangle {
}
Text {
x: root.field-x;
y: root.field-y + root.field-h + 18 * root.u;
y: root.field-y + root.field-h + 20 * root.u;
width: root.field-w;
horizontal-alignment: center;
text: root.hint;
font-size: 21 * root.u;
color: root.hint-error ? #ff8278 : #ffffff8c;
font-size: 22 * root.u;
color: root.hint-error ? #ff8278 : #ffffff99;
}
// ---- key row ---------------------------------------------------------------
@@ -175,16 +173,4 @@ export component KeyboardView inherits Rectangle {
: self.f > 0.5 ? #121317 : self.selected ? #ff9a5c : #ffffffc8;
}
Text {
x: root.back-x;
y: root.pane-y + root.pane-h - 92 * root.u;
width: 300 * root.u;
height: 56 * root.u;
horizontal-alignment: center;
vertical-alignment: center;
text: "‹ Mégse · Vissza";
font-size: 21 * root.u;
font-weight: 500;
color: #ffffffc0;
}
}

View File

@@ -1,6 +1,8 @@
// First-run pairing guide for the Apple Siri Remote. The frosted pane behind
// it is drawn by the glass layer (see `glass-over` in app.slint).
import { BackGlyph, TvGlyph, PlayPauseGlyph, MuteGlyph, PlusGlyph, MinusGlyph, PowerGlyph, CheckIcon, AlertIcon } from "icons.slint";
// Pulsing ring that draws the eye to a button.
component Pulse inherits Rectangle {
in property <length> size;
@@ -17,9 +19,12 @@ component Pulse inherits Rectangle {
component RemoteButton inherits Rectangle {
in property <length> u;
// back | tv | playpause | mute | plus
in property <string> glyph;
in property <bool> hot;
in property <color> accent;
property <color> ink: self.hot ? self.accent.brighter(0.5) : #e8e8ea;
property <length> g: 26 * self.u;
width: 52 * self.u;
height: self.width;
border-radius: self.width / 2;
@@ -40,14 +45,11 @@ component RemoteButton inherits Rectangle {
x: (parent.width - self.width) / 2;
y: (parent.height - self.height) / 2;
}
Text {
text: root.glyph;
color: root.hot ? root.accent.brighter(0.5) : #e8e8ea;
font-size: 24 * root.u;
font-weight: 600;
horizontal-alignment: center;
vertical-alignment: center;
}
if root.glyph == "back": BackGlyph { x: (parent.width - self.width) / 2; y: (parent.height - self.height) / 2; width: root.g; height: root.g; ink: root.ink; }
if root.glyph == "tv": TvGlyph { x: (parent.width - self.width) / 2; y: (parent.height - self.height) / 2; width: root.g; height: root.g; ink: root.ink; }
if root.glyph == "playpause": PlayPauseGlyph { x: (parent.width - self.width) / 2; y: (parent.height - self.height) / 2; width: root.g; height: root.g; ink: root.ink; }
if root.glyph == "mute": MuteGlyph { x: (parent.width - self.width) / 2; y: (parent.height - self.height) / 2; width: root.g; height: root.g; ink: root.ink; }
if root.glyph == "plus": PlusGlyph { x: (parent.width - self.width) / 2; y: (parent.height - self.height) / 2; width: root.g; height: root.g; ink: root.ink; }
}
// Apple Siri Remote (2nd gen, aluminium), drawn front-on.
@@ -57,7 +59,9 @@ export component SiriRemote inherits Rectangle {
width: 150 * self.u;
height: 560 * self.u;
border-radius: 44 * self.u;
background: @linear-gradient(90deg, #8d929a 0%, #d9dde2 22%, #f1f3f5 45%, #c6cad0 75%, #959aa2 100%);
background: #c4c8ce;
border-width: 2px;
border-color: #ffffff40;
drop-shadow-blur: 30 * self.u;
drop-shadow-color: #000000a0;
drop-shadow-offset-y: 16 * self.u;
@@ -79,12 +83,12 @@ export component SiriRemote inherits Rectangle {
height: 18 * root.u;
border-radius: self.width / 2;
background: #1b1b1d;
Text {
text: "⏻";
color: #d0d0d4;
font-size: 11 * root.u;
horizontal-alignment: center;
vertical-alignment: center;
PowerGlyph {
x: (parent.width - self.width) / 2;
y: (parent.height - self.height) / 2;
width: 12 * root.u;
height: 12 * root.u;
ink: #d0d0d4;
}
}
// Clickpad: outer touch ring and center.
@@ -118,10 +122,10 @@ export component SiriRemote inherits Rectangle {
// Button grid below the clickpad.
property <length> col1: 18 * root.u;
property <length> col2: root.width - 18 * root.u - 52 * root.u;
RemoteButton { u: root.u; accent: root.accent; x: root.col1; y: 200 * root.u; glyph: "‹"; hot: true; }
RemoteButton { u: root.u; accent: root.accent; x: root.col2; y: 200 * root.u; glyph: "▭"; }
RemoteButton { u: root.u; accent: root.accent; x: root.col1; y: 268 * root.u; glyph: "⏯"; }
RemoteButton { u: root.u; accent: root.accent; x: root.col1; y: 336 * root.u; glyph: "🔇"; }
RemoteButton { u: root.u; accent: root.accent; x: root.col1; y: 200 * root.u; glyph: "back"; hot: true; }
RemoteButton { u: root.u; accent: root.accent; x: root.col2; y: 200 * root.u; glyph: "tv"; }
RemoteButton { u: root.u; accent: root.accent; x: root.col1; y: 268 * root.u; glyph: "playpause"; }
RemoteButton { u: root.u; accent: root.accent; x: root.col1; y: 336 * root.u; glyph: "mute"; }
// Volume rocker: + is the one to hold.
Rectangle {
x: root.col2;
@@ -135,19 +139,16 @@ export component SiriRemote inherits Rectangle {
accent: root.accent;
x: 0;
y: 0;
glyph: "+";
glyph: "plus";
hot: true;
background: transparent;
}
Text {
y: parent.height - 52 * root.u;
width: parent.width;
height: 52 * root.u;
text: "−";
color: #e8e8ea;
font-size: 24 * root.u;
horizontal-alignment: center;
vertical-alignment: center;
MinusGlyph {
x: (parent.width - self.width) / 2;
y: parent.height - 52 * root.u + (52 * root.u - self.height) / 2;
width: 26 * root.u;
height: 26 * root.u;
ink: #e8e8ea;
}
}
}
@@ -157,81 +158,76 @@ component Step inherits Rectangle {
in property <int> n;
in property <string> label;
in property <color> accent;
height: 70 * self.u;
Rectangle {
// The glass bead behind the number is drawn by the glass layer (app.slint),
// on the same 48 px square.
Text {
x: 0;
y: 4 * root.u;
width: 40 * root.u;
height: self.width;
// The glass bead behind the number is drawn by the glass layer (app.slint).
Text {
text: root.n;
color: root.accent.brighter(0.6);
font-size: 20 * root.u;
font-weight: 700;
horizontal-alignment: center;
vertical-alignment: center;
}
y: 0;
width: 48 * root.u;
height: 48 * root.u;
text: root.n;
color: root.accent.brighter(0.6);
font-size: 22 * root.u;
font-weight: 700;
horizontal-alignment: center;
vertical-alignment: center;
}
Text {
x: 60 * root.u;
y: 10 * root.u;
width: parent.width - 60 * root.u;
x: 72 * root.u;
y: 6 * root.u;
width: parent.width - 72 * root.u;
text: root.label;
wrap: word-wrap;
font-size: 24 * root.u;
color: #ffffffd8;
font-size: 26 * root.u;
color: #ffffffe0;
}
}
// Pane content; `state` is the remote status from sf-remote.
// Pane content; `state` is the remote status from sf-remote. The text column
// starts at (content-x, content-y); `steps` and `pill-y` are offsets from
// there, shared with the glass beads and pills in app.slint.
export component PairingGuide inherits Rectangle {
in property <length> u;
in property <string> state;
in property <color> accent: #ff7a35;
in property <length> content-x;
in property <length> content-y;
in property <[length]> steps;
in property <length> pill-y;
property <bool> ok: self.state == "paired" || self.state == "connected";
property <bool> broken: self.state == "no-adapter";
SiriRemote {
u: root.u;
accent: root.accent;
x: 120 * root.u;
x: (root.content-x - self.width) / 2;
y: (parent.height - self.height) / 2;
}
Rectangle {
x: 420 * root.u;
y: 70 * root.u;
width: parent.width - 420 * root.u - 80 * root.u;
height: parent.height - 140 * root.u;
x: root.content-x;
y: root.content-y;
width: parent.width - root.content-x - 88 * root.u;
height: parent.height - root.content-y;
Text {
x: 0;
y: 0;
text: "ELSŐ LÉPÉS";
font-size: 20 * root.u;
font-weight: 600;
letter-spacing: 3 * root.u;
color: root.accent.brighter(0.3);
}
Text {
x: 0;
y: 34 * root.u;
width: parent.width;
text: "Párosítsd a Siri Remote-ot";
wrap: word-wrap;
font-family: "Inter Display";
font-weight: 800;
font-size: 58 * root.u;
letter-spacing: -1.6 * root.u;
font-weight: 700;
font-size: 52 * root.u;
letter-spacing: -1 * root.u;
color: #ffffff;
overflow: elide;
}
Step {
u: root.u;
accent: root.accent;
x: 0;
y: 150 * root.u;
y: root.steps[0];
width: parent.width;
height: 64 * root.u;
n: 1;
label: "Vidd a távirányítót a TV közelébe.";
}
@@ -239,33 +235,34 @@ export component PairingGuide inherits Rectangle {
u: root.u;
accent: root.accent;
x: 0;
y: 226 * root.u;
y: root.steps[1];
width: parent.width;
height: 100 * root.u;
n: 2;
label: "Tartsd nyomva egyszerre a Vissza (‹) és a Hangerő + gombot kb. 5 másodpercig.";
label: "Tartsd nyomva egyszerre a Vissza és a Hangerő + gombot, kb. 5 másodpercig.";
}
Step {
u: root.u;
accent: root.accent;
x: 0;
y: 330 * root.u;
y: root.steps[2];
width: parent.width;
height: 64 * root.u;
n: 3;
label: "Engedd el. A TV magától megtalálja és párosítja.";
}
// Live status.
// Live status, on the glass pill drawn by app.slint (520 x 64).
Rectangle {
x: 0;
y: parent.height - 70 * root.u;
y: root.pill-y;
width: 520 * root.u;
height: 64 * root.u;
// Glass pill (tinted by state) is drawn by the glass layer (app.slint).
// Searching: three breathing dots. Done: check mark. Error: "!".
// Searching: three breathing dots. Done: check mark. Error: alert.
if !root.ok && !root.broken: HorizontalLayout {
x: 26 * root.u;
width: 60 * root.u;
x: 0;
width: 56 * root.u;
spacing: 8 * root.u;
alignment: start;
for i in 3: Rectangle {
@@ -278,41 +275,47 @@ export component PairingGuide inherits Rectangle {
opacity: 0.25 + 0.75 * abs(sin(self.p * 180deg));
}
}
if root.ok || root.broken: Text {
x: 26 * root.u;
width: 40 * root.u;
height: parent.height;
text: root.ok ? "✓" : "!";
color: root.ok ? #34c759 : #ff9f0a;
font-size: 30 * root.u;
font-weight: 800;
vertical-alignment: center;
if root.ok: CheckIcon {
x: 24 * root.u;
y: (parent.height - self.height) / 2;
width: 32 * root.u;
height: 32 * root.u;
ink: #34c759;
}
if root.broken: AlertIcon {
x: 24 * root.u;
y: (parent.height - self.height) / 2;
width: 32 * root.u;
height: 32 * root.u;
ink: #ff9f0a;
}
Text {
x: 92 * root.u;
width: parent.width - 110 * root.u;
x: root.ok || root.broken ? 72 * root.u : 64 * root.u;
width: parent.width - 96 * root.u;
height: parent.height;
vertical-alignment: center;
font-size: 24 * root.u;
font-weight: 500;
color: #ffffff;
text: root.ok ? "Sikeres párosítás!"
overflow: elide;
text: root.ok ? "Sikeres párosítás"
: root.broken ? "Nem található Bluetooth adapter"
: root.state == "pairing" ? "Párosítás…"
: "Távirányító keresése…";
}
}
// Skip chip (glass in app.slint, 200 x 64).
Text {
x: 556 * root.u;
y: parent.height - 68 * root.u;
width: 204 * root.u;
height: 60 * root.u;
x: 544 * root.u;
y: root.pill-y;
width: 200 * root.u;
height: 64 * root.u;
horizontal-alignment: center;
vertical-alignment: center;
text: "Kihagyás · Esc";
font-size: 21 * root.u;
font-weight: 500;
color: #ffffffc0;
text: "Kihagyás";
font-size: 24 * root.u;
font-weight: 600;
color: #ffffffd0;
}
}
}

View File

@@ -1,10 +1,11 @@
// Settings screen: categories on the left, rows on the right.
// Settings screen: categories on the left, the selected page's rows on one
// grouped platter on the right.
//
// Only text and icons are drawn here. The glass (pane, rows, chips) comes from
// `settings_screen::glass` in Rust, which mirrors the geometry below: keep the
// row/nav formulas (position, focus `f`, visibility `vis`) in sync with it.
// Only text and icons are drawn here. The glass (platter, focus pills) comes
// from `settings_screen::glass` in Rust, which mirrors the geometry below: keep
// the row/nav formulas (position, focus `f`, visibility `vis`) in sync with it.
import { WifiIcon, BluetoothIcon, InfoIcon, DisplayIcon, PowerIcon, SignalIcon, LockIcon } from "icons.slint";
import { WifiIcon, BluetoothIcon, InfoIcon, DisplayIcon, AudioIcon, PowerIcon, SignalIcon, LockIcon, ChevronIcon, StoreIcon, CheckIcon, LinkIcon } from "icons.slint";
export struct SettingRow {
title: string,
@@ -22,9 +23,14 @@ component NavIcon inherits Rectangle {
in property <color> ink;
if root.index == 0: DisplayIcon { width: 100%; height: 100%; ink: root.ink; }
if root.index == 1: BluetoothIcon { width: 100%; height: 100%; ink: root.ink; }
if root.index == 2: WifiIcon { width: 100%; height: 100%; ink: root.ink; }
if root.index == 3: PowerIcon { width: 100%; height: 100%; ink: root.ink; }
if root.index == 4: InfoIcon { width: 100%; height: 100%; ink: root.ink; }
if root.index == 2: AudioIcon { width: 100%; height: 100%; ink: root.ink; }
if root.index == 3: WifiIcon { width: 100%; height: 100%; ink: root.ink; }
if root.index == 4: PowerIcon { width: 100%; height: 100%; ink: root.ink; }
if root.index == 5: InfoIcon { width: 100%; height: 100%; ink: root.ink; }
// App Store mode: Felfedezés, Telepítve, Források.
if root.index == 6: StoreIcon { width: 100%; height: 100%; ink: root.ink; }
if root.index == 7: CheckIcon { width: 100%; height: 100%; ink: root.ink; }
if root.index == 8: LinkIcon { width: 100%; height: 100%; ink: root.ink; }
}
export component SettingsView inherits Rectangle {
@@ -52,38 +58,47 @@ export component SettingsView inherits Rectangle {
in property <string> subtitle;
in property <[SettingRow]> rows;
in property <[string]> categories;
// The same pane serves the App Store (app.slint set-mode).
in property <string> heading: "Beállítások";
in property <int> icon-base: 0;
// Row text is inset from the platter edge by the focus pill's margin.
property <length> inset: 8 * root.u;
property <length> pad: 28 * root.u;
// ---- left column ----------------------------------------------------
Text {
x: root.nav-x + 8 * root.u;
y: root.pane-y + 50 * root.u;
text: "Beállítások";
font-family: "Inter Display";
font-weight: 800;
font-size: 50 * root.u;
letter-spacing: -1.5 * root.u;
x: root.nav-x;
y: root.pane-y;
width: root.nav-w;
height: 88 * root.u;
vertical-alignment: center;
text: root.heading;
font-weight: 700;
font-size: 56 * root.u;
letter-spacing: -1 * root.u;
color: #ffffff;
}
for name[i] in root.categories: Rectangle {
property <float> f: max(0, 1 - abs(root.nav-pos - i)) * root.nav-active;
property <float> sel: max(0, 1 - abs(root.nav-pos - i));
property <color> ink: self.f > 0.5 ? #121317 : #ffffff.with-alpha(0.72 + 0.28 * self.sel);
property <color> ink: self.f > 0.5 ? #121317 : #ffffff.with-alpha(0.62 + 0.38 * self.sel);
x: root.nav-x;
y: root.nav-y + i * root.nav-step;
width: root.nav-w;
height: root.nav-h;
NavIcon {
x: 28 * root.u;
x: 24 * root.u;
y: (parent.height - self.height) / 2;
width: 34 * root.u;
height: 34 * root.u;
index: i;
width: 32 * root.u;
height: 32 * root.u;
index: i + root.icon-base;
ink: parent.ink;
}
Text {
x: 82 * root.u;
width: parent.width - 100 * root.u;
x: 76 * root.u;
width: parent.width - 96 * root.u;
height: parent.height;
vertical-alignment: center;
text: name;
@@ -94,46 +109,35 @@ export component SettingsView inherits Rectangle {
}
}
Text {
x: root.nav-x;
y: root.pane-y + root.pane-h - 92 * root.u;
width: 300 * root.u;
height: 56 * root.u;
horizontal-alignment: center;
vertical-alignment: center;
text: "‹ Vissza · Esc";
font-size: 21 * root.u;
font-weight: 500;
color: #ffffffc0;
}
// ---- right column ---------------------------------------------------
Text {
x: root.rows-x + 8 * root.u;
y: root.pane-y + 44 * root.u;
width: root.rows-w - 16 * root.u;
x: root.rows-x + root.inset + root.pad;
y: root.nav-y;
width: root.rows-w - 2 * (root.inset + root.pad);
height: root.nav-h;
vertical-alignment: center;
text: root.title;
font-family: "Inter Display";
font-weight: 800;
font-weight: 700;
font-size: 40 * root.u;
letter-spacing: -1 * root.u;
color: #ffffff;
overflow: elide;
}
Text {
x: root.rows-x + 8 * root.u;
y: root.pane-y + 102 * root.u;
width: root.rows-w - 16 * root.u;
height: 64 * root.u;
x: root.rows-x + root.inset + root.pad;
y: root.nav-y + root.nav-h;
width: root.rows-w - 2 * (root.inset + root.pad);
height: root.rows-y - root.nav-y - root.nav-h - 24 * root.u;
text: root.subtitle;
wrap: word-wrap;
overflow: elide;
font-size: 21 * root.u;
font-size: 24 * root.u;
color: #ffffffa8;
}
for row[j] in root.rows: r := Rectangle {
property <float> f: max(0, 1 - abs(root.row-pos - j)) * root.content-active;
// Focus on this row or the one above hides the hairline between them.
property <float> f-above: max(0, 1 - abs(root.row-pos - (j - 1))) * root.content-active;
property <length> top: root.rows-y + j * root.row-step - root.rows-scroll;
property <float> over: max(root.rows-y - self.top, self.top + root.row-h - (root.rows-y + root.rows-view-h)) / root.row-h;
property <float> vis: clamp(1 - self.over, 0, 1);
@@ -143,17 +147,25 @@ export component SettingsView inherits Rectangle {
property <color> ink-dim: self.hot ? (self.danger ? #ffffffd0 : #121317b0) : #ffffff99;
property <bool> chevron: row.kind == "choice" || row.kind == "device";
property <bool> network: row.kind == "network";
x: root.rows-x;
x: root.rows-x + root.inset;
y: self.top;
width: root.rows-w;
width: root.rows-w - 2 * root.inset;
height: root.row-h;
opacity: self.vis;
visible: self.vis > 0.01;
if j > 0: Rectangle {
x: root.pad;
y: 0;
width: parent.width - 2 * root.pad;
height: 1.5 * root.u;
background: #ffffff1f;
opacity: 1 - clamp(max(r.f, r.f-above) * 2, 0, 1);
}
Text {
x: 30 * root.u;
y: row.detail == "" ? (parent.height - self.height) / 2 : 15 * root.u;
width: parent.width * 0.55;
x: root.pad;
y: row.detail == "" ? (parent.height - self.height) / 2 : 14 * root.u;
width: parent.width * 0.56;
text: row.title;
font-size: 26 * root.u;
font-weight: 600;
@@ -161,45 +173,43 @@ export component SettingsView inherits Rectangle {
overflow: elide;
}
if row.detail != "": Text {
x: 30 * root.u;
y: 51 * root.u;
width: parent.width * 0.55;
x: root.pad;
y: 50 * root.u;
width: parent.width * 0.56;
text: row.detail;
font-size: 19 * root.u;
font-size: 21 * root.u;
color: r.ink-dim;
overflow: elide;
}
Text {
x: parent.width * 0.4;
width: parent.width * 0.6 - (r.network ? 124 : r.chevron ? 64 : 32) * root.u;
width: parent.width * 0.6 - (r.network ? 120 : r.chevron ? 64 : root.pad / root.u) * root.u;
height: parent.height;
horizontal-alignment: right;
vertical-alignment: center;
text: row.value;
font-size: row.kind == "option" ? 30 * root.u : 23 * root.u;
font-size: row.kind == "option" ? 28 * root.u : 24 * root.u;
font-weight: row.kind == "option" ? 700 : 400;
color: row.kind == "option" ? (r.hot ? #121317 : #ff9a5c) : r.ink-dim;
overflow: elide;
}
if r.chevron: Text {
x: parent.width - 50 * root.u;
if r.chevron: ChevronIcon {
x: parent.width - root.pad - self.width + 4 * root.u;
y: (parent.height - self.height) / 2;
width: 24 * root.u;
height: parent.height;
vertical-alignment: center;
text: "›";
font-size: 36 * root.u;
color: r.ink-dim;
height: 24 * root.u;
ink: r.ink-dim;
}
// Wi-Fi network: lock (protected) and signal strength on the right.
if r.network && row.lock: LockIcon {
x: parent.width - 104 * root.u;
x: parent.width - root.pad - 34 * root.u - 16 * root.u - self.width;
y: (parent.height - self.height) / 2;
width: 24 * root.u;
height: 24 * root.u;
ink: r.ink-dim;
}
if r.network: SignalIcon {
x: parent.width - 66 * root.u;
x: parent.width - root.pad - self.width;
y: (parent.height - self.height) / 2;
width: 34 * root.u;
height: 34 * root.u;