55import gi
66gi .require_version ("Gtk" , "4.0" )
77gi .require_version ("Adw" , "1" )
8- from gi .repository import Gtk , Adw , GLib
8+ from gi .repository import Gtk , Adw
99
1010import threading
1111
@@ -27,8 +27,9 @@ def _build_ui(self):
2727 self .status_group = Adw .PreferencesGroup (title = "Battery Status" )
2828
2929 self .bat_percentage_row = Adw .ActionRow (title = "Charge Level" , subtitle = "--" )
30- self .bat_percentage_bar = Gtk .LevelBar (min_value = 0 , max_value = 100 , hexpand = True ,
31- valign = Gtk .Align .CENTER )
30+ self .bat_percentage_bar = Gtk .LevelBar (
31+ min_value = 0 , max_value = 100 , hexpand = True ,
32+ valign = Gtk .Align .CENTER )
3233 self .bat_percentage_bar .set_size_request (200 , - 1 )
3334 self .bat_percentage_row .add_suffix (self .bat_percentage_bar )
3435 self .status_group .add (self .bat_percentage_row )
@@ -67,8 +68,9 @@ def _build_ui(self):
6768 self .calibration_group .add (self .calibration_status_row )
6869
6970 # Calibration buttons
70- cal_button_box = Gtk .Box (orientation = Gtk .Orientation .HORIZONTAL , spacing = 12 ,
71- halign = Gtk .Align .CENTER , margin_top = 12 )
71+ cal_button_box = Gtk .Box (
72+ orientation = Gtk .Orientation .HORIZONTAL , spacing = 12 ,
73+ halign = Gtk .Align .CENTER , margin_top = 12 )
7274
7375 self .start_cal_button = Gtk .Button (label = "Start Calibration" )
7476 self .start_cal_button .add_css_class ("suggested-action" )
@@ -124,8 +126,9 @@ def _build_ui(self):
124126 orientation = Gtk .Orientation .VERTICAL ,
125127 valign = Gtk .Align .CENTER , vexpand = True , spacing = 12 ,
126128 )
127- no_bat_icon = Gtk .Image (icon_name = "battery-missing-symbolic" , pixel_size = 64 ,
128- opacity = 0.5 )
129+ no_bat_icon = Gtk .Image (
130+ icon_name = "battery-missing-symbolic" , pixel_size = 64 ,
131+ opacity = 0.5 )
129132 no_bat_label = Gtk .Label (label = "No battery detected" )
130133 no_bat_label .add_css_class ("title-2" )
131134 no_bat_label .set_opacity (0.5 )
0 commit comments