mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
61 lines
2.1 KiB
Plaintext
61 lines
2.1 KiB
Plaintext
import { Palette } from "std-widgets.slint";
|
|
import { SystemToggle } from "../widgets/common.slint";
|
|
|
|
export global AppSettingsPageData {
|
|
in-out property <bool> run_in_background;
|
|
callback set_run_in_background(bool);
|
|
in-out property <bool> startup_in_background;
|
|
callback set_startup_in_background(bool);
|
|
in-out property <bool> enable_tray_icon;
|
|
callback set_enable_tray_icon(bool);
|
|
in-out property <bool> enable_dgpu_notifications;
|
|
callback set_enable_dgpu_notifications(bool);
|
|
}
|
|
|
|
export component PageAppSettings inherits VerticalLayout {
|
|
Rectangle {
|
|
clip: true;
|
|
|
|
mainview := VerticalLayout {
|
|
padding: 10px;
|
|
spacing: 10px;
|
|
SystemToggle {
|
|
text: @tr("Run in background after closing");
|
|
checked <=> AppSettingsPageData.run_in_background;
|
|
toggled => {
|
|
AppSettingsPageData.set_run_in_background(AppSettingsPageData.run_in_background)
|
|
}
|
|
}
|
|
|
|
SystemToggle {
|
|
text: @tr("Start app in background (UI closed)");
|
|
checked <=> AppSettingsPageData.startup_in_background;
|
|
toggled => {
|
|
AppSettingsPageData.set_startup_in_background(AppSettingsPageData.startup_in_background)
|
|
}
|
|
}
|
|
|
|
SystemToggle {
|
|
text: @tr("Enable system tray icon");
|
|
checked <=> AppSettingsPageData.enable_tray_icon;
|
|
toggled => {
|
|
AppSettingsPageData.set_enable_tray_icon(AppSettingsPageData.enable_tray_icon)
|
|
}
|
|
}
|
|
|
|
SystemToggle {
|
|
text: @tr("Enable dGPU notifications");
|
|
checked <=> AppSettingsPageData.enable_dgpu_notifications;
|
|
toggled => {
|
|
AppSettingsPageData.set_enable_dgpu_notifications(AppSettingsPageData.enable_dgpu_notifications)
|
|
}
|
|
}
|
|
|
|
Text {
|
|
color: Palette.accent-background;
|
|
text: " WIP: some features like notifications are not complete";
|
|
}
|
|
}
|
|
}
|
|
}
|