diff --git a/ui/topbar.slint b/ui/topbar.slint index 2c3de8d..455a5f5 100644 --- a/ui/topbar.slint +++ b/ui/topbar.slint @@ -73,6 +73,15 @@ export component TopBar inherits Window { in property notif_bg_clicked: #4a5f70;*/ callback show_notif(); + // Power button + in property power_tooltip; + in property power_icon: ""; + /*in property power_icon_color: #ffffff; + in property power_bg_normal: #8e9162; + in property power_bg_hover: #6d8a4d; + in property power_bg_clicked: #4a5f70;*/ + callback show_power(); + title: "chocobar"; width: bar_width *1px; height: bar_height *1px; @@ -154,7 +163,7 @@ export component TopBar inherits Window { square_btn_callback => root.show_wifi(); } - // SquareIconWidget - brightness + // SquareIconWidget - Brightness SquareIconWidget { bar_height: root.bar_height; 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 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(); + } } } }