diff --git a/lact-gui/i18n/en/lact_gui.ftl b/lact-gui/i18n/en/lact_gui.ftl index aa111337..97d3c8f2 100644 --- a/lact-gui/i18n/en/lact_gui.ftl +++ b/lact-gui/i18n/en/lact_gui.ftl @@ -180,7 +180,13 @@ nvidia-oc-description = It is possible to achieve a pseudo-undervolt by combining the locked clocks option with a positive clockspeed offset. This will force the GPU to run at a voltage that's constrained by the locked clocks, while achieving a higher clockspeed due to the offset. This can cause system instability if pushed too high. -oc-warning = Changing these values may lead to system instability and can potentially damage your hardware! +oc-warning-button = Use at your own risk +oc-warning-description = + Agressive overclock can cause visual artifacts, crashes, or freezes. + + Higher voltage can shorten GPU lifespan, even without overheating. Insufficient cooling can damage the hardware + + Recovering from a bad overclock show-all-pstates = Show all P-States enable-gpu-locked-clocks = Enable GPU Locked Clocks enable-vram-locked-clocks = Enable VRAM Locked Clocks diff --git a/lact-gui/src/app.css b/lact-gui/src/app.css index 8abc2fcc..9f6f8b10 100644 --- a/lact-gui/src/app.css +++ b/lact-gui/src/app.css @@ -13,3 +13,12 @@ .main-sidebar-container .sidebar-section { margin: 4px 8px 8px 8px; } + +.oc-warning-button > button { + color: @warning_color; + background: alpha(@warning_color, 0.15); +} + +.oc-warning-button > button:hover { + background: alpha(@warning_color, 0.25); +} diff --git a/lact-gui/src/app.rs b/lact-gui/src/app.rs index b27327ce..7129acee 100644 --- a/lact-gui/src/app.rs +++ b/lact-gui/src/app.rs @@ -218,6 +218,32 @@ impl AsyncComponent for AppModel { set_vexpand: true, }, + gtk::MenuButton { + set_margin_all: 8, + add_css_class: "oc-warning-button", + set_label: &fl!(I18N, "oc-warning-button"), + set_direction: gtk::ArrowType::Down, + + #[wrap(Some)] + set_popover = >k::Popover { + set_position: gtk::PositionType::Top, + + #[wrap(Some)] + set_child = >k::Box { + set_orientation: gtk::Orientation::Vertical, + set_spacing: 12, + set_margin_all: 12, + + gtk::Label { + set_markup: &fl!(I18N, "oc-warning-description"), + set_xalign: 0.0, + set_wrap: true, + set_max_width_chars: 45, + }, + }, + }, + }, + gtk::Separator {}, gtk::Box { diff --git a/lact-gui/src/app/pages/oc_page/clocks_frame/mod.rs b/lact-gui/src/app/pages/oc_page/clocks_frame/mod.rs index 90b449a0..bee4d0a7 100644 --- a/lact-gui/src/app/pages/oc_page/clocks_frame/mod.rs +++ b/lact-gui/src/app/pages/oc_page/clocks_frame/mod.rs @@ -112,14 +112,6 @@ impl relm4::Component for ClocksFrame { }, }, - append_child = >k::Label { - set_label: &fl!(I18N, "oc-warning"), - set_wrap_mode: pango::WrapMode::Word, - set_halign: gtk::Align::Start, - add_css_class: css::WARNING, - add_css_class: css::DIM_LABEL, - }, - append_child = >k::Box { set_orientation: gtk::Orientation::Vertical, set_spacing: 5,