mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Init with colour sliders in approx position
This commit is contained in:
@@ -402,13 +402,13 @@ fn decode_hex(s: &str) -> RgbaColor<u8> {
|
|||||||
.collect();
|
.collect();
|
||||||
RgbaColor {
|
RgbaColor {
|
||||||
alpha: 255,
|
alpha: 255,
|
||||||
red: *c.get(0).unwrap_or(&255),
|
red: *c.first().unwrap_or(&255),
|
||||||
green: *c.get(1).unwrap_or(&128),
|
green: *c.get(1).unwrap_or(&128),
|
||||||
blue: *c.get(2).unwrap_or(&32),
|
blue: *c.get(2).unwrap_or(&32),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn _rgb_hi(colour: Color) -> (f32, f32) {
|
fn rgb_hi(colour: Color) -> (f32, f32) {
|
||||||
let c1: RgbaColor<f32> = RgbaColor::from(colour);
|
let c1: RgbaColor<f32> = RgbaColor::from(colour);
|
||||||
let r = c1.red / 255.0;
|
let r = c1.red / 255.0;
|
||||||
let g = c1.green / 255.0;
|
let g = c1.green / 255.0;
|
||||||
@@ -431,7 +431,7 @@ fn _rgb_hi(colour: Color) -> (f32, f32) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
let h2 = ((h * 60.0) + 360.0) % 360.0;
|
let h2 = ((h * 60.0) + 360.0) % 360.0;
|
||||||
let i = 0.2126 * c1.red + 0.7152 * c1.green + 0.0722 * c1.blue;
|
let i = 0.299 * c1.red + 0.587 * c1.green + 0.114 * c1.blue;
|
||||||
|
|
||||||
(h2, i)
|
(h2, i)
|
||||||
}
|
}
|
||||||
@@ -469,6 +469,9 @@ fn setup_aura_page(ui: &MainWindow, _states: Arc<Mutex<Config>>) {
|
|||||||
ui.global::<AuraPageData>()
|
ui.global::<AuraPageData>()
|
||||||
.on_set_hex_to_colour(|s| decode_hex(s.as_str()).into());
|
.on_set_hex_to_colour(|s| decode_hex(s.as_str()).into());
|
||||||
|
|
||||||
|
ui.global::<AuraPageData>().on_set_hue(|c| rgb_hi(c).0);
|
||||||
|
ui.global::<AuraPageData>().on_set_bright(|c| rgb_hi(c).1);
|
||||||
|
|
||||||
let handle = ui.as_weak();
|
let handle = ui.as_weak();
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
let conn = zbus::Connection::system().await.unwrap();
|
let conn = zbus::Connection::system().await.unwrap();
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"POT-Creation-Date: 2024-03-02 10:44+0000\n"
|
"POT-Creation-Date: 2024-03-02 23:56+0000\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@@ -12,6 +12,41 @@ msgstr ""
|
|||||||
"Language: \n"
|
"Language: \n"
|
||||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||||
|
|
||||||
|
#: rog-control-center/ui/main_window.slint:38
|
||||||
|
msgctxt "MainWindow"
|
||||||
|
msgid "ROG"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/main_window.slint:40
|
||||||
|
msgctxt "Menu1"
|
||||||
|
msgid "System Control"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/main_window.slint:41
|
||||||
|
msgctxt "Menu2"
|
||||||
|
msgid "Keyboard Aura"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/main_window.slint:42
|
||||||
|
msgctxt "Menu3"
|
||||||
|
msgid "AniMe Matrix"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/main_window.slint:43
|
||||||
|
msgctxt "Menu4"
|
||||||
|
msgid "Fan Curves"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/main_window.slint:44
|
||||||
|
msgctxt "Menu5"
|
||||||
|
msgid "App Settings"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/main_window.slint:45
|
||||||
|
msgctxt "Menu6"
|
||||||
|
msgid "About"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/anime.slint:7
|
#: rog-control-center/ui/pages/anime.slint:7
|
||||||
msgctxt "Anime Brightness"
|
msgctxt "Anime Brightness"
|
||||||
msgid "Off"
|
msgid "Off"
|
||||||
@@ -32,111 +67,131 @@ msgctxt "Anime Brightness"
|
|||||||
msgid "High"
|
msgid "High"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/anime.slint:30
|
#: rog-control-center/ui/pages/anime.slint:24
|
||||||
msgctxt "AnimePageData"
|
msgctxt "AnimePageData"
|
||||||
msgid "Glitch Construction"
|
msgid "Glitch Construction"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/anime.slint:30
|
#: rog-control-center/ui/pages/anime.slint:24
|
||||||
msgctxt "AnimePageData"
|
msgctxt "AnimePageData"
|
||||||
msgid "Static Emergence"
|
msgid "Static Emergence"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/anime.slint:32
|
#: rog-control-center/ui/pages/anime.slint:26
|
||||||
msgctxt "AnimePageData"
|
msgctxt "AnimePageData"
|
||||||
msgid "Binary Banner Scroll"
|
msgid "Binary Banner Scroll"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/anime.slint:32
|
#: rog-control-center/ui/pages/anime.slint:26
|
||||||
msgctxt "AnimePageData"
|
msgctxt "AnimePageData"
|
||||||
msgid "Rog Logo Glitch"
|
msgid "Rog Logo Glitch"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/anime.slint:34
|
#: rog-control-center/ui/pages/anime.slint:28
|
||||||
msgctxt "AnimePageData"
|
msgctxt "AnimePageData"
|
||||||
msgid "Banner Swipe"
|
msgid "Banner Swipe"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/anime.slint:34
|
#: rog-control-center/ui/pages/anime.slint:28
|
||||||
msgctxt "AnimePageData"
|
msgctxt "AnimePageData"
|
||||||
msgid "Starfield"
|
msgid "Starfield"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/anime.slint:36
|
#: rog-control-center/ui/pages/anime.slint:30
|
||||||
msgctxt "AnimePageData"
|
msgctxt "AnimePageData"
|
||||||
msgid "Glitch Out"
|
msgid "Glitch Out"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/anime.slint:36
|
#: rog-control-center/ui/pages/anime.slint:30
|
||||||
msgctxt "AnimePageData"
|
msgctxt "AnimePageData"
|
||||||
msgid "See Ya"
|
msgid "See Ya"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/anime.slint:58
|
#: rog-control-center/ui/pages/anime.slint:51
|
||||||
msgctxt "Anime Brightness"
|
msgctxt "Anime Brightness"
|
||||||
msgid "Brightness"
|
msgid "Brightness"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/anime.slint:74
|
#: rog-control-center/ui/pages/anime.slint:67
|
||||||
msgctxt "PageAnime"
|
msgctxt "PageAnime"
|
||||||
msgid "Enable display"
|
msgid "Enable display"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/anime.slint:82 rog-control-center/ui/pages/anime.slint:105
|
#: rog-control-center/ui/pages/anime.slint:75 rog-control-center/ui/pages/anime.slint:98
|
||||||
msgctxt "PageAnime"
|
msgctxt "PageAnime"
|
||||||
msgid "Advanced"
|
msgid "Advanced"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/anime.slint:97
|
#: rog-control-center/ui/pages/anime.slint:90
|
||||||
msgctxt "PageAnime"
|
msgctxt "PageAnime"
|
||||||
msgid "Use built-in animations"
|
msgid "Use built-in animations"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/anime.slint:155
|
#: rog-control-center/ui/pages/anime.slint:147
|
||||||
msgctxt "PageAnime"
|
msgctxt "PageAnime"
|
||||||
msgid "Advanced Anime Display : TODO!"
|
msgid "Advanced Anime Display : TODO!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/anime.slint:159
|
#: rog-control-center/ui/pages/anime.slint:151
|
||||||
msgctxt "Anime built-in selection"
|
msgctxt "Anime built-in selection"
|
||||||
msgid "Boot Animation"
|
msgid "Boot Animation"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/anime.slint:169
|
#: rog-control-center/ui/pages/anime.slint:161
|
||||||
msgctxt "Anime built-in selection"
|
msgctxt "Anime built-in selection"
|
||||||
msgid "Running Animation"
|
msgid "Running Animation"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/anime.slint:179
|
#: rog-control-center/ui/pages/anime.slint:171
|
||||||
msgctxt "Anime built-in selection"
|
msgctxt "Anime built-in selection"
|
||||||
msgid "Sleep Animation"
|
msgid "Sleep Animation"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/anime.slint:189
|
#: rog-control-center/ui/pages/anime.slint:181
|
||||||
msgctxt "Anime built-in selection"
|
msgctxt "Anime built-in selection"
|
||||||
msgid "Shutdown Animation"
|
msgid "Shutdown Animation"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/anime.slint:230
|
#: rog-control-center/ui/pages/anime.slint:221
|
||||||
msgctxt "PageAnime"
|
msgctxt "PageAnime"
|
||||||
msgid "Advanced Display Settings"
|
msgid "Advanced Display Settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/anime.slint:235
|
#: rog-control-center/ui/pages/anime.slint:226
|
||||||
msgctxt "PageAnime"
|
msgctxt "PageAnime"
|
||||||
msgid "Off when lid closed"
|
msgid "Off when lid closed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/anime.slint:244
|
#: rog-control-center/ui/pages/anime.slint:235
|
||||||
msgctxt "PageAnime"
|
msgctxt "PageAnime"
|
||||||
msgid "Off when suspended"
|
msgid "Off when suspended"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/anime.slint:253
|
#: rog-control-center/ui/pages/anime.slint:244
|
||||||
msgctxt "PageAnime"
|
msgctxt "PageAnime"
|
||||||
msgid "Off when on battery"
|
msgid "Off when on battery"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/pages/app_settings.slint:29
|
||||||
|
msgctxt "PageAppSettings"
|
||||||
|
msgid "Run in background after closing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/pages/app_settings.slint:38
|
||||||
|
msgctxt "PageAppSettings"
|
||||||
|
msgid "Start app in background (UI closed)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/pages/app_settings.slint:50
|
||||||
|
msgctxt "PageAppSettings"
|
||||||
|
msgid "Enable system tray icon"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/pages/app_settings.slint:59
|
||||||
|
msgctxt "PageAppSettings"
|
||||||
|
msgid "Enable change notifications"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:24
|
#: rog-control-center/ui/pages/aura.slint:24
|
||||||
msgctxt "Aura brightness"
|
msgctxt "Aura brightness"
|
||||||
msgid "Off"
|
msgid "Off"
|
||||||
@@ -157,383 +212,328 @@ msgctxt "Aura brightness"
|
|||||||
msgid "High"
|
msgid "High"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:33 rog-control-center/ui/pages/aura.slint:48
|
#: rog-control-center/ui/pages/aura.slint:32 rog-control-center/ui/pages/aura.slint:47
|
||||||
msgctxt "Basic aura mode"
|
msgctxt "Basic aura mode"
|
||||||
msgid "Static"
|
msgid "Static"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:34 rog-control-center/ui/pages/aura.slint:49
|
#: rog-control-center/ui/pages/aura.slint:33 rog-control-center/ui/pages/aura.slint:48
|
||||||
msgctxt "Basic aura mode"
|
msgctxt "Basic aura mode"
|
||||||
msgid "Breathe"
|
msgid "Breathe"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:35 rog-control-center/ui/pages/aura.slint:50
|
#: rog-control-center/ui/pages/aura.slint:34 rog-control-center/ui/pages/aura.slint:49
|
||||||
msgctxt "Basic aura mode"
|
msgctxt "Basic aura mode"
|
||||||
msgid "Strobe"
|
msgid "Strobe"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:36
|
#: rog-control-center/ui/pages/aura.slint:35
|
||||||
msgctxt "Basic aura mode"
|
msgctxt "Basic aura mode"
|
||||||
msgid "Rainbow"
|
msgid "Rainbow"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:37
|
#: rog-control-center/ui/pages/aura.slint:36
|
||||||
msgctxt "Basic aura mode"
|
msgctxt "Basic aura mode"
|
||||||
msgid "Star"
|
msgid "Star"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:38
|
#: rog-control-center/ui/pages/aura.slint:37
|
||||||
msgctxt "Basic aura mode"
|
msgctxt "Basic aura mode"
|
||||||
msgid "Rain"
|
msgid "Rain"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:39
|
#: rog-control-center/ui/pages/aura.slint:38
|
||||||
msgctxt "Basic aura mode"
|
msgctxt "Basic aura mode"
|
||||||
msgid "Highlight"
|
msgid "Highlight"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:40
|
#: rog-control-center/ui/pages/aura.slint:39
|
||||||
msgctxt "Basic aura mode"
|
msgctxt "Basic aura mode"
|
||||||
msgid "Laser"
|
msgid "Laser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:41
|
#: rog-control-center/ui/pages/aura.slint:40
|
||||||
msgctxt "Basic aura mode"
|
msgctxt "Basic aura mode"
|
||||||
msgid "Ripple"
|
msgid "Ripple"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:42
|
#: rog-control-center/ui/pages/aura.slint:41
|
||||||
msgctxt "Basic aura mode"
|
msgctxt "Basic aura mode"
|
||||||
msgid "Nothing"
|
msgid "Nothing"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:43
|
#: rog-control-center/ui/pages/aura.slint:42
|
||||||
msgctxt "Basic aura mode"
|
msgctxt "Basic aura mode"
|
||||||
msgid "Pulse"
|
msgid "Pulse"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:44
|
#: rog-control-center/ui/pages/aura.slint:43
|
||||||
msgctxt "Basic aura mode"
|
msgctxt "Basic aura mode"
|
||||||
msgid "Comet"
|
msgid "Comet"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:45
|
#: rog-control-center/ui/pages/aura.slint:44
|
||||||
msgctxt "Basic aura mode"
|
msgctxt "Basic aura mode"
|
||||||
msgid "Flash"
|
msgid "Flash"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:59
|
#: rog-control-center/ui/pages/aura.slint:56
|
||||||
msgctxt "Aura zone"
|
msgctxt "Aura zone"
|
||||||
msgid "None"
|
msgid "None"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:60
|
#: rog-control-center/ui/pages/aura.slint:57
|
||||||
msgctxt "Aura zone"
|
msgctxt "Aura zone"
|
||||||
msgid "Key1"
|
msgid "Key1"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:61
|
#: rog-control-center/ui/pages/aura.slint:58
|
||||||
msgctxt "Aura zone"
|
msgctxt "Aura zone"
|
||||||
msgid "Key2"
|
msgid "Key2"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:62
|
#: rog-control-center/ui/pages/aura.slint:59
|
||||||
msgctxt "Aura zone"
|
msgctxt "Aura zone"
|
||||||
msgid "Key3"
|
msgid "Key3"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:63
|
#: rog-control-center/ui/pages/aura.slint:60
|
||||||
msgctxt "Aura zone"
|
msgctxt "Aura zone"
|
||||||
msgid "Key4"
|
msgid "Key4"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:64
|
#: rog-control-center/ui/pages/aura.slint:61
|
||||||
msgctxt "Aura zone"
|
msgctxt "Aura zone"
|
||||||
msgid "Logo"
|
msgid "Logo"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:65
|
#: rog-control-center/ui/pages/aura.slint:62
|
||||||
msgctxt "Aura zone"
|
msgctxt "Aura zone"
|
||||||
msgid "Lightbar Left"
|
msgid "Lightbar Left"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:66
|
#: rog-control-center/ui/pages/aura.slint:63
|
||||||
msgctxt "Aura zone"
|
msgctxt "Aura zone"
|
||||||
msgid "Lightbar Right"
|
msgid "Lightbar Right"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:71
|
#: rog-control-center/ui/pages/aura.slint:67
|
||||||
msgctxt "Aura direction"
|
msgctxt "Aura direction"
|
||||||
msgid "Right"
|
msgid "Right"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:72
|
#: rog-control-center/ui/pages/aura.slint:68
|
||||||
msgctxt "Aura direction"
|
msgctxt "Aura direction"
|
||||||
msgid "Left"
|
msgid "Left"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:73
|
#: rog-control-center/ui/pages/aura.slint:69
|
||||||
msgctxt "Aura direction"
|
msgctxt "Aura direction"
|
||||||
msgid "Up"
|
msgid "Up"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:74
|
#: rog-control-center/ui/pages/aura.slint:70
|
||||||
msgctxt "Aura direction"
|
msgctxt "Aura direction"
|
||||||
msgid "Down"
|
msgid "Down"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:79
|
#: rog-control-center/ui/pages/aura.slint:74
|
||||||
msgctxt "Aura speed"
|
msgctxt "Aura speed"
|
||||||
msgid "Low"
|
msgid "Low"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:80
|
#: rog-control-center/ui/pages/aura.slint:75
|
||||||
msgctxt "Aura speed"
|
msgctxt "Aura speed"
|
||||||
msgid "Medium"
|
msgid "Medium"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:81
|
#: rog-control-center/ui/pages/aura.slint:76
|
||||||
msgctxt "Aura speed"
|
msgctxt "Aura speed"
|
||||||
msgid "High"
|
msgid "High"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:128
|
#: rog-control-center/ui/pages/aura.slint:121
|
||||||
msgctxt "PageAura"
|
msgctxt "PageAura"
|
||||||
msgid "Brightness"
|
msgid "Brightness"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:139
|
#: rog-control-center/ui/pages/aura.slint:132
|
||||||
msgctxt "PageAura"
|
msgctxt "PageAura"
|
||||||
msgid "Aura mode"
|
msgid "Aura mode"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:156
|
#: rog-control-center/ui/pages/aura.slint:149
|
||||||
msgctxt "PageAura"
|
msgctxt "PageAura"
|
||||||
msgid "Colour 1"
|
msgid "Colour 1"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:187
|
#: rog-control-center/ui/pages/aura.slint:186
|
||||||
msgctxt "PageAura"
|
msgctxt "PageAura"
|
||||||
msgid "Colour 2"
|
msgid "Colour 2"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:224
|
#: rog-control-center/ui/pages/aura.slint:226
|
||||||
msgctxt "PageAura"
|
msgctxt "PageAura"
|
||||||
msgid "Zone"
|
msgid "Zone"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:244
|
#: rog-control-center/ui/pages/aura.slint:246
|
||||||
msgctxt "PageAura"
|
msgctxt "PageAura"
|
||||||
msgid "Direction"
|
msgid "Direction"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:264
|
#: rog-control-center/ui/pages/aura.slint:266
|
||||||
msgctxt "PageAura"
|
msgctxt "PageAura"
|
||||||
msgid "Speed"
|
msgid "Speed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:282
|
#: rog-control-center/ui/pages/aura.slint:284
|
||||||
msgctxt "PageAura"
|
msgctxt "PageAura"
|
||||||
msgid "Apply"
|
msgid "Apply"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:27
|
#: rog-control-center/ui/pages/system.slint:26
|
||||||
msgctxt "SystemPageData"
|
msgctxt "SystemPageData"
|
||||||
msgid "Balanced"
|
msgid "Balanced"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:27 rog-control-center/ui/pages/system.slint:32
|
#: rog-control-center/ui/pages/system.slint:26 rog-control-center/ui/pages/system.slint:30
|
||||||
msgctxt "SystemPageData"
|
msgctxt "SystemPageData"
|
||||||
msgid "Performance"
|
msgid "Performance"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:27
|
#: rog-control-center/ui/pages/system.slint:26
|
||||||
msgctxt "SystemPageData"
|
msgctxt "SystemPageData"
|
||||||
msgid "Quiet"
|
msgid "Quiet"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:31
|
#: rog-control-center/ui/pages/system.slint:29
|
||||||
msgctxt "SystemPageData"
|
msgctxt "SystemPageData"
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:33
|
#: rog-control-center/ui/pages/system.slint:31
|
||||||
msgctxt "SystemPageData"
|
msgctxt "SystemPageData"
|
||||||
msgid "BalancePerformance"
|
msgid "BalancePerformance"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:34
|
#: rog-control-center/ui/pages/system.slint:32
|
||||||
msgctxt "SystemPageData"
|
msgctxt "SystemPageData"
|
||||||
msgid "BalancePower"
|
msgid "BalancePower"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:35
|
#: rog-control-center/ui/pages/system.slint:33
|
||||||
msgctxt "SystemPageData"
|
msgctxt "SystemPageData"
|
||||||
msgid "Power"
|
msgid "Power"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:116
|
#: rog-control-center/ui/pages/system.slint:103
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "Base system settings"
|
msgid "Base system settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:121
|
#: rog-control-center/ui/pages/system.slint:108
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "Charge limit"
|
msgid "Charge limit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:133
|
#: rog-control-center/ui/pages/system.slint:120
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "Throttle Policy"
|
msgid "Throttle Policy"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:143
|
#: rog-control-center/ui/pages/system.slint:130
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "Advanced"
|
msgid "Advanced"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:155
|
#: rog-control-center/ui/pages/system.slint:142
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "Panel Overdrive"
|
msgid "Panel Overdrive"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:163
|
#: rog-control-center/ui/pages/system.slint:150
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "MiniLED Mode"
|
msgid "MiniLED Mode"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:181
|
#: rog-control-center/ui/pages/system.slint:168
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "System performance settings"
|
msgid "System performance settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:186
|
#: rog-control-center/ui/pages/system.slint:173
|
||||||
msgctxt "ppt_pl1_spl"
|
msgctxt "ppt_pl1_spl"
|
||||||
msgid "ppt_pl1_spl"
|
msgid "ppt_pl1_spl"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:196
|
#: rog-control-center/ui/pages/system.slint:183
|
||||||
msgctxt "ppt_pl2_sppt"
|
msgctxt "ppt_pl2_sppt"
|
||||||
msgid "ppt_pl2_sppt"
|
msgid "ppt_pl2_sppt"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:206
|
#: rog-control-center/ui/pages/system.slint:193
|
||||||
msgctxt "ppt_fppt"
|
msgctxt "ppt_fppt"
|
||||||
msgid "ppt_fppt"
|
msgid "ppt_fppt"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:216
|
#: rog-control-center/ui/pages/system.slint:203
|
||||||
msgctxt "ppt_apu_sppt"
|
msgctxt "ppt_apu_sppt"
|
||||||
msgid "ppt_apu_sppt"
|
msgid "ppt_apu_sppt"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:225
|
#: rog-control-center/ui/pages/system.slint:213
|
||||||
msgctxt "ppt_platform_sppt"
|
msgctxt "ppt_platform_sppt"
|
||||||
msgid "ppt_platform_sppt"
|
msgid "ppt_platform_sppt"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:235
|
#: rog-control-center/ui/pages/system.slint:223
|
||||||
msgctxt "nv_dynamic_boost"
|
msgctxt "nv_dynamic_boost"
|
||||||
msgid "nv_dynamic_boost"
|
msgid "nv_dynamic_boost"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:244
|
#: rog-control-center/ui/pages/system.slint:233
|
||||||
msgctxt "nv_temp_target"
|
msgctxt "nv_temp_target"
|
||||||
msgid "nv_temp_target"
|
msgid "nv_temp_target"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:290
|
#: rog-control-center/ui/pages/system.slint:278
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "Energy Performance Preference linked to Throttle Policy"
|
msgid "Energy Performance Preference linked to Throttle Policy"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:294
|
#: rog-control-center/ui/pages/system.slint:282
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "Change EPP based on Throttle Policy"
|
msgid "Change EPP based on Throttle Policy"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:302
|
#: rog-control-center/ui/pages/system.slint:290
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "EPP for Balanced Policy"
|
msgid "EPP for Balanced Policy"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:312
|
#: rog-control-center/ui/pages/system.slint:300
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "EPP for Performance Policy"
|
msgid "EPP for Performance Policy"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:322
|
#: rog-control-center/ui/pages/system.slint:310
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "EPP for Quiet Policy"
|
msgid "EPP for Quiet Policy"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:340
|
#: rog-control-center/ui/pages/system.slint:328
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "Throttle Policy for power state"
|
msgid "Throttle Policy for power state"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:344
|
#: rog-control-center/ui/pages/system.slint:332
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "Throttle Policy on Battery"
|
msgid "Throttle Policy on Battery"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:354
|
#: rog-control-center/ui/pages/system.slint:342
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "Throttle Policy on AC"
|
msgid "Throttle Policy on AC"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/app_settings.slint:32
|
|
||||||
msgctxt "PageAppSettings"
|
|
||||||
msgid "Run in background after closing"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/app_settings.slint:41
|
|
||||||
msgctxt "PageAppSettings"
|
|
||||||
msgid "Start app in background (UI closed)"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/app_settings.slint:53
|
|
||||||
msgctxt "PageAppSettings"
|
|
||||||
msgid "Enable system tray icon"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/app_settings.slint:62
|
|
||||||
msgctxt "PageAppSettings"
|
|
||||||
msgid "Enable change notifications"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/main_window.slint:42
|
|
||||||
msgctxt "MainWindow"
|
|
||||||
msgid "ROG"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/main_window.slint:44
|
|
||||||
msgctxt "Menu1"
|
|
||||||
msgid "System Control"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/main_window.slint:45
|
|
||||||
msgctxt "Menu2"
|
|
||||||
msgid "Keyboard Aura"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/main_window.slint:46
|
|
||||||
msgctxt "Menu3"
|
|
||||||
msgid "AniMe Matrix"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/main_window.slint:47
|
|
||||||
msgctxt "Menu4"
|
|
||||||
msgid "Fan Curves"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/main_window.slint:48
|
|
||||||
msgctxt "Menu5"
|
|
||||||
msgid "App Settings"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/main_window.slint:49
|
|
||||||
msgctxt "Menu6"
|
|
||||||
msgid "About"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ import { VerticalBox , StandardButton, Button, HorizontalBox, ComboBox, Switch,
|
|||||||
import { Theme } from "globals.slint";
|
import { Theme } from "globals.slint";
|
||||||
|
|
||||||
export component RogItem inherits Rectangle {
|
export component RogItem inherits Rectangle {
|
||||||
background: Theme.background-color;
|
background: Theme.background-color;
|
||||||
border-color: Colors.black;
|
border-color: Colors.black;
|
||||||
border-width: 3px;
|
border-width: 3px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
export component SystemSlider inherits RogItem {
|
export component SystemSlider inherits RogItem {
|
||||||
@@ -122,8 +122,7 @@ export component ValueBar inherits Rectangle {
|
|||||||
return 0.50 - (value - (min - max) / 2) / (max - min);
|
return 0.50 - (value - (min - max) / 2) / (max - min);
|
||||||
}
|
}
|
||||||
return (value - min) / (max - min);
|
return (value - min) / (max - min);
|
||||||
}
|
}function set_x(min: float, max: float, value: float, width: length) -> length {
|
||||||
function set_x(min: float, max: float, value: float, width: length) -> length {
|
|
||||||
if (min < 0.0 && max > 0.0) {
|
if (min < 0.0 && max > 0.0) {
|
||||||
if (value < max + min) {
|
if (value < max + min) {
|
||||||
return width / 2 - width * (percentage(min, max, value));
|
return width / 2 - width * (percentage(min, max, value));
|
||||||
@@ -131,8 +130,7 @@ export component ValueBar inherits Rectangle {
|
|||||||
return width / 2;
|
return width / 2;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}Rectangle {
|
||||||
Rectangle {
|
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
background: Theme.neutral-box;
|
background: Theme.neutral-box;
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ export component MainWindow inherits Window {
|
|||||||
in property <[bool]> sidebar_items_avilable: [true, true, true, true, true, true];
|
in property <[bool]> sidebar_items_avilable: [true, true, true, true, true, true];
|
||||||
private property <bool> show-notif;
|
private property <bool> show-notif;
|
||||||
private property <bool> fade-cover;
|
private property <bool> fade-cover;
|
||||||
|
|
||||||
private property <bool> toast: false;
|
private property <bool> toast: false;
|
||||||
private property <string> toast_text: "I show when something is waiting";
|
private property <string> toast_text: "I show when something is waiting";
|
||||||
callback show_toast(string);
|
callback show_toast(string);
|
||||||
@@ -23,20 +22,17 @@ export component MainWindow inherits Window {
|
|||||||
toast = text != "";
|
toast = text != "";
|
||||||
toast_text = text;
|
toast_text = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
callback exit-app();
|
callback exit-app();
|
||||||
callback show-notification(bool);
|
callback show-notification(bool);
|
||||||
show-notification(yes) => {
|
show-notification(yes) => {
|
||||||
show-notif = yes;
|
show-notif = yes;
|
||||||
fade-cover = yes;
|
fade-cover = yes;
|
||||||
}
|
}
|
||||||
|
|
||||||
min-height: AppSize.height;
|
min-height: AppSize.height;
|
||||||
min-width: AppSize.width;
|
min-width: AppSize.width;
|
||||||
background: Colors.black;
|
background: Colors.black;
|
||||||
HorizontalLayout {
|
HorizontalLayout {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
|
|
||||||
VerticalLayout {
|
VerticalLayout {
|
||||||
side-bar := SideBar {
|
side-bar := SideBar {
|
||||||
title: @tr("ROG");
|
title: @tr("ROG");
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ export component PageAbout inherits VerticalLayout {
|
|||||||
text: "A UI for asusctl made with slint";
|
text: "A UI for asusctl made with slint";
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
vertical-alignment: TextVerticalAlignment.center;
|
vertical-alignment: TextVerticalAlignment.center;
|
||||||
horizontal-alignment: TextHorizontalAlignment.center;
|
horizontal-alignment: TextHorizontalAlignment.center;
|
||||||
|
|||||||
@@ -11,22 +11,16 @@ export global AnimePageData {
|
|||||||
];
|
];
|
||||||
in-out property <int> brightness;
|
in-out property <int> brightness;
|
||||||
callback set_brightness(int);
|
callback set_brightness(int);
|
||||||
|
|
||||||
in-out property <bool> builtins_enabled;
|
in-out property <bool> builtins_enabled;
|
||||||
callback set_builtins_enabled(bool);
|
callback set_builtins_enabled(bool);
|
||||||
|
|
||||||
in-out property <bool> enable_display;
|
in-out property <bool> enable_display;
|
||||||
callback set_enable_display(bool);
|
callback set_enable_display(bool);
|
||||||
|
|
||||||
in-out property <bool> off_when_lid_closed;
|
in-out property <bool> off_when_lid_closed;
|
||||||
callback set_off_when_lid_closed(bool);
|
callback set_off_when_lid_closed(bool);
|
||||||
|
|
||||||
in-out property <bool> off_when_suspended;
|
in-out property <bool> off_when_suspended;
|
||||||
callback set_off_when_suspended(bool);
|
callback set_off_when_suspended(bool);
|
||||||
|
|
||||||
in-out property <bool> off_when_unplugged;
|
in-out property <bool> off_when_unplugged;
|
||||||
callback set_off_when_unplugged(bool);
|
callback set_off_when_unplugged(bool);
|
||||||
|
|
||||||
in-out property <[string]> boot_anim_choices: [@tr("Glitch Construction"), @tr("Static Emergence")];
|
in-out property <[string]> boot_anim_choices: [@tr("Glitch Construction"), @tr("Static Emergence")];
|
||||||
in property <int> boot_anim: 0;
|
in property <int> boot_anim: 0;
|
||||||
in-out property <[string]> awake_anim_choices: [@tr("Binary Banner Scroll"), @tr("Rog Logo Glitch")];
|
in-out property <[string]> awake_anim_choices: [@tr("Binary Banner Scroll"), @tr("Rog Logo Glitch")];
|
||||||
@@ -42,7 +36,6 @@ export component PageAnime inherits Rectangle {
|
|||||||
property <bool> show_fade_cover: false;
|
property <bool> show_fade_cover: false;
|
||||||
property <bool> show_display_advanced: false;
|
property <bool> show_display_advanced: false;
|
||||||
property <bool> show_builtin_advanced: false;
|
property <bool> show_builtin_advanced: false;
|
||||||
|
|
||||||
clip: true;
|
clip: true;
|
||||||
// TODO: slow with border-radius
|
// TODO: slow with border-radius
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
@@ -142,7 +135,6 @@ export component PageAnime inherits Rectangle {
|
|||||||
VerticalLayout {
|
VerticalLayout {
|
||||||
padding: 50px;
|
padding: 50px;
|
||||||
spacing: 10px;
|
spacing: 10px;
|
||||||
|
|
||||||
GroupBox {
|
GroupBox {
|
||||||
height: 100px;
|
height: 100px;
|
||||||
VerticalBox {
|
VerticalBox {
|
||||||
@@ -217,7 +209,6 @@ export component PageAnime inherits Rectangle {
|
|||||||
VerticalLayout {
|
VerticalLayout {
|
||||||
padding: 50px;
|
padding: 50px;
|
||||||
spacing: 10px;
|
spacing: 10px;
|
||||||
|
|
||||||
GroupBox {
|
GroupBox {
|
||||||
height: 100px;
|
height: 100px;
|
||||||
VerticalBox {
|
VerticalBox {
|
||||||
|
|||||||
@@ -4,13 +4,10 @@ import { SystemToggle } from "../common_widgets.slint";
|
|||||||
export global AppSettingsPageData {
|
export global AppSettingsPageData {
|
||||||
in-out property <bool> run_in_background;
|
in-out property <bool> run_in_background;
|
||||||
callback set_run_in_background(bool);
|
callback set_run_in_background(bool);
|
||||||
|
|
||||||
in-out property <bool> startup_in_background;
|
in-out property <bool> startup_in_background;
|
||||||
callback set_startup_in_background(bool);
|
callback set_startup_in_background(bool);
|
||||||
|
|
||||||
in-out property <bool> enable_tray_icon;
|
in-out property <bool> enable_tray_icon;
|
||||||
callback set_enable_tray_icon(bool);
|
callback set_enable_tray_icon(bool);
|
||||||
|
|
||||||
in-out property <bool> enable_notifications;
|
in-out property <bool> enable_notifications;
|
||||||
callback set_enable_notifications(bool);
|
callback set_enable_notifications(bool);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ export global AuraPageData {
|
|||||||
];
|
];
|
||||||
in-out property <int> brightness;
|
in-out property <int> brightness;
|
||||||
callback set_brightness(int);
|
callback set_brightness(int);
|
||||||
|
|
||||||
in-out property <[string]> mode_names: [
|
in-out property <[string]> mode_names: [
|
||||||
@tr("Basic aura mode" => "Static"),
|
@tr("Basic aura mode" => "Static"),
|
||||||
@tr("Basic aura mode" => "Breathe"),
|
@tr("Basic aura mode" => "Breathe"),
|
||||||
@@ -50,11 +49,9 @@ export global AuraPageData {
|
|||||||
@tr("Basic aura mode" => "Strobe"),
|
@tr("Basic aura mode" => "Strobe"),
|
||||||
];
|
];
|
||||||
in-out property <int> current_available_mode: 0;
|
in-out property <int> current_available_mode: 0;
|
||||||
|
|
||||||
in-out property <[int]> supported_basic_modes: [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12];
|
in-out property <[int]> supported_basic_modes: [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12];
|
||||||
in-out property <int> led_mode;
|
in-out property <int> led_mode;
|
||||||
callback set_led_mode(int);
|
callback set_led_mode(int);
|
||||||
|
|
||||||
in-out property <[string]> zone_names: [
|
in-out property <[string]> zone_names: [
|
||||||
@tr("Aura zone" => "None"),
|
@tr("Aura zone" => "None"),
|
||||||
@tr("Aura zone" => "Key1"),
|
@tr("Aura zone" => "Key1"),
|
||||||
@@ -66,7 +63,6 @@ export global AuraPageData {
|
|||||||
@tr("Aura zone" => "Lightbar Right"),
|
@tr("Aura zone" => "Lightbar Right"),
|
||||||
];
|
];
|
||||||
in-out property <int> zone;
|
in-out property <int> zone;
|
||||||
|
|
||||||
in-out property <[string]> direction_names: [
|
in-out property <[string]> direction_names: [
|
||||||
@tr("Aura direction" => "Right"),
|
@tr("Aura direction" => "Right"),
|
||||||
@tr("Aura direction" => "Left"),
|
@tr("Aura direction" => "Left"),
|
||||||
@@ -74,14 +70,12 @@ export global AuraPageData {
|
|||||||
@tr("Aura direction" => "Down"),
|
@tr("Aura direction" => "Down"),
|
||||||
];
|
];
|
||||||
in-out property <int> direction;
|
in-out property <int> direction;
|
||||||
|
|
||||||
in-out property <[string]> speed_names: [
|
in-out property <[string]> speed_names: [
|
||||||
@tr("Aura speed" => "Low"),
|
@tr("Aura speed" => "Low"),
|
||||||
@tr("Aura speed" => "Medium"),
|
@tr("Aura speed" => "Medium"),
|
||||||
@tr("Aura speed" => "High"),
|
@tr("Aura speed" => "High"),
|
||||||
];
|
];
|
||||||
in-out property <int> speed;
|
in-out property <int> speed;
|
||||||
|
|
||||||
in-out property <AuraEffect> led_mode_data: {
|
in-out property <AuraEffect> led_mode_data: {
|
||||||
mode: 0,
|
mode: 0,
|
||||||
zone: 0,
|
zone: 0,
|
||||||
@@ -93,12 +87,10 @@ export global AuraPageData {
|
|||||||
direction: 0,
|
direction: 0,
|
||||||
};
|
};
|
||||||
callback set_led_mode_data(AuraEffect);
|
callback set_led_mode_data(AuraEffect);
|
||||||
|
|
||||||
in-out property <color> color1;
|
in-out property <color> color1;
|
||||||
in-out property <brush> colorbox1;
|
in-out property <brush> colorbox1;
|
||||||
in-out property <color> color2;
|
in-out property <color> color2;
|
||||||
in-out property <brush> colorbox2;
|
in-out property <brush> colorbox2;
|
||||||
|
|
||||||
callback update_led_mode_data(AuraEffect);
|
callback update_led_mode_data(AuraEffect);
|
||||||
update_led_mode_data(data) => {
|
update_led_mode_data(data) => {
|
||||||
led_mode_data = data;
|
led_mode_data = data;
|
||||||
@@ -111,11 +103,12 @@ export global AuraPageData {
|
|||||||
colorbox1 = data.colour1;
|
colorbox1 = data.colour1;
|
||||||
colorbox2 = data.colour2;
|
colorbox2 = data.colour2;
|
||||||
}
|
}
|
||||||
|
|
||||||
callback blend_colour(color, color, float) -> color;
|
callback blend_colour(color, color, float) -> color;
|
||||||
callback blend_lightness(color, float) -> color;
|
callback blend_lightness(color, float) -> color;
|
||||||
callback set_hex_from_colour(color) -> string;
|
callback set_hex_from_colour(color) -> string;
|
||||||
callback set_hex_to_colour(string) -> color;
|
callback set_hex_to_colour(string) -> color;
|
||||||
|
pure callback set_hue(color) -> float;
|
||||||
|
pure callback set_bright(color) -> float;
|
||||||
}
|
}
|
||||||
|
|
||||||
export component PageAura inherits VerticalLayout {
|
export component PageAura inherits VerticalLayout {
|
||||||
@@ -159,10 +152,10 @@ export component PageAura inherits VerticalLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
HorizontalBox {
|
HorizontalBox {
|
||||||
ColourSlider {
|
c1 := ColourSlider {
|
||||||
final_colour <=> AuraPageData.color1;
|
final_colour <=> AuraPageData.color1;
|
||||||
colourbox <=> AuraPageData.colorbox1;
|
colourbox <=> AuraPageData.colorbox1;
|
||||||
set_hex_from_colour(c1) => {
|
set_hex_from_colour(c1) => {
|
||||||
return AuraPageData.set_hex_from_colour(c1);
|
return AuraPageData.set_hex_from_colour(c1);
|
||||||
}
|
}
|
||||||
blend_colour(c1, c2, f) => {
|
blend_colour(c1, c2, f) => {
|
||||||
@@ -174,6 +167,12 @@ export component PageAura inherits VerticalLayout {
|
|||||||
hex_to_colour(s) => {
|
hex_to_colour(s) => {
|
||||||
return AuraPageData.set_hex_to_colour(s);
|
return AuraPageData.set_hex_to_colour(s);
|
||||||
}
|
}
|
||||||
|
set_hue(color) => {
|
||||||
|
return AuraPageData.set_hue(color);
|
||||||
|
}
|
||||||
|
set_bright(color) => {
|
||||||
|
return AuraPageData.set_bright(color);
|
||||||
|
}
|
||||||
init => {
|
init => {
|
||||||
self.colourbox = AuraPageData.led_mode_data.colour1;
|
self.colourbox = AuraPageData.led_mode_data.colour1;
|
||||||
self.final_colour = AuraPageData.led_mode_data.colour1;
|
self.final_colour = AuraPageData.led_mode_data.colour1;
|
||||||
@@ -190,10 +189,10 @@ export component PageAura inherits VerticalLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
HorizontalBox {
|
HorizontalBox {
|
||||||
ColourSlider {
|
c2 := ColourSlider {
|
||||||
final_colour <=> AuraPageData.color2;
|
final_colour <=> AuraPageData.color2;
|
||||||
colourbox <=> AuraPageData.colorbox2;
|
colourbox <=> AuraPageData.colorbox2;
|
||||||
set_hex_from_colour(c1) => {
|
set_hex_from_colour(c1) => {
|
||||||
return AuraPageData.set_hex_from_colour(c1);
|
return AuraPageData.set_hex_from_colour(c1);
|
||||||
}
|
}
|
||||||
blend_colour(c1, c2, f) => {
|
blend_colour(c1, c2, f) => {
|
||||||
@@ -205,6 +204,9 @@ export component PageAura inherits VerticalLayout {
|
|||||||
hex_to_colour(s) => {
|
hex_to_colour(s) => {
|
||||||
return AuraPageData.set_hex_to_colour(s);
|
return AuraPageData.set_hex_to_colour(s);
|
||||||
}
|
}
|
||||||
|
set_bright(color) => {
|
||||||
|
return AuraPageData.set_bright(color);
|
||||||
|
}
|
||||||
init => {
|
init => {
|
||||||
self.colourbox = AuraPageData.led_mode_data.colour2;
|
self.colourbox = AuraPageData.led_mode_data.colour2;
|
||||||
self.final_colour = AuraPageData.led_mode_data.colour2;
|
self.final_colour = AuraPageData.led_mode_data.colour2;
|
||||||
|
|||||||
@@ -22,11 +22,9 @@ export struct AvailableSystemProperties {
|
|||||||
export global SystemPageData {
|
export global SystemPageData {
|
||||||
in-out property <float> charge_control_end_threshold: 30;
|
in-out property <float> charge_control_end_threshold: 30;
|
||||||
callback set_charge_control_end_threshold(/* charge limit */ int);
|
callback set_charge_control_end_threshold(/* charge limit */ int);
|
||||||
|
|
||||||
in-out property <int> throttle_thermal_policy: 0;
|
in-out property <int> throttle_thermal_policy: 0;
|
||||||
in-out property <[string]> throttle_policy_choices: [@tr("Balanced"), @tr("Performance"), @tr("Quiet")];
|
in-out property <[string]> throttle_policy_choices: [@tr("Balanced"), @tr("Performance"), @tr("Quiet")];
|
||||||
callback set_throttle_thermal_policy(int);
|
callback set_throttle_thermal_policy(int);
|
||||||
|
|
||||||
in-out property <[string]> energy_performance_choices: [
|
in-out property <[string]> energy_performance_choices: [
|
||||||
@tr("Default"),
|
@tr("Default"),
|
||||||
@tr("Performance"),
|
@tr("Performance"),
|
||||||
@@ -47,34 +45,24 @@ export global SystemPageData {
|
|||||||
callback set_throttle_policy_on_ac(int);
|
callback set_throttle_policy_on_ac(int);
|
||||||
in-out property <int> throttle_policy_on_battery: 0;
|
in-out property <int> throttle_policy_on_battery: 0;
|
||||||
callback set_throttle_policy_on_battery(int);
|
callback set_throttle_policy_on_battery(int);
|
||||||
|
|
||||||
in-out property <bool> panel_od;
|
in-out property <bool> panel_od;
|
||||||
callback set_panel_od(bool);
|
callback set_panel_od(bool);
|
||||||
|
|
||||||
in-out property <bool> mini_led_mode;
|
in-out property <bool> mini_led_mode;
|
||||||
callback set_mini_led_mode(bool);
|
callback set_mini_led_mode(bool);
|
||||||
|
|
||||||
in-out property <float> ppt_pl1_spl: 5;
|
in-out property <float> ppt_pl1_spl: 5;
|
||||||
callback set_ppt_pl1_spl(int);
|
callback set_ppt_pl1_spl(int);
|
||||||
|
|
||||||
in-out property <float> ppt_pl2_sppt: 5;
|
in-out property <float> ppt_pl2_sppt: 5;
|
||||||
callback set_ppt_pl2_sppt(int);
|
callback set_ppt_pl2_sppt(int);
|
||||||
|
|
||||||
in-out property <float> ppt_fppt: 5;
|
in-out property <float> ppt_fppt: 5;
|
||||||
callback set_ppt_fppt(int);
|
callback set_ppt_fppt(int);
|
||||||
|
|
||||||
in-out property <float> ppt_apu_sppt: 5;
|
in-out property <float> ppt_apu_sppt: 5;
|
||||||
callback set_ppt_apu_sppt(int);
|
callback set_ppt_apu_sppt(int);
|
||||||
|
|
||||||
in-out property <float> ppt_platform_sppt: 5;
|
in-out property <float> ppt_platform_sppt: 5;
|
||||||
callback set_ppt_platform_sppt(int);
|
callback set_ppt_platform_sppt(int);
|
||||||
|
|
||||||
in-out property <float> nv_dynamic_boost: 5;
|
in-out property <float> nv_dynamic_boost: 5;
|
||||||
callback set_nv_dynamic_boost(int);
|
callback set_nv_dynamic_boost(int);
|
||||||
|
|
||||||
in-out property <float> nv_temp_target: 75;
|
in-out property <float> nv_temp_target: 75;
|
||||||
callback set_nv_temp_target(int);
|
callback set_nv_temp_target(int);
|
||||||
|
|
||||||
in-out property <AvailableSystemProperties> available: {
|
in-out property <AvailableSystemProperties> available: {
|
||||||
charge_control_end_threshold: true,
|
charge_control_end_threshold: true,
|
||||||
panel_od: true,
|
panel_od: true,
|
||||||
@@ -102,7 +90,6 @@ export component PageSystem inherits Rectangle {
|
|||||||
VerticalLayout {
|
VerticalLayout {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
spacing: 10px;
|
spacing: 10px;
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
background: Theme.background-color;
|
background: Theme.background-color;
|
||||||
border-color: Colors.black;
|
border-color: Colors.black;
|
||||||
@@ -221,6 +208,7 @@ export component PageSystem inherits Rectangle {
|
|||||||
SystemPageData.set_ppt_apu_sppt(Math.round(SystemPageData.ppt_apu_sppt))
|
SystemPageData.set_ppt_apu_sppt(Math.round(SystemPageData.ppt_apu_sppt))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if SystemPageData.available.ppt-platform-sppt: SystemSlider {
|
if SystemPageData.available.ppt-platform-sppt: SystemSlider {
|
||||||
text: @tr("ppt_platform_sppt" => "ppt_platform_sppt");
|
text: @tr("ppt_platform_sppt" => "ppt_platform_sppt");
|
||||||
maximum: 130;
|
maximum: 130;
|
||||||
@@ -240,6 +228,7 @@ export component PageSystem inherits Rectangle {
|
|||||||
SystemPageData.set_nv_dynamic_boost(Math.round(SystemPageData.nv_dynamic_boost))
|
SystemPageData.set_nv_dynamic_boost(Math.round(SystemPageData.nv_dynamic_boost))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if SystemPageData.available.nv-temp-target: SystemSlider {
|
if SystemPageData.available.nv-temp-target: SystemSlider {
|
||||||
text: @tr("nv_temp_target" => "nv_temp_target");
|
text: @tr("nv_temp_target" => "nv_temp_target");
|
||||||
minimum: 75;
|
minimum: 75;
|
||||||
@@ -279,7 +268,6 @@ export component PageSystem inherits Rectangle {
|
|||||||
padding: 50px;
|
padding: 50px;
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
spacing: 10px;
|
spacing: 10px;
|
||||||
|
|
||||||
GroupBox {
|
GroupBox {
|
||||||
VerticalBox {
|
VerticalBox {
|
||||||
spacing: 10px;
|
spacing: 10px;
|
||||||
|
|||||||
@@ -6,14 +6,16 @@ export component ColourSlider inherits VerticalLayout {
|
|||||||
property <color> base_colour: Colors.red;
|
property <color> base_colour: Colors.red;
|
||||||
in-out property <color> final_colour: Colors.red;
|
in-out property <color> final_colour: Colors.red;
|
||||||
in-out property <brush> colourbox: final_colour;
|
in-out property <brush> colourbox: final_colour;
|
||||||
|
|
||||||
callback hex_to_colour(string) -> color;
|
callback hex_to_colour(string) -> color;
|
||||||
// required
|
// required
|
||||||
callback set_hex_from_colour(color) -> string;
|
callback set_hex_from_colour(color) -> string;
|
||||||
/// This callback is required until slint adds direct acces to color channels
|
/// This callback is required until slint adds direct acces to color channels
|
||||||
callback blend_colour(color, color, float) -> color;
|
callback blend_colour(color, color, float) -> color;
|
||||||
callback blend_lightness(color, float) -> color;
|
callback blend_lightness(color, float) -> color;
|
||||||
|
pure callback set_hue(color) -> float;
|
||||||
|
pure callback set_bright(color) -> float;
|
||||||
|
in-out property <float> c1value<=> c1.value;
|
||||||
|
in-out property <float> c2value<=> c2.value;
|
||||||
property <[color]> base_colours: [
|
property <[color]> base_colours: [
|
||||||
Colors.rgb( 255, 0, 0),
|
Colors.rgb( 255, 0, 0),
|
||||||
Colors.rgb( 255, 128, 0),
|
Colors.rgb( 255, 128, 0),
|
||||||
@@ -42,13 +44,17 @@ export component ColourSlider inherits VerticalLayout {
|
|||||||
base_colour.with-alpha(10%),
|
base_colour.with-alpha(10%),
|
||||||
base_colour.with-alpha(0%)
|
base_colour.with-alpha(0%)
|
||||||
];
|
];
|
||||||
|
|
||||||
function set_base_colour() {
|
function set_base_colour() {
|
||||||
// base_colour = base_colours[c1.value].mix(base_colours[c1.value+1], _index_rem);
|
|
||||||
root.base_colour = blend_colour(base_colours[c1.value], base_colours[c1.value + 1], c1.value - Math.floor(c1.value));
|
root.base_colour = blend_colour(base_colours[c1.value], base_colours[c1.value + 1], c1.value - Math.floor(c1.value));
|
||||||
root.final_colour = blend_lightness(base_colour, (base_shade.length - c2.value) / base_shade.length);
|
root.final_colour = blend_lightness(base_colour, (base_shade.length - c2.value) / base_shade.length);
|
||||||
root.colourbox = root.final_colour;
|
root.colourbox = root.final_colour;
|
||||||
}
|
}
|
||||||
|
callback external_colour_change();
|
||||||
|
external_colour_change => {
|
||||||
|
c1.value = 13 * (root.set_hue(root.final_colour) / 360);
|
||||||
|
c2.value = 12 * (root.set_bright(root.final_colour) / 0.86);
|
||||||
|
root.set_base_colour();
|
||||||
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
// 13 colours
|
// 13 colours
|
||||||
@@ -64,6 +70,9 @@ export component ColourSlider inherits VerticalLayout {
|
|||||||
set_base_colour();
|
set_base_colour();
|
||||||
hex = set_hex_from_colour(final_colour);
|
hex = set_hex_from_colour(final_colour);
|
||||||
}
|
}
|
||||||
|
init => {
|
||||||
|
self.value = 13 * (root.set_hue(root.final_colour) / 360);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,6 +91,10 @@ export component ColourSlider inherits VerticalLayout {
|
|||||||
set_base_colour();
|
set_base_colour();
|
||||||
hex = set_hex_from_colour(final_colour);
|
hex = set_hex_from_colour(final_colour);
|
||||||
}
|
}
|
||||||
|
init => {
|
||||||
|
self.value = 12 * (root.set_bright(root.final_colour) / 0.86);
|
||||||
|
root.set_base_colour();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,7 +111,6 @@ export component ColourSlider inherits VerticalLayout {
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
width: self.height;
|
width: self.height;
|
||||||
background <=> root.colourbox;
|
background <=> root.colourbox;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -107,9 +119,7 @@ component ColorButton {
|
|||||||
callback select<=>i_touch_area.clicked;
|
callback select<=>i_touch_area.clicked;
|
||||||
in property <brush> color<=> i_container.background;
|
in property <brush> color<=> i_container.background;
|
||||||
in property <bool> selected;
|
in property <bool> selected;
|
||||||
|
|
||||||
height: self.width;
|
height: self.width;
|
||||||
|
|
||||||
i_container := Rectangle {
|
i_container := Rectangle {
|
||||||
border_width: 2px;
|
border_width: 2px;
|
||||||
}
|
}
|
||||||
@@ -128,10 +138,8 @@ export component ColorPicker {
|
|||||||
private property <int> selected_color_index;
|
private property <int> selected_color_index;
|
||||||
in-out property <float> colors_per_row: 13.0;
|
in-out property <float> colors_per_row: 13.0;
|
||||||
private property <length> color_size: self.width / colors_per_row;
|
private property <length> color_size: self.width / colors_per_row;
|
||||||
|
|
||||||
out property <color> selected_color: palette[selected_color_index];
|
out property <color> selected_color: palette[selected_color_index];
|
||||||
callback selected(color);
|
callback selected(color);
|
||||||
|
|
||||||
in property <[color]> palette: [
|
in property <[color]> palette: [
|
||||||
Colors.rgb(51,0,0),
|
Colors.rgb(51,0,0),
|
||||||
Colors.rgb(51,25,0),
|
Colors.rgb(51,25,0),
|
||||||
@@ -259,18 +267,15 @@ export component ColorPicker {
|
|||||||
Colors.rgb(255,204,229),
|
Colors.rgb(255,204,229),
|
||||||
Colors.rgb(224,224,224),
|
Colors.rgb(224,224,224),
|
||||||
];
|
];
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
border_width: 1px;
|
border_width: 1px;
|
||||||
border_color: Colors.black;
|
border_color: Colors.black;
|
||||||
|
|
||||||
for color[index] in palette: ColorButton {
|
for color[index] in palette: ColorButton {
|
||||||
x: color_size * mod(index, colors_per_row);
|
x: color_size * mod(index, colors_per_row);
|
||||||
y: color_size * floor(index / colors_per_row);
|
y: color_size * floor(index / colors_per_row);
|
||||||
width: color_size;
|
width: color_size;
|
||||||
color: color;
|
color: color;
|
||||||
selected: index == selected_color_index;
|
selected: index == selected_color_index;
|
||||||
|
|
||||||
select => {
|
select => {
|
||||||
selected_color_index = index;
|
selected_color_index = index;
|
||||||
// debug(Math.mod(selected_color_index, colors_per_row)); // X pos
|
// debug(Math.mod(selected_color_index, colors_per_row)); // X pos
|
||||||
|
|||||||
@@ -106,13 +106,13 @@ export component SideBar inherits Rectangle {
|
|||||||
alignment: start;
|
alignment: start;
|
||||||
vertical-stretch: 0;
|
vertical-stretch: 0;
|
||||||
for item[index] in root.model: SideBarItem {
|
for item[index] in root.model: SideBarItem {
|
||||||
visible: root.available[index];
|
visible: root.available[index];
|
||||||
clicked => {
|
clicked => {
|
||||||
root.current-item = index;
|
root.current-item = index;
|
||||||
}
|
}
|
||||||
has-focus: index == root.current-focused;
|
has-focus: index == root.current-focused;
|
||||||
text: item;
|
text: item;
|
||||||
selected: index == root.current-item;
|
selected: index == root.current-item;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user