mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Init with colour sliders in approx position
This commit is contained in:
@@ -2,10 +2,10 @@ import { VerticalBox , StandardButton, Button, HorizontalBox, ComboBox, Switch,
|
||||
import { Theme } from "globals.slint";
|
||||
|
||||
export component RogItem inherits Rectangle {
|
||||
background: Theme.background-color;
|
||||
border-color: Colors.black;
|
||||
border-width: 3px;
|
||||
border-radius: 10px;
|
||||
background: Theme.background-color;
|
||||
border-color: Colors.black;
|
||||
border-width: 3px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
export component SystemSlider inherits RogItem {
|
||||
@@ -122,8 +122,7 @@ export component ValueBar inherits Rectangle {
|
||||
return 0.50 - (value - (min - max) / 2) / (max - min);
|
||||
}
|
||||
return (value - min) / (max - min);
|
||||
}
|
||||
function set_x(min: float, max: float, value: float, width: length) -> length {
|
||||
}function set_x(min: float, max: float, value: float, width: length) -> length {
|
||||
if (min < 0.0 && max > 0.0) {
|
||||
if (value < max + min) {
|
||||
return width / 2 - width * (percentage(min, max, value));
|
||||
@@ -131,8 +130,7 @@ export component ValueBar inherits Rectangle {
|
||||
return width / 2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Rectangle {
|
||||
}Rectangle {
|
||||
border-radius: 3px;
|
||||
background: Theme.neutral-box;
|
||||
Rectangle {
|
||||
|
||||
Reference in New Issue
Block a user