From 618072afd1df6d99302a969ea1fc38f134ed7948 Mon Sep 17 00:00:00 2001 From: Roman Makarov Date: Thu, 23 Apr 2026 20:21:24 +0200 Subject: [PATCH] feat: remove some redundant category titles (#980) * remove some titles, move how-historical-charts to header * align cards with gpu picker * remvoe unused imports * chore: update graphs button text --------- Co-authored-by: Ilya Zlobintsev --- lact-gui/i18n/en/lact_gui.ftl | 2 +- lact-gui/src/app.css | 2 +- lact-gui/src/app.rs | 13 ++++++------- lact-gui/src/app/pages/info_page.rs | 1 + lact-gui/src/app/pages/oc_page.rs | 1 + .../src/app/pages/oc_page/gpu_stats_section.rs | 15 ++------------- lact-gui/src/app/pages/thermals_page.rs | 3 ++- 7 files changed, 14 insertions(+), 23 deletions(-) diff --git a/lact-gui/i18n/en/lact_gui.ftl b/lact-gui/i18n/en/lact_gui.ftl index a7ba36b5..6d282a94 100644 --- a/lact-gui/i18n/en/lact_gui.ftl +++ b/lact-gui/i18n/en/lact_gui.ftl @@ -193,7 +193,7 @@ vram-pstates = VRAM Power States pstates-manual-needed = Performance level must be set to 'manual' to toggle power states enable-pstate-config = Enable power state configuration -show-historical-charts = Show Historical Charts +show-historical-charts = Show Graphs show-process-monitor = Show Process Monitor generate-debug-snapshot = Generate Debug Snapshot dump-vbios = Dump VBIOS diff --git a/lact-gui/src/app.css b/lact-gui/src/app.css index b16d59e9..d1651f2d 100644 --- a/lact-gui/src/app.css +++ b/lact-gui/src/app.css @@ -8,5 +8,5 @@ } .main-sidebar-container separator { - margin: 0 2px; + margin: 0 10px; } \ No newline at end of file diff --git a/lact-gui/src/app.rs b/lact-gui/src/app.rs index 53790791..351b68c7 100644 --- a/lact-gui/src/app.rs +++ b/lact-gui/src/app.rs @@ -257,12 +257,6 @@ impl AsyncComponent for AppModel { set_orientation: gtk::Orientation::Vertical, add_css_class: "header-settings-popover-container", - gtk::Button { - set_label: &fl!(I18N, "show-historical-charts"), - connect_clicked => move |_| APP_BROKER.send(AppMsg::ShowGraphsWindow), - add_css_class: "flat", - }, - gtk::Button { set_label: &fl!(I18N, "show-process-monitor"), connect_clicked => move |_| APP_BROKER.send(AppMsg::ShowProcessMonitor), @@ -387,7 +381,12 @@ impl AsyncComponent for AppModel { }, } }, - } + }, + + pack_end = >k::Button { + set_label: &fl!(I18N, "show-historical-charts"), + connect_clicked => move |_| APP_BROKER.send(AppMsg::ShowGraphsWindow), + }, }, add_top_bar = &adw::Banner { diff --git a/lact-gui/src/app/pages/info_page.rs b/lact-gui/src/app/pages/info_page.rs index f706bc36..10855b62 100644 --- a/lact-gui/src/app/pages/info_page.rs +++ b/lact-gui/src/app/pages/info_page.rs @@ -32,6 +32,7 @@ impl relm4::SimpleComponent for InformationPage { set_orientation: gtk::Orientation::Vertical, set_spacing: 15, set_margin_all: 15, + set_margin_top: 20, // align with gpu picker PageSection::new("") { append_child = &model.values_list.widget().clone() -> gtk::FlowBox { diff --git a/lact-gui/src/app/pages/oc_page.rs b/lact-gui/src/app/pages/oc_page.rs index 14e59d1f..71e762fe 100644 --- a/lact-gui/src/app/pages/oc_page.rs +++ b/lact-gui/src/app/pages/oc_page.rs @@ -66,6 +66,7 @@ impl relm4::Component for OcPage { set_orientation: gtk::Orientation::Vertical, set_spacing: 10, set_margin_all: 15, + set_margin_top: 20, // align with gpu picker model.stats_section.widget(), model.power_cap_section.widget(), diff --git a/lact-gui/src/app/pages/oc_page/gpu_stats_section.rs b/lact-gui/src/app/pages/oc_page/gpu_stats_section.rs index 2cf94244..2661404b 100644 --- a/lact-gui/src/app/pages/oc_page/gpu_stats_section.rs +++ b/lact-gui/src/app/pages/oc_page/gpu_stats_section.rs @@ -1,6 +1,4 @@ use crate::I18N; -use crate::app::APP_BROKER; -use crate::app::msg::AppMsg; use crate::app::{ ext::FlowBoxExt, formatting::{self, Mono}, @@ -9,9 +7,7 @@ use crate::app::{ page_section::PageSection, }; use gtk::pango::AttrList; -use gtk::prelude::{ - BoxExt, ButtonExt, Cast, FlowBoxChildExt, OrientableExt, PopoverExt as _, WidgetExt, -}; +use gtk::prelude::{BoxExt, Cast, FlowBoxChildExt, OrientableExt, PopoverExt as _, WidgetExt}; use i18n_embed_fl::fl; use lact_schema::{DeviceInfo, DeviceStats, PowerStates, PowerStats}; use relm4::{ComponentParts, ComponentSender, RelmWidgetExt as _}; @@ -48,14 +44,7 @@ impl relm4::SimpleComponent for GpuStatsSection { set_orientation: gtk::Orientation::Vertical, set_spacing: 10, - PageSection::new(&fl!(I18N, "stats-section")) { - append_header = >k::Button { - set_label: &fl!(I18N, "show-historical-charts"), - connect_clicked => move |_| APP_BROKER.send(AppMsg::ShowGraphsWindow), - set_halign: gtk::Align::End, - set_hexpand: true, - }, - + PageSection::new("") { append_child = >k::FlowBox { set_orientation: gtk::Orientation::Horizontal, set_column_spacing: 10, diff --git a/lact-gui/src/app/pages/thermals_page.rs b/lact-gui/src/app/pages/thermals_page.rs index 23066b4d..9d40004b 100644 --- a/lact-gui/src/app/pages/thermals_page.rs +++ b/lact-gui/src/app/pages/thermals_page.rs @@ -100,8 +100,9 @@ impl relm4::Component for ThermalsPage { set_orientation: gtk::Orientation::Vertical, set_spacing: 15, set_margin_all: 15, + set_margin_top: 20, // align with gpu picker - PageSection::new(&fl!(I18N, "monitoring-section")) { + PageSection::new("") { append_child = >k::FlowBox { set_orientation: gtk::Orientation::Horizontal, set_column_spacing: 10,