Make the app view fonctional
This commit is contained in:
1 parent
e99e5bf6b4
commit
f6462f05b8
24 files changed
+270
-27
No files matched your search
@@ -0,0 +1,12 @@
|
||||
.pragma library
|
||||
|
||||
// Correspondance des touches de la télécommande Freebox.
|
||||
// Plusieurs codes sont acceptés tant que le mapping exact sur la box n'est pas vérifié.
|
||||
|
||||
function isAccept(key) {
|
||||
return key === Qt.Key_Return || key === Qt.Key_Enter || key === Qt.Key_Select;
|
||||
}
|
||||
|
||||
function isBack(key) {
|
||||
return key === Qt.Key_Back || key === Qt.Key_Escape;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
pragma Singleton
|
||||
import QtQuick 2.5
|
||||
|
||||
// Couleurs, tailles et animations partagées par toute l'application.
|
||||
QtObject {
|
||||
// Couleurs (inspirées de la palette Jellyfin)
|
||||
readonly property color background: "#101010"
|
||||
readonly property color panel: "#000B25"
|
||||
readonly property color surface: "#202020"
|
||||
readonly property color border: "#3A3A3A"
|
||||
readonly property color focusBackground: "#FFFFFF"
|
||||
readonly property color text: "#FFFFFF"
|
||||
readonly property color textMuted: "#A0A0A0"
|
||||
readonly property color textOnFocus: "#101010"
|
||||
readonly property color textOnFocusMuted: "#505050"
|
||||
readonly property color accent: "#00A4DC"
|
||||
readonly property color accentAlt: "#AA5CC3"
|
||||
readonly property color error: "#FF5252"
|
||||
readonly property var avatarColors: ["#AA5CC3", "#00A4DC", "#E67E22", "#27AE60", "#C0392B", "#2C3E50"]
|
||||
|
||||
// Espacements
|
||||
readonly property int pageMargin: 48
|
||||
readonly property int spacingS: 8
|
||||
readonly property int spacingM: 16
|
||||
readonly property int spacingL: 24
|
||||
readonly property int spacingXL: 40
|
||||
|
||||
// Typographie
|
||||
readonly property int fontSmall: 14
|
||||
readonly property int fontBody: 18
|
||||
readonly property int fontTitle: 32
|
||||
readonly property int fontCode: 56
|
||||
|
||||
// Contrôles
|
||||
readonly property int controlHeight: 48
|
||||
readonly property int radius: 6
|
||||
readonly property int animFast: 120
|
||||
|
||||
// Couleur stable dérivée d'un nom (avatars, icônes de serveur).
|
||||
function avatarColor(name) {
|
||||
var hash = 0;
|
||||
for (var i = 0; i < name.length; i++)
|
||||
hash = (hash * 31 + name.charCodeAt(i)) % 100000;
|
||||
return avatarColors[hash % avatarColors.length];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
singleton Theme 1.0 Theme.qml
|
||||
Reference in new issue
Block a user