mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Begin implmenting keyboard power states
This commit is contained in:
50
Cargo.lock
generated
50
Cargo.lock
generated
@@ -587,9 +587,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bumpalo"
|
name = "bumpalo"
|
||||||
version = "3.15.3"
|
version = "3.15.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8ea184aa71bb362a1157c896979544cc23974e08fd265f29ea96b59f0b4a555b"
|
checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "by_address"
|
name = "by_address"
|
||||||
@@ -663,9 +663,9 @@ checksum = "7b02b629252fe8ef6460461409564e2c21d0c8e77e0944f3d189ff06c4e932ad"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cc"
|
name = "cc"
|
||||||
version = "1.0.89"
|
version = "1.0.90"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a0ba8f7aaa012f30d5b2861462f6708eccd49c3c39863fe083a308035f63d723"
|
checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"jobserver",
|
"jobserver",
|
||||||
"libc",
|
"libc",
|
||||||
@@ -715,9 +715,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "chrono"
|
name = "chrono"
|
||||||
version = "0.4.34"
|
version = "0.4.35"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b"
|
checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"android-tzdata",
|
"android-tzdata",
|
||||||
"iana-time-zone",
|
"iana-time-zone",
|
||||||
@@ -851,7 +851,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "const-field-offset"
|
name = "const-field-offset"
|
||||||
version = "0.1.4"
|
version = "0.1.4"
|
||||||
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#f7ed950652302eca33f33e94a3bc503d710b4127"
|
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#02ff8f5fcb15c6c7683d976f509cf134cdb3ed45"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"const-field-offset-macro",
|
"const-field-offset-macro",
|
||||||
"field-offset",
|
"field-offset",
|
||||||
@@ -860,7 +860,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "const-field-offset-macro"
|
name = "const-field-offset-macro"
|
||||||
version = "0.1.4"
|
version = "0.1.4"
|
||||||
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#f7ed950652302eca33f33e94a3bc503d710b4127"
|
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#02ff8f5fcb15c6c7683d976f509cf134cdb3ed45"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -1928,7 +1928,7 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "i-slint-backend-linuxkms"
|
name = "i-slint-backend-linuxkms"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#f7ed950652302eca33f33e94a3bc503d710b4127"
|
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#02ff8f5fcb15c6c7683d976f509cf134cdb3ed45"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"calloop",
|
"calloop",
|
||||||
"drm",
|
"drm",
|
||||||
@@ -1948,7 +1948,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "i-slint-backend-qt"
|
name = "i-slint-backend-qt"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#f7ed950652302eca33f33e94a3bc503d710b4127"
|
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#02ff8f5fcb15c6c7683d976f509cf134cdb3ed45"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"const-field-offset",
|
"const-field-offset",
|
||||||
"i-slint-common",
|
"i-slint-common",
|
||||||
@@ -1960,7 +1960,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "i-slint-backend-selector"
|
name = "i-slint-backend-selector"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#f7ed950652302eca33f33e94a3bc503d710b4127"
|
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#02ff8f5fcb15c6c7683d976f509cf134cdb3ed45"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"i-slint-backend-linuxkms",
|
"i-slint-backend-linuxkms",
|
||||||
@@ -1973,7 +1973,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "i-slint-backend-winit"
|
name = "i-slint-backend-winit"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#f7ed950652302eca33f33e94a3bc503d710b4127"
|
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#02ff8f5fcb15c6c7683d976f509cf134cdb3ed45"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
@@ -2006,7 +2006,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "i-slint-common"
|
name = "i-slint-common"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#f7ed950652302eca33f33e94a3bc503d710b4127"
|
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#02ff8f5fcb15c6c7683d976f509cf134cdb3ed45"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"derive_more",
|
"derive_more",
|
||||||
@@ -2017,7 +2017,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "i-slint-compiler"
|
name = "i-slint-compiler"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#f7ed950652302eca33f33e94a3bc503d710b4127"
|
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#02ff8f5fcb15c6c7683d976f509cf134cdb3ed45"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"by_address",
|
"by_address",
|
||||||
"codemap",
|
"codemap",
|
||||||
@@ -2046,7 +2046,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "i-slint-core"
|
name = "i-slint-core"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#f7ed950652302eca33f33e94a3bc503d710b4127"
|
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#02ff8f5fcb15c6c7683d976f509cf134cdb3ed45"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"auto_enums",
|
"auto_enums",
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
@@ -2090,7 +2090,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "i-slint-core-macros"
|
name = "i-slint-core-macros"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#f7ed950652302eca33f33e94a3bc503d710b4127"
|
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#02ff8f5fcb15c6c7683d976f509cf134cdb3ed45"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.52",
|
"syn 2.0.52",
|
||||||
@@ -2099,7 +2099,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "i-slint-renderer-femtovg"
|
name = "i-slint-renderer-femtovg"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#f7ed950652302eca33f33e94a3bc503d710b4127"
|
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#02ff8f5fcb15c6c7683d976f509cf134cdb3ed45"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"const-field-offset",
|
"const-field-offset",
|
||||||
@@ -2130,7 +2130,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "i-slint-renderer-skia"
|
name = "i-slint-renderer-skia"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#f7ed950652302eca33f33e94a3bc503d710b4127"
|
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#02ff8f5fcb15c6c7683d976f509cf134cdb3ed45"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
@@ -3883,7 +3883,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "slint"
|
name = "slint"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#f7ed950652302eca33f33e94a3bc503d710b4127"
|
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#02ff8f5fcb15c6c7683d976f509cf134cdb3ed45"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"const-field-offset",
|
"const-field-offset",
|
||||||
"i-slint-backend-selector",
|
"i-slint-backend-selector",
|
||||||
@@ -3899,7 +3899,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "slint-build"
|
name = "slint-build"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#f7ed950652302eca33f33e94a3bc503d710b4127"
|
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#02ff8f5fcb15c6c7683d976f509cf134cdb3ed45"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"i-slint-compiler",
|
"i-slint-compiler",
|
||||||
"spin_on",
|
"spin_on",
|
||||||
@@ -3910,7 +3910,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "slint-macros"
|
name = "slint-macros"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#f7ed950652302eca33f33e94a3bc503d710b4127"
|
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#02ff8f5fcb15c6c7683d976f509cf134cdb3ed45"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"i-slint-compiler",
|
"i-slint-compiler",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
@@ -4684,7 +4684,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "vtable"
|
name = "vtable"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#f7ed950652302eca33f33e94a3bc503d710b4127"
|
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#02ff8f5fcb15c6c7683d976f509cf134cdb3ed45"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"const-field-offset",
|
"const-field-offset",
|
||||||
"portable-atomic",
|
"portable-atomic",
|
||||||
@@ -4695,7 +4695,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "vtable-macro"
|
name = "vtable-macro"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#f7ed950652302eca33f33e94a3bc503d710b4127"
|
source = "git+https://github.com/flukejones/sixtyfps.git?branch=asusctl#02ff8f5fcb15c6c7683d976f509cf134cdb3ed45"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -5225,9 +5225,9 @@ checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "winit"
|
name = "winit"
|
||||||
version = "0.29.13"
|
version = "0.29.14"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2b9d7047a2a569d5a81e3be098dcd8153759909b127477f4397e03cf1006d90a"
|
checksum = "a7a3db69ffbe53a9babec7804da7a90f21020fcce1f2f5e5291e2311245b993d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash",
|
"ahash",
|
||||||
"android-activity",
|
"android-activity",
|
||||||
|
|||||||
@@ -560,13 +560,7 @@ fn handle_led_power_1_do_1866(
|
|||||||
old_rog: enabled,
|
old_rog: enabled,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
dbus.proxies().aura().set_led_power((data, true))?;
|
dbus.proxies().aura().set_led_power(data)?; // TODO: verify this
|
||||||
|
|
||||||
let data = AuraPowerDev {
|
|
||||||
old_rog: disabled,
|
|
||||||
..Default::default()
|
|
||||||
};
|
|
||||||
dbus.proxies().aura().set_led_power((data, false))?;
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
@@ -597,13 +591,7 @@ fn handle_led_power_1_do_tuf(
|
|||||||
tuf: enabled,
|
tuf: enabled,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
dbus.proxies().aura().set_led_power((data, true))?;
|
dbus.proxies().aura().set_led_power(data)?; // TODO: verify this
|
||||||
|
|
||||||
let data = AuraPowerDev {
|
|
||||||
tuf: disabled,
|
|
||||||
..Default::default()
|
|
||||||
};
|
|
||||||
dbus.proxies().aura().set_led_power((data, false))?;
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
@@ -664,7 +652,7 @@ fn handle_led_power2(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dbus.proxies().aura().set_led_power((enabled, true))?;
|
dbus.proxies().aura().set_led_power(enabled)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
@@ -186,16 +186,15 @@ impl CtrlAuraZbus {
|
|||||||
///
|
///
|
||||||
/// For Modern ROG devices the "enabled" flag is ignored.
|
/// For Modern ROG devices the "enabled" flag is ignored.
|
||||||
#[zbus(property)]
|
#[zbus(property)]
|
||||||
async fn set_led_power(&mut self, options: (AuraPowerDev, bool)) -> Result<(), ZbErr> {
|
async fn set_led_power(&mut self, options: AuraPowerDev) -> Result<(), ZbErr> {
|
||||||
let enabled = options.1;
|
|
||||||
let options = options.0;
|
|
||||||
let mut ctrl = self.0.lock().await;
|
let mut ctrl = self.0.lock().await;
|
||||||
for p in options.tuf {
|
// TODO: set the older devices
|
||||||
ctrl.config.enabled.set_tuf(p, enabled);
|
// for p in options.tuf {
|
||||||
}
|
// ctrl.config.enabled.set_tuf(p, enabled);
|
||||||
for p in options.old_rog {
|
// }
|
||||||
ctrl.config.enabled.set_0x1866(p, enabled);
|
// for p in options.old_rog {
|
||||||
}
|
// ctrl.config.enabled.set_0x1866(p, enabled);
|
||||||
|
// }
|
||||||
ctrl.config.enabled.set_0x19b6(options.rog);
|
ctrl.config.enabled.set_0x19b6(options.rog);
|
||||||
ctrl.config.write();
|
ctrl.config.write();
|
||||||
Ok(ctrl.set_power_states().map_err(|e| {
|
Ok(ctrl.set_power_states().map_err(|e| {
|
||||||
|
|||||||
@@ -2,11 +2,13 @@ use std::sync::{Arc, Mutex};
|
|||||||
|
|
||||||
use config_traits::StdConfig;
|
use config_traits::StdConfig;
|
||||||
use rog_anime::Animations;
|
use rog_anime::Animations;
|
||||||
|
use rog_aura::power::KbAuraPowerState;
|
||||||
|
use rog_aura::usb::AuraPowerDev;
|
||||||
use rog_dbus::zbus_anime::AnimeProxy;
|
use rog_dbus::zbus_anime::AnimeProxy;
|
||||||
use rog_dbus::zbus_aura::AuraProxy;
|
use rog_dbus::zbus_aura::AuraProxy;
|
||||||
use rog_dbus::zbus_platform::{PlatformProxy, PlatformProxyBlocking};
|
use rog_dbus::zbus_platform::{PlatformProxy, PlatformProxyBlocking};
|
||||||
use rog_platform::platform::Properties;
|
use rog_platform::platform::Properties;
|
||||||
use slint::{ComponentHandle, Model, RgbaColor, SharedString, Weak};
|
use slint::{ComponentHandle, Model, ModelRc, RgbaColor, SharedString, Weak};
|
||||||
use zbus::proxy::CacheProperties;
|
use zbus::proxy::CacheProperties;
|
||||||
|
|
||||||
use crate::config::Config;
|
use crate::config::Config;
|
||||||
@@ -63,6 +65,207 @@ impl From<crate::slint_generatedMainWindow::AuraEffect> for rog_aura::AuraEffect
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use crate::slint_generatedMainWindow::AuraDevTuf as SlintAuraDevTuf;
|
||||||
|
impl From<rog_aura::usb::AuraDevTuf> for SlintAuraDevTuf {
|
||||||
|
fn from(value: rog_aura::usb::AuraDevTuf) -> Self {
|
||||||
|
match value {
|
||||||
|
rog_aura::usb::AuraDevTuf::Boot => SlintAuraDevTuf::Boot,
|
||||||
|
rog_aura::usb::AuraDevTuf::Awake => SlintAuraDevTuf::Awake,
|
||||||
|
rog_aura::usb::AuraDevTuf::Sleep => SlintAuraDevTuf::Sleep,
|
||||||
|
rog_aura::usb::AuraDevTuf::Keyboard => SlintAuraDevTuf::Keyboard,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<SlintAuraDevTuf> for rog_aura::usb::AuraDevTuf {
|
||||||
|
fn from(value: SlintAuraDevTuf) -> Self {
|
||||||
|
match value {
|
||||||
|
SlintAuraDevTuf::Boot => rog_aura::usb::AuraDevTuf::Boot,
|
||||||
|
SlintAuraDevTuf::Awake => rog_aura::usb::AuraDevTuf::Awake,
|
||||||
|
SlintAuraDevTuf::Sleep => rog_aura::usb::AuraDevTuf::Sleep,
|
||||||
|
SlintAuraDevTuf::Keyboard => rog_aura::usb::AuraDevTuf::Keyboard,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
use crate::slint_generatedMainWindow::AuraDevRog1 as SlintAuraDevRog1;
|
||||||
|
impl From<rog_aura::usb::AuraDevRog1> for SlintAuraDevRog1 {
|
||||||
|
fn from(value: rog_aura::usb::AuraDevRog1) -> Self {
|
||||||
|
match value {
|
||||||
|
rog_aura::usb::AuraDevRog1::Awake => SlintAuraDevRog1::Awake,
|
||||||
|
rog_aura::usb::AuraDevRog1::Keyboard => SlintAuraDevRog1::Keyboard,
|
||||||
|
rog_aura::usb::AuraDevRog1::Lightbar => SlintAuraDevRog1::Lightbar,
|
||||||
|
rog_aura::usb::AuraDevRog1::Boot => SlintAuraDevRog1::Boot,
|
||||||
|
rog_aura::usb::AuraDevRog1::Sleep => SlintAuraDevRog1::Sleep,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<SlintAuraDevRog1> for rog_aura::usb::AuraDevRog1 {
|
||||||
|
fn from(value: SlintAuraDevRog1) -> Self {
|
||||||
|
match value {
|
||||||
|
SlintAuraDevRog1::Awake => rog_aura::usb::AuraDevRog1::Awake,
|
||||||
|
SlintAuraDevRog1::Keyboard => rog_aura::usb::AuraDevRog1::Keyboard,
|
||||||
|
SlintAuraDevRog1::Lightbar => rog_aura::usb::AuraDevRog1::Lightbar,
|
||||||
|
SlintAuraDevRog1::Boot => rog_aura::usb::AuraDevRog1::Boot,
|
||||||
|
SlintAuraDevRog1::Sleep => rog_aura::usb::AuraDevRog1::Sleep,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
use crate::slint_generatedMainWindow::PowerZones as SlintPowerZones;
|
||||||
|
impl From<rog_aura::aura_detection::PowerZones> for SlintPowerZones {
|
||||||
|
fn from(value: rog_aura::aura_detection::PowerZones) -> Self {
|
||||||
|
match value {
|
||||||
|
rog_aura::aura_detection::PowerZones::Logo => SlintPowerZones::Logo,
|
||||||
|
rog_aura::aura_detection::PowerZones::Keyboard => SlintPowerZones::Keyboard,
|
||||||
|
rog_aura::aura_detection::PowerZones::Lightbar => SlintPowerZones::Lightbar,
|
||||||
|
rog_aura::aura_detection::PowerZones::Lid => SlintPowerZones::Lid,
|
||||||
|
rog_aura::aura_detection::PowerZones::RearGlow => SlintPowerZones::RearGlow,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<SlintPowerZones> for rog_aura::aura_detection::PowerZones {
|
||||||
|
fn from(value: SlintPowerZones) -> Self {
|
||||||
|
match value {
|
||||||
|
SlintPowerZones::Logo => rog_aura::aura_detection::PowerZones::Logo,
|
||||||
|
SlintPowerZones::Keyboard => rog_aura::aura_detection::PowerZones::Keyboard,
|
||||||
|
SlintPowerZones::Lightbar => rog_aura::aura_detection::PowerZones::Lightbar,
|
||||||
|
SlintPowerZones::Lid => rog_aura::aura_detection::PowerZones::Lid,
|
||||||
|
SlintPowerZones::RearGlow => rog_aura::aura_detection::PowerZones::RearGlow,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
use crate::slint_generatedMainWindow::{
|
||||||
|
AuraPower as SlintAuraPower, KbAuraPowerState as SlintKbAuraPowerState,
|
||||||
|
};
|
||||||
|
impl From<rog_aura::power::AuraPower> for SlintAuraPower {
|
||||||
|
fn from(value: rog_aura::power::AuraPower) -> Self {
|
||||||
|
Self {
|
||||||
|
keyboard: SlintKbAuraPowerState {
|
||||||
|
awake: value.keyboard.awake,
|
||||||
|
boot: value.keyboard.boot,
|
||||||
|
shutdown: value.keyboard.shutdown,
|
||||||
|
sleep: value.keyboard.sleep,
|
||||||
|
zone: value.keyboard.zone.into(),
|
||||||
|
},
|
||||||
|
lid: SlintKbAuraPowerState {
|
||||||
|
awake: value.lid.awake,
|
||||||
|
boot: value.lid.boot,
|
||||||
|
shutdown: value.lid.shutdown,
|
||||||
|
sleep: value.lid.sleep,
|
||||||
|
zone: value.lid.zone.into(),
|
||||||
|
},
|
||||||
|
lightbar: SlintKbAuraPowerState {
|
||||||
|
awake: value.lightbar.awake,
|
||||||
|
boot: value.lightbar.boot,
|
||||||
|
shutdown: value.lightbar.shutdown,
|
||||||
|
sleep: value.lightbar.sleep,
|
||||||
|
zone: value.lightbar.zone.into(),
|
||||||
|
},
|
||||||
|
logo: SlintKbAuraPowerState {
|
||||||
|
awake: value.logo.awake,
|
||||||
|
boot: value.logo.boot,
|
||||||
|
shutdown: value.logo.shutdown,
|
||||||
|
sleep: value.logo.sleep,
|
||||||
|
zone: value.logo.zone.into(),
|
||||||
|
},
|
||||||
|
rear_glow: SlintKbAuraPowerState {
|
||||||
|
awake: value.rear_glow.awake,
|
||||||
|
boot: value.rear_glow.boot,
|
||||||
|
shutdown: value.rear_glow.shutdown,
|
||||||
|
sleep: value.rear_glow.sleep,
|
||||||
|
zone: value.rear_glow.zone.into(),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<SlintAuraPower> for rog_aura::power::AuraPower {
|
||||||
|
fn from(value: SlintAuraPower) -> Self {
|
||||||
|
Self {
|
||||||
|
keyboard: KbAuraPowerState {
|
||||||
|
awake: value.keyboard.awake,
|
||||||
|
boot: value.keyboard.boot,
|
||||||
|
shutdown: value.keyboard.shutdown,
|
||||||
|
sleep: value.keyboard.sleep,
|
||||||
|
zone: value.keyboard.zone.into(),
|
||||||
|
},
|
||||||
|
lid: KbAuraPowerState {
|
||||||
|
awake: value.lid.awake,
|
||||||
|
boot: value.lid.boot,
|
||||||
|
shutdown: value.lid.shutdown,
|
||||||
|
sleep: value.lid.sleep,
|
||||||
|
zone: value.lid.zone.into(),
|
||||||
|
},
|
||||||
|
lightbar: KbAuraPowerState {
|
||||||
|
awake: value.lightbar.awake,
|
||||||
|
boot: value.lightbar.boot,
|
||||||
|
shutdown: value.lightbar.shutdown,
|
||||||
|
sleep: value.lightbar.sleep,
|
||||||
|
zone: value.lightbar.zone.into(),
|
||||||
|
},
|
||||||
|
logo: KbAuraPowerState {
|
||||||
|
awake: value.logo.awake,
|
||||||
|
boot: value.logo.boot,
|
||||||
|
shutdown: value.logo.shutdown,
|
||||||
|
sleep: value.logo.sleep,
|
||||||
|
zone: value.logo.zone.into(),
|
||||||
|
},
|
||||||
|
rear_glow: KbAuraPowerState {
|
||||||
|
awake: value.rear_glow.awake,
|
||||||
|
boot: value.rear_glow.boot,
|
||||||
|
shutdown: value.rear_glow.shutdown,
|
||||||
|
sleep: value.rear_glow.sleep,
|
||||||
|
zone: value.rear_glow.zone.into(),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
use crate::slint_generatedMainWindow::AuraPowerDev as SlintAuraPowerDev;
|
||||||
|
impl From<rog_aura::usb::AuraPowerDev> for SlintAuraPowerDev {
|
||||||
|
fn from(value: rog_aura::usb::AuraPowerDev) -> Self {
|
||||||
|
let tuf: Vec<SlintAuraDevTuf> = value
|
||||||
|
.tuf
|
||||||
|
.iter()
|
||||||
|
.map(|n| SlintAuraDevTuf::from(*n))
|
||||||
|
.collect();
|
||||||
|
let old_rog: Vec<SlintAuraDevRog1> = value
|
||||||
|
.old_rog
|
||||||
|
.iter()
|
||||||
|
.map(|n| SlintAuraDevRog1::from(*n))
|
||||||
|
.collect();
|
||||||
|
Self {
|
||||||
|
tuf: ModelRc::from(tuf.as_slice()),
|
||||||
|
old_rog: ModelRc::from(old_rog.as_slice()),
|
||||||
|
rog: value.rog.into(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<SlintAuraPowerDev> for rog_aura::usb::AuraPowerDev {
|
||||||
|
fn from(value: SlintAuraPowerDev) -> Self {
|
||||||
|
let tuf: Vec<rog_aura::usb::AuraDevTuf> = value
|
||||||
|
.tuf
|
||||||
|
.iter()
|
||||||
|
.map(|n| rog_aura::usb::AuraDevTuf::from(n))
|
||||||
|
.collect();
|
||||||
|
let old_rog: Vec<rog_aura::usb::AuraDevRog1> = value
|
||||||
|
.old_rog
|
||||||
|
.iter()
|
||||||
|
.map(|n| rog_aura::usb::AuraDevRog1::from(n))
|
||||||
|
.collect();
|
||||||
|
Self {
|
||||||
|
tuf,
|
||||||
|
old_rog,
|
||||||
|
rog: value.rog.into(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// This macro expects are consistent naming between proxy calls and slint
|
// This macro expects are consistent naming between proxy calls and slint
|
||||||
// globals
|
// globals
|
||||||
macro_rules! set_ui_props_async {
|
macro_rules! set_ui_props_async {
|
||||||
@@ -429,6 +632,19 @@ fn setup_aura_page(ui: &MainWindow, _states: Arc<Mutex<Config>>) {
|
|||||||
set_ui_props_async!(handle, aura, AuraPageData, brightness);
|
set_ui_props_async!(handle, aura, AuraPageData, brightness);
|
||||||
set_ui_props_async!(handle, aura, AuraPageData, led_mode);
|
set_ui_props_async!(handle, aura, AuraPageData, led_mode);
|
||||||
set_ui_props_async!(handle, aura, AuraPageData, led_mode_data);
|
set_ui_props_async!(handle, aura, AuraPageData, led_mode_data);
|
||||||
|
set_ui_props_async!(handle, aura, AuraPageData, led_power);
|
||||||
|
|
||||||
|
if let Ok(power) = aura.supported_power_zones().await {
|
||||||
|
log::debug!("Available LED power modes {power:?}");
|
||||||
|
let power: Vec<SlintPowerZones> = power.iter().map(|p| (*p).into()).collect();
|
||||||
|
handle
|
||||||
|
.upgrade_in_event_loop(move |handle| {
|
||||||
|
handle
|
||||||
|
.global::<AuraPageData>()
|
||||||
|
.set_supported_power_zones(power.as_slice().into());
|
||||||
|
})
|
||||||
|
.ok();
|
||||||
|
}
|
||||||
|
|
||||||
if let Ok(modes) = aura.supported_basic_modes().await {
|
if let Ok(modes) = aura.supported_basic_modes().await {
|
||||||
log::debug!("Available LED modes {modes:?}");
|
log::debug!("Available LED modes {modes:?}");
|
||||||
@@ -459,29 +675,58 @@ fn setup_aura_page(ui: &MainWindow, _states: Arc<Mutex<Config>>) {
|
|||||||
.upgrade_in_event_loop(move |handle| {
|
.upgrade_in_event_loop(move |handle| {
|
||||||
set_ui_callbacks!(handle,
|
set_ui_callbacks!(handle,
|
||||||
AuraPageData(.into()),
|
AuraPageData(.into()),
|
||||||
aura.brightness(.into()),
|
proxy_copy.brightness(.into()),
|
||||||
"Keyboard LED brightness successfully set to {}",
|
"Keyboard LED brightness successfully set to {}",
|
||||||
"Setting keyboard LED brightness failed"
|
"Setting keyboard LED brightness failed"
|
||||||
);
|
);
|
||||||
|
|
||||||
set_ui_callbacks!(handle,
|
set_ui_callbacks!(handle,
|
||||||
AuraPageData(.into()),
|
AuraPageData(.into()),
|
||||||
aura.led_mode(.into()),
|
proxy_copy.led_mode(.into()),
|
||||||
"Keyboard LED mode successfully set to {}",
|
"Keyboard LED mode successfully set to {}",
|
||||||
"Setting keyboard LEDmode failed"
|
"Setting keyboard LEDmode failed"
|
||||||
);
|
);
|
||||||
|
|
||||||
set_ui_callbacks!(handle,
|
set_ui_callbacks!(handle,
|
||||||
AuraPageData(.into()),
|
AuraPageData(.into()),
|
||||||
aura.led_mode_data(.into()),
|
proxy_copy.led_mode_data(.into()),
|
||||||
"Keyboard LED mode set to {:?}",
|
"Keyboard LED mode set to {:?}",
|
||||||
"Setting keyboard LED mode failed"
|
"Setting keyboard LED mode failed"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// set_ui_callbacks!(handle,
|
||||||
|
// AuraPageData(.clone().into()),
|
||||||
|
// proxy_copy.led_power(.into()),
|
||||||
|
// "Keyboard LED power successfully set to {:?}",
|
||||||
|
// "Setting keyboard power failed"
|
||||||
|
// );
|
||||||
|
|
||||||
handle.invoke_external_colour_change();
|
handle.invoke_external_colour_change();
|
||||||
})
|
})
|
||||||
.ok();
|
.ok();
|
||||||
|
|
||||||
|
let handle_copy = handle.clone();
|
||||||
|
let proxy_copy = aura.clone();
|
||||||
|
handle
|
||||||
|
.upgrade_in_event_loop(|handle| {
|
||||||
|
handle
|
||||||
|
.global::<AuraPageData>()
|
||||||
|
.on_set_led_power(move |power| {
|
||||||
|
let handle_copy = handle_copy.clone();
|
||||||
|
let proxy_copy = aura.clone();
|
||||||
|
let power: AuraPowerDev = power.into();
|
||||||
|
tokio::spawn(async move {
|
||||||
|
show_toast(
|
||||||
|
"Anime builtin animations changed".into(),
|
||||||
|
"Failed to set Anime builtin animations".into(),
|
||||||
|
handle_copy,
|
||||||
|
proxy_copy.set_led_power(power.into()).await,
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
// Need to update the UI if the mode changes
|
// Need to update the UI if the mode changes
|
||||||
let handle_copy = handle.clone();
|
let handle_copy = handle.clone();
|
||||||
// spawn required since the while let never exits
|
// spawn required since the while let never exits
|
||||||
|
|||||||
@@ -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-06 09:35+0000\n"
|
"POT-Creation-Date: 2024-03-09 08:00+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"
|
||||||
@@ -157,204 +157,94 @@ msgctxt "PageAppSettings"
|
|||||||
msgid "Enable change notifications"
|
msgid "Enable change notifications"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:24
|
#: rog-control-center/ui/pages/aura.slint:29
|
||||||
msgctxt "Aura brightness"
|
|
||||||
msgid "Off"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:25
|
|
||||||
msgctxt "Aura brightness"
|
|
||||||
msgid "Low"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:26
|
|
||||||
msgctxt "Aura brightness"
|
|
||||||
msgid "Med"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:27
|
|
||||||
msgctxt "Aura brightness"
|
|
||||||
msgid "High"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:32 rog-control-center/ui/pages/aura.slint:47
|
|
||||||
msgctxt "Basic aura mode"
|
|
||||||
msgid "Static"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:33 rog-control-center/ui/pages/aura.slint:48
|
|
||||||
msgctxt "Basic aura mode"
|
|
||||||
msgid "Breathe"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:34 rog-control-center/ui/pages/aura.slint:49
|
|
||||||
msgctxt "Basic aura mode"
|
|
||||||
msgid "Strobe"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:35
|
|
||||||
msgctxt "Basic aura mode"
|
|
||||||
msgid "Rainbow"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:36
|
|
||||||
msgctxt "Basic aura mode"
|
|
||||||
msgid "Star"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:37
|
|
||||||
msgctxt "Basic aura mode"
|
|
||||||
msgid "Rain"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:38
|
|
||||||
msgctxt "Basic aura mode"
|
|
||||||
msgid "Highlight"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:39
|
|
||||||
msgctxt "Basic aura mode"
|
|
||||||
msgid "Laser"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:40
|
|
||||||
msgctxt "Basic aura mode"
|
|
||||||
msgid "Ripple"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:41
|
|
||||||
msgctxt "Basic aura mode"
|
|
||||||
msgid "Nothing"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:42
|
|
||||||
msgctxt "Basic aura mode"
|
|
||||||
msgid "Pulse"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:43
|
|
||||||
msgctxt "Basic aura mode"
|
|
||||||
msgid "Comet"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:44
|
|
||||||
msgctxt "Basic aura mode"
|
|
||||||
msgid "Flash"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:56
|
|
||||||
msgctxt "Aura zone"
|
|
||||||
msgid "None"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:57
|
|
||||||
msgctxt "Aura zone"
|
|
||||||
msgid "Key1"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:58
|
|
||||||
msgctxt "Aura zone"
|
|
||||||
msgid "Key2"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:59
|
|
||||||
msgctxt "Aura zone"
|
|
||||||
msgid "Key3"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:60
|
|
||||||
msgctxt "Aura zone"
|
|
||||||
msgid "Key4"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:61
|
|
||||||
msgctxt "Aura zone"
|
|
||||||
msgid "Logo"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:62
|
|
||||||
msgctxt "Aura zone"
|
|
||||||
msgid "Lightbar Left"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:63
|
|
||||||
msgctxt "Aura zone"
|
|
||||||
msgid "Lightbar Right"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:67
|
|
||||||
msgctxt "Aura direction"
|
|
||||||
msgid "Right"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:68
|
|
||||||
msgctxt "Aura direction"
|
|
||||||
msgid "Left"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:69
|
|
||||||
msgctxt "Aura direction"
|
|
||||||
msgid "Up"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:70
|
|
||||||
msgctxt "Aura direction"
|
|
||||||
msgid "Down"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:74
|
|
||||||
msgctxt "Aura speed"
|
|
||||||
msgid "Low"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:75
|
|
||||||
msgctxt "Aura speed"
|
|
||||||
msgid "Medium"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:76
|
|
||||||
msgctxt "Aura speed"
|
|
||||||
msgid "High"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:128
|
|
||||||
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:40
|
||||||
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:57
|
||||||
msgctxt "PageAura"
|
msgctxt "PageAura"
|
||||||
msgid "Colour 1"
|
msgid "Colour 1"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:177
|
#: rog-control-center/ui/pages/aura.slint:78
|
||||||
msgctxt "PageAura"
|
msgctxt "PageAura"
|
||||||
msgid "Colour 2"
|
msgid "Colour 2"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:204
|
#: rog-control-center/ui/pages/aura.slint:105
|
||||||
msgctxt "PageAura"
|
msgctxt "PageAura"
|
||||||
msgid "Zone"
|
msgid "Zone"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:224
|
#: rog-control-center/ui/pages/aura.slint:125
|
||||||
msgctxt "PageAura"
|
msgctxt "PageAura"
|
||||||
msgid "Direction"
|
msgid "Direction"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:244
|
#: rog-control-center/ui/pages/aura.slint:145
|
||||||
msgctxt "PageAura"
|
msgctxt "PageAura"
|
||||||
msgid "Speed"
|
msgid "Speed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:262
|
#: rog-control-center/ui/pages/aura.slint:164
|
||||||
msgctxt "PageAura"
|
msgctxt "PageAura"
|
||||||
msgid "Apply"
|
msgid "Power Settings"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/pages/aura.slint:172
|
||||||
|
msgctxt "PageAura"
|
||||||
|
msgid "Apply Aura"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/pages/aura.slint:213 rog-control-center/ui/pages/aura.slint:421 rog-control-center/ui/pages/aura.slint:481
|
||||||
|
msgctxt "PageAura"
|
||||||
|
msgid "Keyboard"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/pages/aura.slint:219 rog-control-center/ui/pages/aura.slint:256 rog-control-center/ui/pages/aura.slint:293 rog-control-center/ui/pages/aura.slint:330 rog-control-center/ui/pages/aura.slint:367 rog-control-center/ui/pages/aura.slint:427 rog-control-center/ui/pages/aura.slint:487
|
||||||
|
msgctxt "PageAura"
|
||||||
|
msgid "Boot"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/pages/aura.slint:224 rog-control-center/ui/pages/aura.slint:261 rog-control-center/ui/pages/aura.slint:298 rog-control-center/ui/pages/aura.slint:335 rog-control-center/ui/pages/aura.slint:372 rog-control-center/ui/pages/aura.slint:432 rog-control-center/ui/pages/aura.slint:492
|
||||||
|
msgctxt "PageAura"
|
||||||
|
msgid "Awake"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/pages/aura.slint:229 rog-control-center/ui/pages/aura.slint:266 rog-control-center/ui/pages/aura.slint:303 rog-control-center/ui/pages/aura.slint:340 rog-control-center/ui/pages/aura.slint:377 rog-control-center/ui/pages/aura.slint:437 rog-control-center/ui/pages/aura.slint:497
|
||||||
|
msgctxt "PageAura"
|
||||||
|
msgid "Sleep"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/pages/aura.slint:234 rog-control-center/ui/pages/aura.slint:271 rog-control-center/ui/pages/aura.slint:308 rog-control-center/ui/pages/aura.slint:345 rog-control-center/ui/pages/aura.slint:382 rog-control-center/ui/pages/aura.slint:442 rog-control-center/ui/pages/aura.slint:502
|
||||||
|
msgctxt "PageAura"
|
||||||
|
msgid "Shutdown"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/pages/aura.slint:250
|
||||||
|
msgctxt "PageAura"
|
||||||
|
msgid "Lid Logo"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/pages/aura.slint:287
|
||||||
|
msgctxt "PageAura"
|
||||||
|
msgid "Lightbar"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/pages/aura.slint:324
|
||||||
|
msgctxt "PageAura"
|
||||||
|
msgid "Lid Zone"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/pages/aura.slint:361
|
||||||
|
msgctxt "PageAura"
|
||||||
|
msgid "Rear Glow"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:26
|
#: rog-control-center/ui/pages/system.slint:26
|
||||||
@@ -502,38 +392,198 @@ msgctxt "PageSystem"
|
|||||||
msgid "Throttle Policy on AC"
|
msgid "Throttle Policy on AC"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/main_window.slint:43
|
#: rog-control-center/ui/main_window.slint:45
|
||||||
msgctxt "MainWindow"
|
msgctxt "MainWindow"
|
||||||
msgid "ROG"
|
msgid "ROG"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/main_window.slint:45
|
#: rog-control-center/ui/main_window.slint:47
|
||||||
msgctxt "Menu1"
|
msgctxt "Menu1"
|
||||||
msgid "System Control"
|
msgid "System Control"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/main_window.slint:46
|
#: rog-control-center/ui/main_window.slint:48
|
||||||
msgctxt "Menu2"
|
msgctxt "Menu2"
|
||||||
msgid "Keyboard Aura"
|
msgid "Keyboard Aura"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/main_window.slint:47
|
#: rog-control-center/ui/main_window.slint:49
|
||||||
msgctxt "Menu3"
|
msgctxt "Menu3"
|
||||||
msgid "AniMe Matrix"
|
msgid "AniMe Matrix"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/main_window.slint:48
|
#: rog-control-center/ui/main_window.slint:50
|
||||||
msgctxt "Menu4"
|
msgctxt "Menu4"
|
||||||
msgid "Fan Curves"
|
msgid "Fan Curves"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/main_window.slint:49
|
#: rog-control-center/ui/main_window.slint:51
|
||||||
msgctxt "Menu5"
|
msgctxt "Menu5"
|
||||||
msgid "App Settings"
|
msgid "App Settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/main_window.slint:50
|
#: rog-control-center/ui/main_window.slint:52
|
||||||
msgctxt "Menu6"
|
msgctxt "Menu6"
|
||||||
msgid "About"
|
msgid "About"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:69
|
||||||
|
msgctxt "Aura brightness"
|
||||||
|
msgid "Off"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:70
|
||||||
|
msgctxt "Aura brightness"
|
||||||
|
msgid "Low"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:71
|
||||||
|
msgctxt "Aura brightness"
|
||||||
|
msgid "Med"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:72
|
||||||
|
msgctxt "Aura brightness"
|
||||||
|
msgid "High"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:77 rog-control-center/ui/types/aura_types.slint:92
|
||||||
|
msgctxt "Basic aura mode"
|
||||||
|
msgid "Static"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:78 rog-control-center/ui/types/aura_types.slint:93
|
||||||
|
msgctxt "Basic aura mode"
|
||||||
|
msgid "Breathe"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:79 rog-control-center/ui/types/aura_types.slint:94
|
||||||
|
msgctxt "Basic aura mode"
|
||||||
|
msgid "Strobe"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:80
|
||||||
|
msgctxt "Basic aura mode"
|
||||||
|
msgid "Rainbow"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:81
|
||||||
|
msgctxt "Basic aura mode"
|
||||||
|
msgid "Star"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:82
|
||||||
|
msgctxt "Basic aura mode"
|
||||||
|
msgid "Rain"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:83
|
||||||
|
msgctxt "Basic aura mode"
|
||||||
|
msgid "Highlight"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:84
|
||||||
|
msgctxt "Basic aura mode"
|
||||||
|
msgid "Laser"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:85
|
||||||
|
msgctxt "Basic aura mode"
|
||||||
|
msgid "Ripple"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:86
|
||||||
|
msgctxt "Basic aura mode"
|
||||||
|
msgid "Nothing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:87
|
||||||
|
msgctxt "Basic aura mode"
|
||||||
|
msgid "Pulse"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:88
|
||||||
|
msgctxt "Basic aura mode"
|
||||||
|
msgid "Comet"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:89
|
||||||
|
msgctxt "Basic aura mode"
|
||||||
|
msgid "Flash"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:101
|
||||||
|
msgctxt "Aura zone"
|
||||||
|
msgid "None"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:102
|
||||||
|
msgctxt "Aura zone"
|
||||||
|
msgid "Key1"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:103
|
||||||
|
msgctxt "Aura zone"
|
||||||
|
msgid "Key2"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:104
|
||||||
|
msgctxt "Aura zone"
|
||||||
|
msgid "Key3"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:105
|
||||||
|
msgctxt "Aura zone"
|
||||||
|
msgid "Key4"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:106
|
||||||
|
msgctxt "Aura zone"
|
||||||
|
msgid "Logo"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:107
|
||||||
|
msgctxt "Aura zone"
|
||||||
|
msgid "Lightbar Left"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:108
|
||||||
|
msgctxt "Aura zone"
|
||||||
|
msgid "Lightbar Right"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:112
|
||||||
|
msgctxt "Aura direction"
|
||||||
|
msgid "Right"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:113
|
||||||
|
msgctxt "Aura direction"
|
||||||
|
msgid "Left"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:114
|
||||||
|
msgctxt "Aura direction"
|
||||||
|
msgid "Up"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:115
|
||||||
|
msgctxt "Aura direction"
|
||||||
|
msgid "Down"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:119
|
||||||
|
msgctxt "Aura speed"
|
||||||
|
msgid "Low"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:120
|
||||||
|
msgctxt "Aura speed"
|
||||||
|
msgid "Medium"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:121
|
||||||
|
msgctxt "Aura speed"
|
||||||
|
msgid "High"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
|||||||
@@ -5,14 +5,16 @@ import { SideBar } from "widgets/sidebar.slint";
|
|||||||
import { PageAbout } from "pages/about.slint";
|
import { PageAbout } from "pages/about.slint";
|
||||||
import { PageFans } from "pages/fans.slint";
|
import { PageFans } from "pages/fans.slint";
|
||||||
import { PageAnime, AnimePageData } from "pages/anime.slint";
|
import { PageAnime, AnimePageData } from "pages/anime.slint";
|
||||||
import { PageAura, AuraPageData, AuraEffect } from "pages/aura.slint";
|
import { PageAura } from "pages/aura.slint";
|
||||||
|
import { AuraPageData, AuraDevType, AuraDevTuf, AuraDevRog1, PowerZones, KbAuraPowerState, AuraPowerDev, AuraEffect } from "types/aura_types.slint";
|
||||||
|
export { AuraPageData, AuraDevType, AuraDevTuf, AuraDevRog1, PowerZones, KbAuraPowerState, AuraPowerDev, AuraEffect }
|
||||||
import { PageAppSettings, AppSettingsPageData } from "pages/app_settings.slint";
|
import { PageAppSettings, AppSettingsPageData } from "pages/app_settings.slint";
|
||||||
|
|
||||||
export { AppSize, AuraEffect, Theme, AvailableSystemProperties, SystemPageData, AuraPageData, AnimePageData, AppSettingsPageData }
|
export { AppSize, Theme, AvailableSystemProperties, SystemPageData, AnimePageData, AppSettingsPageData }
|
||||||
|
|
||||||
export component MainWindow inherits Window {
|
export component MainWindow inherits Window {
|
||||||
default-font-family: "DejaVu Sans";
|
default-font-family: "DejaVu Sans";
|
||||||
in property <[bool]> sidebar_items_avilable: [true, true, true, true, true, true];
|
in property <[bool]> sidebar_items_avilable: [true, true, false, 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;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ValueBar } from "../common_widgets.slint";
|
import { ValueBar } from "../widgets/common.slint";
|
||||||
import { Theme } from "../globals.slint";
|
import { Theme } from "../globals.slint";
|
||||||
import { AboutSlint } from "std-widgets.slint";
|
import { AboutSlint } from "std-widgets.slint";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Theme } from "../globals.slint";
|
import { Theme } from "../globals.slint";
|
||||||
import { SystemDropdown, SystemToggle } from "../common_widgets.slint";
|
import { SystemDropdown, SystemToggle } from "../widgets/common.slint";
|
||||||
import { GroupBox, VerticalBox, Button, HorizontalBox } from "std-widgets.slint";
|
import { GroupBox, VerticalBox, Button, HorizontalBox } from "std-widgets.slint";
|
||||||
|
|
||||||
export global AnimePageData {
|
export global AnimePageData {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Theme } from "../globals.slint";
|
import { Theme } from "../globals.slint";
|
||||||
import { SystemToggle } from "../common_widgets.slint";
|
import { SystemToggle } from "../widgets/common.slint";
|
||||||
|
|
||||||
export global AppSettingsPageData {
|
export global AppSettingsPageData {
|
||||||
in-out property <bool> run_in_background;
|
in-out property <bool> run_in_background;
|
||||||
|
|||||||
@@ -1,270 +1,457 @@
|
|||||||
import { SystemDropdown, RogItem } from "../common_widgets.slint";
|
import { SystemDropdown, RogItem, SystemToggle, SystemToggleVert } from "../widgets/common.slint";
|
||||||
import { Button, ComboBox, VerticalBox, GroupBox } from "std-widgets.slint";
|
import { Button, ComboBox, VerticalBox, GroupBox } from "std-widgets.slint";
|
||||||
import { StyleMetrics, Slider, HorizontalBox, TextEdit, SpinBox, LineEdit } from "std-widgets.slint";
|
import { StyleMetrics, Slider, HorizontalBox, TextEdit, SpinBox, LineEdit, ScrollView } from "std-widgets.slint";
|
||||||
import { ColorPicker, ColourSlider } from "../widgets/colour_picker.slint";
|
import { ColorPicker, ColourSlider } from "../widgets/colour_picker.slint";
|
||||||
import { Theme } from "../globals.slint";
|
import { Theme } from "../globals.slint";
|
||||||
|
import { AuraPageData, AuraDevType, AuraDevTuf, AuraDevRog1, PowerZones, KbAuraPowerState, AuraPowerDev, AuraEffect } from "../types/aura_types.slint";
|
||||||
|
import { AuraPowerGroup } from "../widgets/aura_power.slint";
|
||||||
|
|
||||||
export struct AuraEffect {
|
export component PageAura inherits Rectangle {
|
||||||
/// The effect type
|
property <bool> show_fade_cover: false;
|
||||||
mode: int,
|
property <bool> show_aura_power: false;
|
||||||
/// `AuraZone::None` for no zone or zoneless keyboards
|
|
||||||
zone: int,
|
|
||||||
/// Primary colour for all modes
|
|
||||||
colour1: color,
|
|
||||||
/// Secondary colour in some modes like Breathing or Stars
|
|
||||||
colour2: color,
|
|
||||||
/// One of three speeds for modes that support speed (most that animate)
|
|
||||||
speed: int,
|
|
||||||
/// Up, down, left, right. Only Rainbow mode seems to use this
|
|
||||||
direction: int,
|
|
||||||
}
|
|
||||||
|
|
||||||
export global AuraPageData {
|
|
||||||
in-out property <[string]> brightness_names: [
|
|
||||||
@tr("Aura brightness" => "Off"),
|
|
||||||
@tr("Aura brightness" => "Low"),
|
|
||||||
@tr("Aura brightness" => "Med"),
|
|
||||||
@tr("Aura brightness" => "High"),
|
|
||||||
];
|
|
||||||
in-out property <int> brightness;
|
|
||||||
callback set_brightness(int);
|
|
||||||
in-out property <[string]> mode_names: [
|
|
||||||
@tr("Basic aura mode" => "Static"),
|
|
||||||
@tr("Basic aura mode" => "Breathe"),
|
|
||||||
@tr("Basic aura mode" => "Strobe"),
|
|
||||||
@tr("Basic aura mode" => "Rainbow"),
|
|
||||||
@tr("Basic aura mode" => "Star"),
|
|
||||||
@tr("Basic aura mode" => "Rain"),
|
|
||||||
@tr("Basic aura mode" => "Highlight"),
|
|
||||||
@tr("Basic aura mode" => "Laser"),
|
|
||||||
@tr("Basic aura mode" => "Ripple"),
|
|
||||||
@tr("Basic aura mode" => "Nothing"),
|
|
||||||
@tr("Basic aura mode" => "Pulse"),
|
|
||||||
@tr("Basic aura mode" => "Comet"),
|
|
||||||
@tr("Basic aura mode" => "Flash"),
|
|
||||||
];
|
|
||||||
in-out property <[string]> available_mode_names: [
|
|
||||||
@tr("Basic aura mode" => "Static"),
|
|
||||||
@tr("Basic aura mode" => "Breathe"),
|
|
||||||
@tr("Basic aura mode" => "Strobe"),
|
|
||||||
];
|
|
||||||
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> led_mode;
|
|
||||||
callback set_led_mode(int);
|
|
||||||
in-out property <[string]> zone_names: [
|
|
||||||
@tr("Aura zone" => "None"),
|
|
||||||
@tr("Aura zone" => "Key1"),
|
|
||||||
@tr("Aura zone" => "Key2"),
|
|
||||||
@tr("Aura zone" => "Key3"),
|
|
||||||
@tr("Aura zone" => "Key4"),
|
|
||||||
@tr("Aura zone" => "Logo"),
|
|
||||||
@tr("Aura zone" => "Lightbar Left"),
|
|
||||||
@tr("Aura zone" => "Lightbar Right"),
|
|
||||||
];
|
|
||||||
in-out property <int> zone;
|
|
||||||
in-out property <[string]> direction_names: [
|
|
||||||
@tr("Aura direction" => "Right"),
|
|
||||||
@tr("Aura direction" => "Left"),
|
|
||||||
@tr("Aura direction" => "Up"),
|
|
||||||
@tr("Aura direction" => "Down"),
|
|
||||||
];
|
|
||||||
in-out property <int> direction;
|
|
||||||
in-out property <[string]> speed_names: [
|
|
||||||
@tr("Aura speed" => "Low"),
|
|
||||||
@tr("Aura speed" => "Medium"),
|
|
||||||
@tr("Aura speed" => "High"),
|
|
||||||
];
|
|
||||||
in-out property <int> speed;
|
|
||||||
in-out property <AuraEffect> led_mode_data: {
|
|
||||||
mode: 0,
|
|
||||||
zone: 0,
|
|
||||||
colour1: Colors.aquamarine,
|
|
||||||
colourbox1: Colors.aquamarine,
|
|
||||||
colour2: Colors.hotpink,
|
|
||||||
colourbox2: Colors.hotpink,
|
|
||||||
speed: 0,
|
|
||||||
direction: 0,
|
|
||||||
};
|
|
||||||
callback set_led_mode_data(AuraEffect);
|
|
||||||
in-out property <color> color1;
|
|
||||||
in-out property <brush> colorbox1;
|
|
||||||
in-out property <color> color2;
|
|
||||||
in-out property <brush> colorbox2;
|
|
||||||
callback update_led_mode_data(AuraEffect);
|
|
||||||
update_led_mode_data(data) => {
|
|
||||||
led_mode_data = data;
|
|
||||||
current_available_mode = data.mode;
|
|
||||||
zone = data.zone;
|
|
||||||
speed = data.speed;
|
|
||||||
direction = data.direction;
|
|
||||||
color1 = data.colour1;
|
|
||||||
color2 = data.colour2;
|
|
||||||
colorbox1 = data.colour1;
|
|
||||||
colorbox2 = data.colour2;
|
|
||||||
}
|
|
||||||
callback set_hex_from_colour(color) -> string;
|
|
||||||
callback set_hex_to_colour(string) -> color;
|
|
||||||
}
|
|
||||||
|
|
||||||
export component PageAura inherits VerticalLayout {
|
|
||||||
padding: 10px;
|
|
||||||
spacing: 10px;
|
|
||||||
alignment: LayoutAlignment.start;
|
|
||||||
callback external_colour_change();
|
callback external_colour_change();
|
||||||
external_colour_change() => {
|
external_colour_change() => {
|
||||||
c1.colourbox = AuraPageData.led_mode_data.colour1;
|
c1.colourbox = AuraPageData.led_mode_data.colour1;
|
||||||
c1.final_colour = AuraPageData.led_mode_data.colour1;
|
c1.final_colour = AuraPageData.led_mode_data.colour1;
|
||||||
c1.external_colour_change();
|
c1.external_colour_change();
|
||||||
|
|
||||||
c2.colourbox = AuraPageData.led_mode_data.colour2;
|
c2.colourbox = AuraPageData.led_mode_data.colour2;
|
||||||
c2.final_colour = AuraPageData.led_mode_data.colour2;
|
c2.final_colour = AuraPageData.led_mode_data.colour2;
|
||||||
c2.external_colour_change();
|
c2.external_colour_change();
|
||||||
}
|
}
|
||||||
|
VerticalLayout {
|
||||||
HorizontalLayout {
|
padding: 10px;
|
||||||
spacing: 10px;
|
spacing: 10px;
|
||||||
SystemDropdown {
|
alignment: LayoutAlignment.start;
|
||||||
text: @tr("Brightness");
|
|
||||||
current_index <=> AuraPageData.brightness;
|
|
||||||
current_value: AuraPageData.brightness_names[self.current-index];
|
|
||||||
model <=> AuraPageData.brightness_names;
|
|
||||||
selected => {
|
|
||||||
AuraPageData.set_brightness(AuraPageData.brightness)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SystemDropdown {
|
|
||||||
width: parent.width * 1px / 2px;
|
|
||||||
text: @tr("Aura mode");
|
|
||||||
current_index <=> AuraPageData.current_available_mode;
|
|
||||||
current_value: AuraPageData.available_mode_names[self.current-index];
|
|
||||||
model <=> AuraPageData.available_mode_names;
|
|
||||||
selected => {
|
|
||||||
AuraPageData.led_mode_data.mode = AuraPageData.current_available_mode;
|
|
||||||
self.current_value = AuraPageData.available_mode_names[self.current-index];
|
|
||||||
AuraPageData.set_led_mode(AuraPageData.current_available_mode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RogItem {
|
|
||||||
HorizontalLayout {
|
HorizontalLayout {
|
||||||
spacing: 10px;
|
spacing: 10px;
|
||||||
VerticalBox {
|
SystemDropdown {
|
||||||
Text {
|
text: @tr("Brightness");
|
||||||
text: @tr("Colour 1");
|
current_index <=> AuraPageData.brightness;
|
||||||
vertical-alignment: TextVerticalAlignment.center;
|
current_value: AuraPageData.brightness_names[self.current-index];
|
||||||
horizontal-alignment: TextHorizontalAlignment.center;
|
model <=> AuraPageData.brightness_names;
|
||||||
|
selected => {
|
||||||
|
AuraPageData.set_brightness(AuraPageData.brightness)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
HorizontalBox {
|
SystemDropdown {
|
||||||
c1:= ColourSlider {
|
width: parent.width * 1px / 2px;
|
||||||
final_colour <=> AuraPageData.color1;
|
text: @tr("Aura mode");
|
||||||
|
current_index <=> AuraPageData.current_available_mode;
|
||||||
|
current_value: AuraPageData.available_mode_names[self.current-index];
|
||||||
|
model <=> AuraPageData.available_mode_names;
|
||||||
|
selected => {
|
||||||
|
AuraPageData.led_mode_data.mode = AuraPageData.current_available_mode;
|
||||||
|
self.current_value = AuraPageData.available_mode_names[self.current-index];
|
||||||
|
AuraPageData.set_led_mode(AuraPageData.current_available_mode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RogItem {
|
||||||
|
HorizontalLayout {
|
||||||
|
spacing: 10px;
|
||||||
|
VerticalBox {
|
||||||
|
Text {
|
||||||
|
text: @tr("Colour 1");
|
||||||
|
vertical-alignment: TextVerticalAlignment.center;
|
||||||
|
horizontal-alignment: TextHorizontalAlignment.center;
|
||||||
|
}
|
||||||
|
|
||||||
|
HorizontalBox {
|
||||||
|
c1 := ColourSlider {
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
hex_to_colour(s) => {
|
hex_to_colour(s) => {
|
||||||
return AuraPageData.set_hex_to_colour(s);
|
return AuraPageData.set_hex_to_colour(s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
VerticalBox {
|
VerticalBox {
|
||||||
Text {
|
Text {
|
||||||
text: @tr("Colour 2");
|
text: @tr("Colour 2");
|
||||||
vertical-alignment: TextVerticalAlignment.center;
|
vertical-alignment: TextVerticalAlignment.center;
|
||||||
horizontal-alignment: TextHorizontalAlignment.center;
|
horizontal-alignment: TextHorizontalAlignment.center;
|
||||||
}
|
}
|
||||||
|
|
||||||
HorizontalBox {
|
HorizontalBox {
|
||||||
c2:= 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);
|
||||||
}
|
}
|
||||||
hex_to_colour(s) => {
|
hex_to_colour(s) => {
|
||||||
return AuraPageData.set_hex_to_colour(s);
|
return AuraPageData.set_hex_to_colour(s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
HorizontalLayout {
|
HorizontalLayout {
|
||||||
spacing: 10px;
|
spacing: 10px;
|
||||||
RogItem {
|
RogItem {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
VerticalBox {
|
VerticalBox {
|
||||||
Text {
|
Text {
|
||||||
text: @tr("Zone");
|
text: @tr("Zone");
|
||||||
vertical-alignment: TextVerticalAlignment.center;
|
vertical-alignment: TextVerticalAlignment.center;
|
||||||
horizontal-alignment: TextHorizontalAlignment.center;
|
horizontal-alignment: TextHorizontalAlignment.center;
|
||||||
}
|
}
|
||||||
|
|
||||||
ComboBox {
|
ComboBox {
|
||||||
current_index <=> AuraPageData.zone;
|
current_index <=> AuraPageData.zone;
|
||||||
current_value: AuraPageData.zone_names[self.current-index];
|
current_value: AuraPageData.zone_names[self.current-index];
|
||||||
model <=> AuraPageData.zone_names;
|
model <=> AuraPageData.zone_names;
|
||||||
selected => {
|
selected => {
|
||||||
AuraPageData.led_mode_data.zone = self.current-index;
|
AuraPageData.led_mode_data.zone = self.current-index;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
RogItem {
|
RogItem {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
VerticalBox {
|
VerticalBox {
|
||||||
Text {
|
Text {
|
||||||
text: @tr("Direction");
|
text: @tr("Direction");
|
||||||
vertical-alignment: TextVerticalAlignment.center;
|
vertical-alignment: TextVerticalAlignment.center;
|
||||||
horizontal-alignment: TextHorizontalAlignment.center;
|
horizontal-alignment: TextHorizontalAlignment.center;
|
||||||
}
|
}
|
||||||
|
|
||||||
ComboBox {
|
ComboBox {
|
||||||
current_index <=> AuraPageData.direction;
|
current_index <=> AuraPageData.direction;
|
||||||
current_value: AuraPageData.direction_names[self.current-index];
|
current_value: AuraPageData.direction_names[self.current-index];
|
||||||
model <=> AuraPageData.direction_names;
|
model <=> AuraPageData.direction_names;
|
||||||
selected => {
|
selected => {
|
||||||
AuraPageData.led_mode_data.direction = self.current-index;
|
AuraPageData.led_mode_data.direction = self.current-index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RogItem {
|
||||||
|
padding: 0px;
|
||||||
|
VerticalBox {
|
||||||
|
Text {
|
||||||
|
text: @tr("Speed");
|
||||||
|
vertical-alignment: TextVerticalAlignment.center;
|
||||||
|
horizontal-alignment: TextHorizontalAlignment.center;
|
||||||
|
}
|
||||||
|
|
||||||
|
ComboBox {
|
||||||
|
current_index <=> AuraPageData.speed;
|
||||||
|
current_value: AuraPageData.speed_names[self.current-index];
|
||||||
|
model <=> AuraPageData.speed_names;
|
||||||
|
selected => {
|
||||||
|
AuraPageData.led_mode_data.speed = self.current-index;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RogItem {
|
HorizontalBox {
|
||||||
padding: 0px;
|
Button {
|
||||||
VerticalBox {
|
text: @tr("Power Settings");
|
||||||
Text {
|
clicked => {
|
||||||
text: @tr("Speed");
|
root.show_fade_cover = true;
|
||||||
vertical-alignment: TextVerticalAlignment.center;
|
root.show_aura_power = true;
|
||||||
horizontal-alignment: TextHorizontalAlignment.center;
|
debug(AuraPageData.led_power);
|
||||||
|
debug(AuraPageData.supported_power_zones);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ComboBox {
|
Button {
|
||||||
current_index <=> AuraPageData.speed;
|
text: @tr("Apply Aura");
|
||||||
current_value: AuraPageData.speed_names[self.current-index];
|
clicked => {
|
||||||
model <=> AuraPageData.speed_names;
|
AuraPageData.led_mode_data.mode = AuraPageData.led_mode;
|
||||||
selected => {
|
AuraPageData.led_mode_data.colour1 = AuraPageData.color1;
|
||||||
AuraPageData.led_mode_data.speed = self.current-index;
|
AuraPageData.led_mode_data.colour2 = AuraPageData.color2;
|
||||||
}
|
AuraPageData.set_led_mode_data(AuraPageData.led_mode_data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
if root.show_fade_cover: Rectangle {
|
||||||
text: @tr("Apply");
|
width: 100%;
|
||||||
clicked => {
|
height: 100%;
|
||||||
AuraPageData.led_mode_data.mode = AuraPageData.led_mode;
|
background: Theme.background-color;
|
||||||
AuraPageData.led_mode_data.colour1 = AuraPageData.color1;
|
opacity: 0.8;
|
||||||
AuraPageData.led_mode_data.colour2 = AuraPageData.color2;
|
TouchArea {
|
||||||
AuraPageData.set_led_mode_data(AuraPageData.led_mode_data);
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if root.show_aura_power && AuraPageData.aura_type == AuraDevType.New: Rectangle {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
opacity: 1;
|
||||||
|
ScrollView {
|
||||||
|
VerticalLayout {
|
||||||
|
padding: 30px;
|
||||||
|
padding-top: 10px;
|
||||||
|
spacing: 10px;
|
||||||
|
for power in AuraPageData.supported_power_zones: gr:= HorizontalLayout {
|
||||||
|
if power == PowerZones.Keyboard: zone1:= AuraPowerGroup {
|
||||||
|
title: @tr("Keyboard");
|
||||||
|
boot_checked: AuraPageData.led_power.rog.keyboard.boot;
|
||||||
|
boot_toggled => {
|
||||||
|
AuraPageData.led_power.rog.keyboard.boot = zone1.boot_checked;
|
||||||
|
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||||
|
}
|
||||||
|
awake_checked: AuraPageData.led_power.rog.keyboard.awake;
|
||||||
|
awake_toggled => {
|
||||||
|
AuraPageData.led_power.rog.keyboard.awake = zone1.awake_checked;
|
||||||
|
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||||
|
}
|
||||||
|
sleep_checked: AuraPageData.led_power.rog.keyboard.sleep;
|
||||||
|
sleep_toggled => {
|
||||||
|
AuraPageData.led_power.rog.keyboard.sleep = zone1.sleep_checked;
|
||||||
|
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||||
|
}
|
||||||
|
shutdown_checked: AuraPageData.led_power.rog.keyboard.shutdown;
|
||||||
|
shutdown_toggled => {
|
||||||
|
AuraPageData.led_power.rog.keyboard.shutdown = zone1.shutdown_checked;
|
||||||
|
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if power == PowerZones.Logo: zone2:= AuraPowerGroup {
|
||||||
|
title: @tr("Lid Logo");
|
||||||
|
boot_checked: AuraPageData.led_power.rog.logo.boot;
|
||||||
|
boot_toggled => {
|
||||||
|
AuraPageData.led_power.rog.logo.boot = zone2.boot_checked;
|
||||||
|
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||||
|
}
|
||||||
|
awake_checked: AuraPageData.led_power.rog.logo.awake;
|
||||||
|
awake_toggled => {
|
||||||
|
AuraPageData.led_power.rog.logo.awake = zone2.awake_checked;
|
||||||
|
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||||
|
}
|
||||||
|
sleep_checked: AuraPageData.led_power.rog.logo.sleep;
|
||||||
|
sleep_toggled => {
|
||||||
|
AuraPageData.led_power.rog.logo.sleep = zone2.sleep_checked;
|
||||||
|
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||||
|
}
|
||||||
|
shutdown_checked: AuraPageData.led_power.rog.logo.shutdown;
|
||||||
|
shutdown_toggled => {
|
||||||
|
AuraPageData.led_power.rog.logo.shutdown = zone2.shutdown_checked;
|
||||||
|
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if power == PowerZones.Lightbar: zone3:= AuraPowerGroup {
|
||||||
|
title: @tr("Lightbar");
|
||||||
|
boot_checked: AuraPageData.led_power.rog.lightbar.boot;
|
||||||
|
boot_toggled => {
|
||||||
|
AuraPageData.led_power.rog.lightbar.boot = zone3.boot_checked;
|
||||||
|
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||||
|
}
|
||||||
|
awake_checked: AuraPageData.led_power.rog.lightbar.awake;
|
||||||
|
awake_toggled => {
|
||||||
|
AuraPageData.led_power.rog.lightbar.awake = zone3.awake_checked;
|
||||||
|
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||||
|
}
|
||||||
|
sleep_checked: AuraPageData.led_power.rog.lightbar.sleep;
|
||||||
|
sleep_toggled => {
|
||||||
|
AuraPageData.led_power.rog.lightbar.sleep = zone3.sleep_checked;
|
||||||
|
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||||
|
}
|
||||||
|
shutdown_checked: AuraPageData.led_power.rog.lightbar.shutdown;
|
||||||
|
shutdown_toggled => {
|
||||||
|
AuraPageData.led_power.rog.lightbar.shutdown = zone3.shutdown_checked;
|
||||||
|
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if power == PowerZones.Lid: zone4:= AuraPowerGroup {
|
||||||
|
title: @tr("Lid Zone");
|
||||||
|
boot_checked: AuraPageData.led_power.rog.lid.boot;
|
||||||
|
boot_toggled => {
|
||||||
|
AuraPageData.led_power.rog.lid.boot = zone4.boot_checked;
|
||||||
|
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||||
|
}
|
||||||
|
awake_checked: AuraPageData.led_power.rog.lid.awake;
|
||||||
|
awake_toggled => {
|
||||||
|
AuraPageData.led_power.rog.lid.awake = zone4.awake_checked;
|
||||||
|
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||||
|
}
|
||||||
|
sleep_checked: AuraPageData.led_power.rog.lid.sleep;
|
||||||
|
sleep_toggled => {
|
||||||
|
AuraPageData.led_power.rog.lid.sleep = zone4.sleep_checked;
|
||||||
|
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||||
|
}
|
||||||
|
shutdown_checked: AuraPageData.led_power.rog.lid.shutdown;
|
||||||
|
shutdown_toggled => {
|
||||||
|
AuraPageData.led_power.rog.lid.shutdown = zone4.shutdown_checked;
|
||||||
|
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if power == PowerZones.RearGlow: zone5:= AuraPowerGroup {
|
||||||
|
title: @tr("Rear Glow");
|
||||||
|
boot_checked: AuraPageData.led_power.rog.rear-glow.boot;
|
||||||
|
boot_toggled => {
|
||||||
|
AuraPageData.led_power.rog.rear-glow.boot = zone5.boot_checked;
|
||||||
|
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||||
|
}
|
||||||
|
awake_checked: AuraPageData.led_power.rog.rear-glow.awake;
|
||||||
|
awake_toggled => {
|
||||||
|
AuraPageData.led_power.rog.rear-glow.awake = zone5.awake_checked;
|
||||||
|
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||||
|
}
|
||||||
|
sleep_checked: AuraPageData.led_power.rog.rear-glow.sleep;
|
||||||
|
sleep_toggled => {
|
||||||
|
AuraPageData.led_power.rog.rear-glow.sleep = zone5.sleep_checked;
|
||||||
|
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||||
|
}
|
||||||
|
shutdown_checked: AuraPageData.led_power.rog.rear-glow.shutdown;
|
||||||
|
shutdown_toggled => {
|
||||||
|
AuraPageData.led_power.rog.rear-glow.shutdown = zone5.shutdown_checked;
|
||||||
|
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
x: root.width - self.width - 6px;
|
||||||
|
y: 6px;
|
||||||
|
text: "X";
|
||||||
|
height: 40px;
|
||||||
|
clicked => {
|
||||||
|
root.show_aura_power = false;
|
||||||
|
root.show_fade_cover = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if root.show_aura_power && AuraPageData.aura_type == AuraDevType.Old: Rectangle {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
opacity: 1;
|
||||||
|
ScrollView {
|
||||||
|
VerticalLayout {
|
||||||
|
padding: 30px;
|
||||||
|
padding-top: 10px;
|
||||||
|
spacing: 10px;
|
||||||
|
Rectangle {
|
||||||
|
border-radius: 20px;
|
||||||
|
background: Theme.window-background;
|
||||||
|
VerticalBox {
|
||||||
|
spacing: 10px;
|
||||||
|
alignment: LayoutAlignment.start;
|
||||||
|
Text {
|
||||||
|
font-size: 18px;
|
||||||
|
color: Theme.text-foreground-color;
|
||||||
|
horizontal-alignment: TextHorizontalAlignment.center;
|
||||||
|
text: @tr("Keyboard");
|
||||||
|
}
|
||||||
|
|
||||||
|
HorizontalBox {
|
||||||
|
SystemToggleVert {
|
||||||
|
max-height: 42px;
|
||||||
|
text: @tr("Boot");
|
||||||
|
}
|
||||||
|
|
||||||
|
SystemToggleVert {
|
||||||
|
max-height: 42px;
|
||||||
|
text: @tr("Awake");
|
||||||
|
}
|
||||||
|
|
||||||
|
SystemToggleVert {
|
||||||
|
max-height: 42px;
|
||||||
|
text: @tr("Sleep");
|
||||||
|
}
|
||||||
|
|
||||||
|
SystemToggleVert {
|
||||||
|
max-height: 42px;
|
||||||
|
text: @tr("Shutdown");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
x: root.width - self.width - 6px;
|
||||||
|
y: 6px;
|
||||||
|
text: "X";
|
||||||
|
height: 40px;
|
||||||
|
clicked => {
|
||||||
|
root.show_aura_power = false;
|
||||||
|
root.show_fade_cover = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if root.show_aura_power && AuraPageData.aura_type == AuraDevType.Tuf: Rectangle {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
opacity: 1;
|
||||||
|
ScrollView {
|
||||||
|
VerticalLayout {
|
||||||
|
padding: 30px;
|
||||||
|
padding-top: 10px;
|
||||||
|
spacing: 10px;
|
||||||
|
Rectangle {
|
||||||
|
border-radius: 20px;
|
||||||
|
background: Theme.window-background;
|
||||||
|
VerticalBox {
|
||||||
|
spacing: 10px;
|
||||||
|
alignment: LayoutAlignment.start;
|
||||||
|
Text {
|
||||||
|
font-size: 18px;
|
||||||
|
color: Theme.text-foreground-color;
|
||||||
|
horizontal-alignment: TextHorizontalAlignment.center;
|
||||||
|
text: @tr("Keyboard");
|
||||||
|
}
|
||||||
|
|
||||||
|
HorizontalBox {
|
||||||
|
SystemToggleVert {
|
||||||
|
max-height: 42px;
|
||||||
|
text: @tr("Boot");
|
||||||
|
}
|
||||||
|
|
||||||
|
SystemToggleVert {
|
||||||
|
max-height: 42px;
|
||||||
|
text: @tr("Awake");
|
||||||
|
}
|
||||||
|
|
||||||
|
SystemToggleVert {
|
||||||
|
max-height: 42px;
|
||||||
|
text: @tr("Sleep");
|
||||||
|
}
|
||||||
|
|
||||||
|
SystemToggleVert {
|
||||||
|
max-height: 42px;
|
||||||
|
text: @tr("Shutdown");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
x: root.width - self.width - 6px;
|
||||||
|
y: 6px;
|
||||||
|
text: "X";
|
||||||
|
height: 40px;
|
||||||
|
clicked => {
|
||||||
|
root.show_aura_power = false;
|
||||||
|
root.show_fade_cover = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { SystemSlider, SystemDropdown, SystemToggle } from "../common_widgets.slint";
|
import { SystemSlider, SystemDropdown, SystemToggle } from "../widgets/common.slint";
|
||||||
import { Theme } from "../globals.slint";
|
import { Theme } from "../globals.slint";
|
||||||
import { HorizontalBox , VerticalBox, ScrollView, Slider, Button, Switch, ComboBox, GroupBox} from "std-widgets.slint";
|
import { HorizontalBox , VerticalBox, ScrollView, Slider, Button, Switch, ComboBox, GroupBox} from "std-widgets.slint";
|
||||||
|
|
||||||
|
|||||||
158
rog-control-center/ui/types/aura_types.slint
Normal file
158
rog-control-center/ui/types/aura_types.slint
Normal file
@@ -0,0 +1,158 @@
|
|||||||
|
export enum AuraDevType {
|
||||||
|
Tuf,
|
||||||
|
Old,
|
||||||
|
New,
|
||||||
|
}
|
||||||
|
|
||||||
|
export struct AuraEffect {
|
||||||
|
/// The effect type
|
||||||
|
mode: int,
|
||||||
|
/// `AuraZone::None` for no zone or zoneless keyboards
|
||||||
|
zone: int,
|
||||||
|
/// Primary colour for all modes
|
||||||
|
colour1: color,
|
||||||
|
/// Secondary colour in some modes like Breathing or Stars
|
||||||
|
colour2: color,
|
||||||
|
/// One of three speeds for modes that support speed (most that animate)
|
||||||
|
speed: int,
|
||||||
|
/// Up, down, left, right. Only Rainbow mode seems to use this
|
||||||
|
direction: int,
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum AuraDevTuf {
|
||||||
|
Boot,
|
||||||
|
Awake,
|
||||||
|
Sleep,
|
||||||
|
Keyboard,
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum AuraDevRog1 {
|
||||||
|
Awake,
|
||||||
|
Keyboard,
|
||||||
|
Lightbar,
|
||||||
|
Boot,
|
||||||
|
Sleep,
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum PowerZones {
|
||||||
|
Logo,
|
||||||
|
Keyboard,
|
||||||
|
Lightbar,
|
||||||
|
Lid,
|
||||||
|
RearGlow,
|
||||||
|
}
|
||||||
|
|
||||||
|
export struct KbAuraPowerState {
|
||||||
|
zone: PowerZones,
|
||||||
|
boot: bool,
|
||||||
|
awake: bool,
|
||||||
|
sleep: bool,
|
||||||
|
shutdown: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
export struct AuraPower {
|
||||||
|
keyboard: KbAuraPowerState,
|
||||||
|
logo: KbAuraPowerState,
|
||||||
|
lightbar: KbAuraPowerState,
|
||||||
|
lid: KbAuraPowerState,
|
||||||
|
rear_glow: KbAuraPowerState,
|
||||||
|
}
|
||||||
|
|
||||||
|
export struct AuraPowerDev {
|
||||||
|
tuf: [AuraDevTuf],
|
||||||
|
old_rog: [AuraDevRog1],
|
||||||
|
rog: AuraPower,
|
||||||
|
}
|
||||||
|
|
||||||
|
export global AuraPageData {
|
||||||
|
in-out property <[string]> brightness_names: [
|
||||||
|
@tr("Aura brightness" => "Off"),
|
||||||
|
@tr("Aura brightness" => "Low"),
|
||||||
|
@tr("Aura brightness" => "Med"),
|
||||||
|
@tr("Aura brightness" => "High"),
|
||||||
|
];
|
||||||
|
in-out property <int> brightness;
|
||||||
|
callback set_brightness(int);
|
||||||
|
in-out property <[string]> mode_names: [
|
||||||
|
@tr("Basic aura mode" => "Static"),
|
||||||
|
@tr("Basic aura mode" => "Breathe"),
|
||||||
|
@tr("Basic aura mode" => "Strobe"),
|
||||||
|
@tr("Basic aura mode" => "Rainbow"),
|
||||||
|
@tr("Basic aura mode" => "Star"),
|
||||||
|
@tr("Basic aura mode" => "Rain"),
|
||||||
|
@tr("Basic aura mode" => "Highlight"),
|
||||||
|
@tr("Basic aura mode" => "Laser"),
|
||||||
|
@tr("Basic aura mode" => "Ripple"),
|
||||||
|
@tr("Basic aura mode" => "Nothing"),
|
||||||
|
@tr("Basic aura mode" => "Pulse"),
|
||||||
|
@tr("Basic aura mode" => "Comet"),
|
||||||
|
@tr("Basic aura mode" => "Flash"),
|
||||||
|
];
|
||||||
|
in-out property <[string]> available_mode_names: [
|
||||||
|
@tr("Basic aura mode" => "Static"),
|
||||||
|
@tr("Basic aura mode" => "Breathe"),
|
||||||
|
@tr("Basic aura mode" => "Strobe"),
|
||||||
|
];
|
||||||
|
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> led_mode;
|
||||||
|
callback set_led_mode(int);
|
||||||
|
in-out property <[string]> zone_names: [
|
||||||
|
@tr("Aura zone" => "None"),
|
||||||
|
@tr("Aura zone" => "Key1"),
|
||||||
|
@tr("Aura zone" => "Key2"),
|
||||||
|
@tr("Aura zone" => "Key3"),
|
||||||
|
@tr("Aura zone" => "Key4"),
|
||||||
|
@tr("Aura zone" => "Logo"),
|
||||||
|
@tr("Aura zone" => "Lightbar Left"),
|
||||||
|
@tr("Aura zone" => "Lightbar Right"),
|
||||||
|
];
|
||||||
|
in-out property <int> zone;
|
||||||
|
in-out property <[string]> direction_names: [
|
||||||
|
@tr("Aura direction" => "Right"),
|
||||||
|
@tr("Aura direction" => "Left"),
|
||||||
|
@tr("Aura direction" => "Up"),
|
||||||
|
@tr("Aura direction" => "Down"),
|
||||||
|
];
|
||||||
|
in-out property <int> direction;
|
||||||
|
in-out property <[string]> speed_names: [
|
||||||
|
@tr("Aura speed" => "Low"),
|
||||||
|
@tr("Aura speed" => "Medium"),
|
||||||
|
@tr("Aura speed" => "High"),
|
||||||
|
];
|
||||||
|
in-out property <int> speed;
|
||||||
|
in-out property <AuraEffect> led_mode_data: {
|
||||||
|
mode: 0,
|
||||||
|
zone: 0,
|
||||||
|
colour1: Colors.aquamarine,
|
||||||
|
colourbox1: Colors.aquamarine,
|
||||||
|
colour2: Colors.hotpink,
|
||||||
|
colourbox2: Colors.hotpink,
|
||||||
|
speed: 0,
|
||||||
|
direction: 0,
|
||||||
|
};
|
||||||
|
callback set_led_mode_data(AuraEffect);
|
||||||
|
in-out property <color> color1;
|
||||||
|
in-out property <brush> colorbox1;
|
||||||
|
in-out property <color> color2;
|
||||||
|
in-out property <brush> colorbox2;
|
||||||
|
callback update_led_mode_data(AuraEffect);
|
||||||
|
update_led_mode_data(data) => {
|
||||||
|
led_mode_data = data;
|
||||||
|
current_available_mode = data.mode;
|
||||||
|
zone = data.zone;
|
||||||
|
speed = data.speed;
|
||||||
|
direction = data.direction;
|
||||||
|
color1 = data.colour1;
|
||||||
|
color2 = data.colour2;
|
||||||
|
colorbox1 = data.colour1;
|
||||||
|
colorbox2 = data.colour2;
|
||||||
|
}
|
||||||
|
callback set_hex_from_colour(color) -> string;
|
||||||
|
callback set_hex_to_colour(string) -> color;
|
||||||
|
|
||||||
|
in-out property <AuraDevType> aura_type: AuraDevType.New;
|
||||||
|
in-out property <[PowerZones]> supported_power_zones: [PowerZones.Keyboard, PowerZones.RearGlow, PowerZones.Lid, PowerZones.Lightbar, PowerZones.Logo];
|
||||||
|
in-out property <AuraPowerDev> led_power;
|
||||||
|
callback set_led_power(AuraPowerDev);
|
||||||
|
}
|
||||||
67
rog-control-center/ui/widgets/aura_power.slint
Normal file
67
rog-control-center/ui/widgets/aura_power.slint
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
import { VerticalBox, HorizontalBox } from "std-widgets.slint";
|
||||||
|
import { SystemToggleVert } from "common.slint";
|
||||||
|
import { Theme } from "../globals.slint";
|
||||||
|
|
||||||
|
export component AuraPowerGroup inherits Rectangle {
|
||||||
|
border-radius: 20px;
|
||||||
|
background: Theme.window-background;
|
||||||
|
|
||||||
|
in-out property <string> title;
|
||||||
|
in-out property <bool> boot_checked;
|
||||||
|
in-out property <bool> awake_checked;
|
||||||
|
in-out property <bool> sleep_checked;
|
||||||
|
in-out property <bool> shutdown_checked;
|
||||||
|
callback boot_toggled(bool);
|
||||||
|
callback awake_toggled(bool);
|
||||||
|
callback sleep_toggled(bool);
|
||||||
|
callback shutdown_toggled(bool);
|
||||||
|
|
||||||
|
VerticalBox {
|
||||||
|
spacing: 10px;
|
||||||
|
alignment: LayoutAlignment.start;
|
||||||
|
Text {
|
||||||
|
font-size: 18px;
|
||||||
|
color: Theme.text-foreground-color;
|
||||||
|
horizontal-alignment: TextHorizontalAlignment.center;
|
||||||
|
text <=> root.title;
|
||||||
|
}
|
||||||
|
|
||||||
|
HorizontalBox {
|
||||||
|
SystemToggleVert {
|
||||||
|
max-height: 42px;
|
||||||
|
text: @tr("Boot");
|
||||||
|
checked <=> root.boot_checked;
|
||||||
|
toggled => {
|
||||||
|
root.boot_toggled(self.checked);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SystemToggleVert {
|
||||||
|
max-height: 42px;
|
||||||
|
text: @tr("Awake");
|
||||||
|
checked <=> root.awake_checked;
|
||||||
|
toggled => {
|
||||||
|
root.awake_toggled(self.checked);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SystemToggleVert {
|
||||||
|
max-height: 42px;
|
||||||
|
text: @tr("Sleep");
|
||||||
|
checked <=> root.sleep_checked;
|
||||||
|
toggled => {
|
||||||
|
root.sleep_toggled(self.checked);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SystemToggleVert {
|
||||||
|
max-height: 42px;
|
||||||
|
text: @tr("Shutdown");
|
||||||
|
checked <=> root.shutdown_checked;
|
||||||
|
toggled => {
|
||||||
|
root.shutdown_toggled(self.checked);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,19 +13,43 @@ export component ColourSlider inherits VerticalLayout {
|
|||||||
in-out property <float> c1value<=> c1.value;
|
in-out property <float> c1value<=> c1.value;
|
||||||
in-out property <float> c2value<=> c2.value;
|
in-out property <float> c2value<=> c2.value;
|
||||||
property <[color]> base_colours: [
|
property <[color]> base_colours: [
|
||||||
Colors.rgb( 255, 0, 0),
|
hsv(0, 1, 1),
|
||||||
Colors.rgb( 255, 128, 0),
|
hsv(10, 1, 1),
|
||||||
Colors.rgb( 255, 255, 0),
|
hsv(20, 1, 1),
|
||||||
Colors.rgb( 128, 255, 0),
|
hsv(30, 1, 1),
|
||||||
Colors.rgb( 0, 255, 0),
|
hsv(40, 1, 1),
|
||||||
Colors.rgb( 0, 255, 128),
|
hsv(50, 1, 1),
|
||||||
Colors.rgb( 0, 255, 255),
|
hsv(60, 1, 1),
|
||||||
Colors.rgb( 0, 128, 255),
|
hsv(70, 1, 1),
|
||||||
Colors.rgb( 0, 0, 255),
|
hsv(80, 1, 1),
|
||||||
Colors.rgb( 127, 0, 255),
|
hsv(90, 1, 1),
|
||||||
Colors.rgb( 255, 0, 255),
|
hsv(100, 1, 1),
|
||||||
Colors.rgb( 255, 0, 127),
|
hsv(110, 1, 1),
|
||||||
Colors.rgb( 128, 128, 128)
|
hsv(120, 1, 1),
|
||||||
|
hsv(130, 1, 1),
|
||||||
|
hsv(140, 1, 1),
|
||||||
|
hsv(150, 1, 1),
|
||||||
|
hsv(160, 1, 1),
|
||||||
|
hsv(170, 1, 1),
|
||||||
|
hsv(180, 1, 1),
|
||||||
|
hsv(190, 1, 1),
|
||||||
|
hsv(200, 1, 1),
|
||||||
|
hsv(210, 1, 1),
|
||||||
|
hsv(220, 1, 1),
|
||||||
|
hsv(230, 1, 1),
|
||||||
|
hsv(240, 1, 1),
|
||||||
|
hsv(250, 1, 1),
|
||||||
|
hsv(260, 1, 1),
|
||||||
|
hsv(270, 1, 1),
|
||||||
|
hsv(280, 1, 1),
|
||||||
|
hsv(290, 1, 1),
|
||||||
|
hsv(300, 1, 1),
|
||||||
|
hsv(310, 1, 1),
|
||||||
|
hsv(320, 1, 1),
|
||||||
|
hsv(330, 1, 1),
|
||||||
|
hsv(340, 1, 1),
|
||||||
|
hsv(350, 1, 1),
|
||||||
|
hsv(360, 1, 1),
|
||||||
];
|
];
|
||||||
property <[color]> base_shade: [
|
property <[color]> base_shade: [
|
||||||
blend_lightness(base_colour, 1.0),
|
blend_lightness(base_colour, 1.0),
|
||||||
@@ -42,15 +66,13 @@ export component ColourSlider inherits VerticalLayout {
|
|||||||
];
|
];
|
||||||
|
|
||||||
function blend_lightness(c1: color, f: float) -> color {
|
function blend_lightness(c1: color, f: float) -> color {
|
||||||
rgb(c1.red() * f, c1.green() * f, c1.blue() * f)
|
rgb(c1.red * f, c1.green * f, c1.blue * f)
|
||||||
}
|
}
|
||||||
|
|
||||||
function set_base_colour() {
|
function set_base_colour() {
|
||||||
root.base_colour = base_colours[c1.value].linear-blend(base_colours[c1.value + 1], c1.value - Math.floor(c1.value));
|
root.base_colour = base_colours[c1.value].interpolate(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();
|
||||||
callback external_colour_change();
|
|
||||||
external_colour_change => {
|
external_colour_change => {
|
||||||
if (root.final_colour.hue() < 0) {
|
if (root.final_colour.hue() < 0) {
|
||||||
c1.value = (root.base_colours.length - 1) * ((root.final_colour.hue() + 360) / 360);
|
c1.value = (root.base_colours.length - 1) * ((root.final_colour.hue() + 360) / 360);
|
||||||
@@ -64,14 +86,15 @@ export component ColourSlider inherits VerticalLayout {
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
// 13 colours
|
// 13 colours
|
||||||
background: @linear-gradient(90deg, base_colours[0], base_colours[1], base_colours[2], base_colours[3], base_colours[4], base_colours[5], base_colours[6], base_colours[7], base_colours[8], base_colours[9], base_colours[10], base_colours[11], base_colours[12]);
|
background: @linear-gradient(90deg, base_colours[0], base_colours[1], base_colours[2], base_colours[3], base_colours[4], base_colours[5], base_colours[6], base_colours[7], base_colours[8], base_colours[9], base_colours[10], base_colours[11], base_colours[12], base_colours[13], base_colours[14], base_colours[15], base_colours[16], base_colours[17], base_colours[18], base_colours[19], base_colours[20], base_colours[21], base_colours[22], base_colours[23], base_colours[24], base_colours[25], base_colours[26], base_colours[27], base_colours[28], base_colours[29], base_colours[30], base_colours[31], base_colours[32], base_colours[33], base_colours[34], base_colours[35]);
|
||||||
clip: true;
|
clip: true;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
c1 := Slider {
|
c1 := Slider {
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
height: parent.height;
|
height: parent.height;
|
||||||
minimum: 0;
|
minimum: 0;
|
||||||
maximum: root.base_colours.length - 1; // One less than the array length
|
maximum: root.base_colours.length - 1;
|
||||||
|
// One less than the array length
|
||||||
changed => {
|
changed => {
|
||||||
set_base_colour();
|
set_base_colour();
|
||||||
hex = set_hex_from_colour(final_colour);
|
hex = set_hex_from_colour(final_colour);
|
||||||
@@ -110,7 +133,6 @@ export component ColourSlider inherits VerticalLayout {
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
width: self.height;
|
width: self.height;
|
||||||
background <=> root.colourbox;
|
background <=> root.colourbox;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { VerticalBox , StandardButton, Button, HorizontalBox, ComboBox, Switch, Slider} from "std-widgets.slint";
|
import { VerticalBox , StandardButton, Button, HorizontalBox, ComboBox, Switch, Slider} from "std-widgets.slint";
|
||||||
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;
|
||||||
@@ -76,6 +76,36 @@ export component SystemToggle inherits RogItem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export component SystemToggleVert inherits RogItem {
|
||||||
|
in property <string> text;
|
||||||
|
in-out property <bool> checked;
|
||||||
|
callback toggled(bool);
|
||||||
|
VerticalLayout {
|
||||||
|
HorizontalBox {
|
||||||
|
alignment: LayoutAlignment.center;
|
||||||
|
padding-top: 10px;
|
||||||
|
Text {
|
||||||
|
font-size: 16px;
|
||||||
|
vertical-alignment: TextVerticalAlignment.bottom;
|
||||||
|
horizontal-alignment: TextHorizontalAlignment.center;
|
||||||
|
color: Theme.text-foreground-color;
|
||||||
|
text <=> root.text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
HorizontalBox {
|
||||||
|
alignment: LayoutAlignment.center;
|
||||||
|
padding: 10px;
|
||||||
|
Switch {
|
||||||
|
checked <=> root.checked;
|
||||||
|
toggled => {
|
||||||
|
root.toggled(root.checked)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export component SystemDropdown inherits RogItem {
|
export component SystemDropdown inherits RogItem {
|
||||||
in property <string> text;
|
in property <string> text;
|
||||||
in-out property <int> current_index;
|
in-out property <int> current_index;
|
||||||
@@ -4,11 +4,13 @@
|
|||||||
import { StyleMetrics } from "std-widgets.slint";
|
import { StyleMetrics } from "std-widgets.slint";
|
||||||
|
|
||||||
component SideBarItem inherits Rectangle {
|
component SideBarItem inherits Rectangle {
|
||||||
|
padding: 10px;
|
||||||
in property <bool> selected;
|
in property <bool> selected;
|
||||||
in property <bool> has-focus;
|
in property <bool> has-focus;
|
||||||
in-out property <string> text<=> label.text;
|
in-out property <string> text<=> label.text;
|
||||||
callback clicked<=>touch.clicked;
|
callback clicked<=>touch.clicked;
|
||||||
min-height: self.visible ? l.preferred-height : 0px;
|
min-height: self.visible ? l.preferred-height + 10px : 0px;
|
||||||
|
// min-width: self.visible ? l.preferred-width + 10px : 0px;
|
||||||
states [
|
states [
|
||||||
pressed when touch.pressed: {
|
pressed when touch.pressed: {
|
||||||
state.opacity: 0.8;
|
state.opacity: 0.8;
|
||||||
@@ -30,6 +32,7 @@ component SideBarItem inherits Rectangle {
|
|||||||
background: StyleMetrics.window-background;
|
background: StyleMetrics.window-background;
|
||||||
animate opacity { duration: 150ms; }
|
animate opacity { duration: 150ms; }
|
||||||
animate border-width { duration: 150ms; }
|
animate border-width { duration: 150ms; }
|
||||||
|
height: l.preferred-height;
|
||||||
}
|
}
|
||||||
|
|
||||||
l := HorizontalLayout {
|
l := HorizontalLayout {
|
||||||
@@ -102,7 +105,7 @@ export component SideBar inherits Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
navigation := VerticalLayout {
|
navigation := VerticalLayout {
|
||||||
spacing: 10px;
|
// spacing: 10px;
|
||||||
alignment: start;
|
alignment: start;
|
||||||
vertical-stretch: 0;
|
vertical-stretch: 0;
|
||||||
for item[index] in root.model: SideBarItem {
|
for item[index] in root.model: SideBarItem {
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ trait Aura {
|
|||||||
#[zbus(property)]
|
#[zbus(property)]
|
||||||
fn led_power(&self) -> zbus::Result<AuraPowerDev>;
|
fn led_power(&self) -> zbus::Result<AuraPowerDev>;
|
||||||
#[zbus(property)]
|
#[zbus(property)]
|
||||||
fn set_led_power(&self, value: (AuraPowerDev, bool)) -> zbus::Result<()>;
|
fn set_led_power(&self, value: AuraPowerDev) -> zbus::Result<()>;
|
||||||
|
|
||||||
/// SupportedBrightness property
|
/// SupportedBrightness property
|
||||||
#[zbus(property)]
|
#[zbus(property)]
|
||||||
|
|||||||
Reference in New Issue
Block a user