Add: Power button widget
- Just another square button - Constant icon
This commit is contained in:
parent
68037d7f24
commit
c73a4b575e
@ -73,6 +73,15 @@ export component TopBar inherits Window {
|
|||||||
in property <color> notif_bg_clicked: #4a5f70;*/
|
in property <color> notif_bg_clicked: #4a5f70;*/
|
||||||
callback show_notif();
|
callback show_notif();
|
||||||
|
|
||||||
|
// Power button
|
||||||
|
in property <string> power_tooltip;
|
||||||
|
in property <string> power_icon: "";
|
||||||
|
/*in property <color> power_icon_color: #ffffff;
|
||||||
|
in property <color> power_bg_normal: #8e9162;
|
||||||
|
in property <color> power_bg_hover: #6d8a4d;
|
||||||
|
in property <color> power_bg_clicked: #4a5f70;*/
|
||||||
|
callback show_power();
|
||||||
|
|
||||||
title: "chocobar";
|
title: "chocobar";
|
||||||
width: bar_width *1px;
|
width: bar_width *1px;
|
||||||
height: bar_height *1px;
|
height: bar_height *1px;
|
||||||
@ -154,7 +163,7 @@ export component TopBar inherits Window {
|
|||||||
square_btn_callback => root.show_wifi();
|
square_btn_callback => root.show_wifi();
|
||||||
}
|
}
|
||||||
|
|
||||||
// SquareIconWidget - brightness
|
// SquareIconWidget - Brightness
|
||||||
SquareIconWidget {
|
SquareIconWidget {
|
||||||
bar_height: root.bar_height;
|
bar_height: root.bar_height;
|
||||||
icon_text: root.brightness_icon;
|
icon_text: root.brightness_icon;
|
||||||
@ -203,6 +212,18 @@ export component TopBar inherits Window {
|
|||||||
// Forward the widget's callback to the root's to access from Rust
|
// Forward the widget's callback to the root's to access from Rust
|
||||||
show_clock => root.show_clock();
|
show_clock => root.show_clock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SquareIconWidget - Power button
|
||||||
|
SquareIconWidget {
|
||||||
|
bar_height: root.bar_height;
|
||||||
|
icon_text: root.power_icon;
|
||||||
|
tooltip_text: root.power_tooltip;
|
||||||
|
/*icon_color: root.power_icon_color;
|
||||||
|
bg_normal: root.power_bg_normal;
|
||||||
|
bg_hover: root.power_bg_hover;
|
||||||
|
bg_clicked: root.power_bg_clicked;*/
|
||||||
|
square_btn_callback => root.show_power();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user