Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/css/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/* Global font and color settings for readability */
window, label, button, row {
font-size: 14pt;
color: white;
}
Comment on lines +1 to +5

Copilot AI Feb 1, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This CSS approach deviates from the established codebase convention of using class-based selectors for styling. The existing CSS rules in this file (.button-next-last-page, .button-green, .text-error) all use specific class selectors that are explicitly applied in Python code, providing fine-grained control and avoiding unintended side effects. Using broad element-type selectors (window, label, button, entry, row) breaks this pattern and may have unforeseen consequences across the application. Consider following the existing convention by creating specific CSS classes (e.g., .large-text, .high-contrast) and applying them to elements that need enhanced readability.

Copilot uses AI. Check for mistakes.

.button-next-last-page {
background-color: #FF6347; /* Tomato color */
color: white; /* Text color */
Expand Down
28 changes: 15 additions & 13 deletions src/sysinfo.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import gi
gi.require_version('Adw', '1')
gi.require_version('Gtk', '4.0')

gi.require_version("Adw", "1")
gi.require_version("Gtk", "4.0")
from gi.repository import Adw, Gtk
from utils import Utils


class SysInfo(Adw.Bin):
def __init__(self):
super().__init__()
Expand Down Expand Up @@ -35,11 +37,11 @@ def __init__(self):
self.landscape_row = Adw.ActionRow()
self.landscape_row.set_title("Landscape Status")

vender_row = Adw.ActionRow()
vender_row.set_title("Manufacturer")
vender_row.set_subtitle(utils.get_vender())
# Set Vender row to emblem-ok-symbolic
vender_row.set_icon_name("emblem-ok-symbolic")
vendor_row = Adw.ActionRow()
vendor_row.set_title("Manufacturer")
vendor_row.set_subtitle(utils.get_vendor())
# Set vendor row to emblem-ok-symbolic
vendor_row.set_icon_name("emblem-ok-symbolic")

model_row = Adw.ActionRow()
model_row.set_title("Model")
Expand Down Expand Up @@ -67,9 +69,9 @@ def __init__(self):
self.mem_row.set_subtitle(utils.get_mem() + " GB")

self.disks_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
#self.disk_row = Adw.ExpanderRow(title="Disks")
#self.disk_row.set_visible(False)
#self.disk_row.set_expanded(False)
# self.disk_row = Adw.ExpanderRow(title="Disks")
# self.disk_row.set_visible(False)
# self.disk_row.set_expanded(False)

self.battery_row = Adw.ExpanderRow(title="Batteries")
self.battery_row.set_visible(False)
Expand All @@ -78,7 +80,7 @@ def __init__(self):
# Add rows to the list box
list_box.append(self.hostname_row)
list_box.append(self.landscape_row)
list_box.append(vender_row)
list_box.append(vendor_row)
list_box.append(model_row)
list_box.append(cpu_row)
list_box.append(os_row)
Expand Down Expand Up @@ -175,7 +177,7 @@ def on_shown(self):
for battery in batteries.keys():
row = Adw.ActionRow()
row.set_title(f"{str(battery)})")
row.set_subtitle(f'{str(batteries[battery])}%')
row.set_subtitle(f"{str(batteries[battery])}%")
self.battery_row.add_row(row)
self.battery_row.set_expanded(True)
# Set Battery row to emblem-ok-symbolic if battery capacity is greater than 70%, else set row to emblem-important-symbolic
Expand All @@ -188,5 +190,5 @@ def on_shown(self):
self.batteries_populated = True

state = self.state.get_value()
state['SysInfo'] = passed
state["SysInfo"] = passed
print("sysinfo:on_shown " + str(self.state.get_value()))