mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
feat(ui): Major UI update to Slint components
- Add real-time system status components - Add theme support - Improve layouts
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { SystemDropdown, SystemToggle } from "../widgets/common.slint";
|
||||
import { Palette, GroupBox, VerticalBox, Button, HorizontalBox } from "std-widgets.slint";
|
||||
import { RogPalette } from "../themes/rog_theme.slint";
|
||||
|
||||
export global AnimePageData {
|
||||
in-out property <[string]> brightness_names: [
|
||||
@@ -36,8 +37,12 @@ export component PageAnime inherits Rectangle {
|
||||
property <bool> show_display_advanced: false;
|
||||
property <bool> show_builtin_advanced: false;
|
||||
clip: true;
|
||||
|
||||
VerticalLayout {
|
||||
// TODO: slow with border-radius
|
||||
//padding only has effect on layout elements
|
||||
//padding: 8px;
|
||||
// height: parent.height - infobar.height - mainview.padding - self.padding * 2;
|
||||
// TODO: border-radius: 8px;
|
||||
VerticalLayout {
|
||||
padding: 10px;
|
||||
spacing: 10px;
|
||||
HorizontalLayout {
|
||||
@@ -105,7 +110,7 @@ export component PageAnime inherits Rectangle {
|
||||
if root.show_fade_cover: Rectangle {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: Palette.background;
|
||||
background: RogPalette.background;
|
||||
opacity: 0.8;
|
||||
TouchArea {
|
||||
height: 100%;
|
||||
@@ -128,9 +133,8 @@ export component PageAnime inherits Rectangle {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 1;
|
||||
background: Palette.background;
|
||||
VerticalLayout {
|
||||
padding: 4px;
|
||||
padding: 50px;
|
||||
spacing: 10px;
|
||||
GroupBox {
|
||||
height: 10px;
|
||||
@@ -138,8 +142,8 @@ export component PageAnime inherits Rectangle {
|
||||
spacing: 10px;
|
||||
alignment: LayoutAlignment.start;
|
||||
Text {
|
||||
font-size: 16px;
|
||||
color: Palette.control-foreground;
|
||||
font-size: 18px;
|
||||
color: RogPalette.text-primary;
|
||||
horizontal-alignment: TextHorizontalAlignment.center;
|
||||
text: @tr("Set which builtin animations are played");
|
||||
}
|
||||
@@ -190,8 +194,8 @@ export component PageAnime inherits Rectangle {
|
||||
Button {
|
||||
x: root.width - self.width - 6px;
|
||||
y: 6px;
|
||||
text: "✕";
|
||||
height: 36px;
|
||||
text: "X";
|
||||
height: 40px;
|
||||
clicked => {
|
||||
root.show_builtin_advanced = false;
|
||||
root.show_fade_cover = false;
|
||||
@@ -203,9 +207,8 @@ export component PageAnime inherits Rectangle {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 1;
|
||||
background: Palette.background;
|
||||
VerticalLayout {
|
||||
padding: 4px;
|
||||
padding: 50px;
|
||||
spacing: 10px;
|
||||
GroupBox {
|
||||
height: 100px;
|
||||
@@ -213,8 +216,8 @@ export component PageAnime inherits Rectangle {
|
||||
spacing: 10px;
|
||||
alignment: LayoutAlignment.start;
|
||||
Text {
|
||||
font-size: 16px;
|
||||
color: Palette.control-foreground;
|
||||
font-size: 18px;
|
||||
color: RogPalette.text-primary;
|
||||
horizontal-alignment: TextHorizontalAlignment.center;
|
||||
text: @tr("Advanced Display Settings");
|
||||
}
|
||||
@@ -252,8 +255,8 @@ export component PageAnime inherits Rectangle {
|
||||
Button {
|
||||
x: root.width - self.width - 6px;
|
||||
y: 6px;
|
||||
text: "✕";
|
||||
height: 36px;
|
||||
text: "X";
|
||||
height: 40px;
|
||||
clicked => {
|
||||
root.show_display_advanced = false;
|
||||
root.show_fade_cover = false;
|
||||
|
||||
Reference in New Issue
Block a user