Widgets Tweaks
This commit is contained in:
1 parent
ed4ff63b59
commit
df45a7f821
2 files changed
+20
-19
No files matched your search
@@ -293,7 +293,7 @@ menu > menuitem:hover > label {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#free-color-indicator {
|
#free-color-indicator {
|
||||||
color: #333333;
|
color: #7C7C7C;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
}
|
}
|
||||||
@@ -307,7 +307,7 @@ menu > menuitem:hover > label {
|
|||||||
/* Info text styling */
|
/* Info text styling */
|
||||||
#info-text {
|
#info-text {
|
||||||
font-family: "SF Pro Rounded";
|
font-family: "SF Pro Rounded";
|
||||||
font-size: 12px;
|
font-size: 13px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #8E8E8E;
|
color: #8E8E8E;
|
||||||
min-width: 32px;
|
min-width: 32px;
|
||||||
|
|||||||
+18
-17
@@ -384,13 +384,13 @@ class RamInfo(Box):
|
|||||||
# Create info with color indicators
|
# Create info with color indicators
|
||||||
self.used_indicator = Label(label="■", name="used-color-indicator")
|
self.used_indicator = Label(label="■", name="used-color-indicator")
|
||||||
self.free_indicator = Label(label="■", name="free-color-indicator")
|
self.free_indicator = Label(label="■", name="free-color-indicator")
|
||||||
|
|
||||||
# Create the info labels
|
# Create the info labels
|
||||||
self.used_info = Label(label="Used", name="info-text")
|
self.used_info = Label(label="Used", name="info-text")
|
||||||
self.used_value = Label(label="0.0GB", name="info-value")
|
self.used_value = Label(label="0.0GB", name="info-value")
|
||||||
self.free_info = Label(label="Free", name="info-text")
|
self.free_info = Label(label="Free ", name="info-text")
|
||||||
self.free_value = Label(label="0.0GB", name="info-value")
|
self.free_value = Label(label="0.0GB", name="info-value")
|
||||||
|
|
||||||
# Create horizontal boxes for each info line
|
# Create horizontal boxes for each info line
|
||||||
self.used_line = Box(
|
self.used_line = Box(
|
||||||
orientation="h",
|
orientation="h",
|
||||||
@@ -400,18 +400,19 @@ class RamInfo(Box):
|
|||||||
self.used_indicator,
|
self.used_indicator,
|
||||||
self.used_info,
|
self.used_info,
|
||||||
self.used_value,
|
self.used_value,
|
||||||
]
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
self.free_line = Box(
|
self.free_line = Box(
|
||||||
orientation="h",
|
orientation="h",
|
||||||
spacing=4,
|
spacing=4,
|
||||||
h_align="start",
|
h_align="center",
|
||||||
|
justification="start",
|
||||||
children=[
|
children=[
|
||||||
self.free_indicator,
|
self.free_indicator,
|
||||||
self.free_info,
|
self.free_info,
|
||||||
self.free_value,
|
self.free_value,
|
||||||
]
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
self.ram_info_container = Box(
|
self.ram_info_container = Box(
|
||||||
@@ -422,7 +423,7 @@ class RamInfo(Box):
|
|||||||
children=[
|
children=[
|
||||||
self.used_line,
|
self.used_line,
|
||||||
self.free_line,
|
self.free_line,
|
||||||
]
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
self.progress_container = Box(
|
self.progress_container = Box(
|
||||||
@@ -465,7 +466,7 @@ class RamInfo(Box):
|
|||||||
|
|
||||||
self.used_value.set_label(f"{round(used_gb, 1)}GB")
|
self.used_value.set_label(f"{round(used_gb, 1)}GB")
|
||||||
self.free_value.set_label(f"{round(free_gb, 1)}GB")
|
self.free_value.set_label(f"{round(free_gb, 1)}GB")
|
||||||
|
|
||||||
GLib.idle_add(self.ram_progress.set_value, mem.percent)
|
GLib.idle_add(self.ram_progress.set_value, mem.percent)
|
||||||
# executor.submit(update)
|
# executor.submit(update)
|
||||||
return True
|
return True
|
||||||
@@ -506,20 +507,20 @@ class CpuInfo(Box):
|
|||||||
label="15%\nCPU", justification="center", name="progress-label"
|
label="15%\nCPU", justification="center", name="progress-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Create temp info with color indicator
|
# Create temp info with color indicator
|
||||||
self.temp_indicator = Label(label="■", name="temp-color-indicator")
|
self.temp_indicator = Label(label="■", name="temp-color-indicator")
|
||||||
self.temp_info = Label(label="Temp", name="info-text")
|
self.temp_info = Label(label="Temp", name="info-text")
|
||||||
self.temp_value = Label(label="0°C", name="info-value")
|
self.temp_value = Label(label="0°C", name="info-value")
|
||||||
|
|
||||||
self.temp_line = Box(
|
self.temp_line = Box(
|
||||||
orientation="h",
|
orientation="h",
|
||||||
spacing=4,
|
spacing=4,
|
||||||
h_align="start",
|
h_align="start",
|
||||||
children=[
|
children=[
|
||||||
self.temp_indicator,
|
# self.temp_indicator,
|
||||||
self.temp_info,
|
self.temp_info,
|
||||||
self.temp_value,
|
self.temp_value,
|
||||||
]
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
self.cpu_info_container = Box(
|
self.cpu_info_container = Box(
|
||||||
@@ -528,7 +529,7 @@ class CpuInfo(Box):
|
|||||||
h_align="center",
|
h_align="center",
|
||||||
children=[
|
children=[
|
||||||
self.temp_line,
|
self.temp_line,
|
||||||
]
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
self.progress_container = Box(
|
self.progress_container = Box(
|
||||||
@@ -593,7 +594,7 @@ class CpuInfo(Box):
|
|||||||
self.temp_value.set_label(f"{temp}°C")
|
self.temp_value.set_label(f"{temp}°C")
|
||||||
else:
|
else:
|
||||||
self.temp_value.set_label("N/A")
|
self.temp_value.set_label("N/A")
|
||||||
|
|
||||||
GLib.idle_add(self.cpu_progress.set_value, cpu)
|
GLib.idle_add(self.cpu_progress.set_value, cpu)
|
||||||
# executor.submit(update)
|
# executor.submit(update)
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in new issue
Block a user