* [PATCH yew-widget-toolkit 1/2] widget: theme mode selector: add tooltips for the different modes
@ 2026-06-02 11:43 Dominik Csapak
2026-06-02 11:43 ` [PATCH yew-widget-toolkit 2/2] widget: theme mode selector: use 'fa-desktop' for system theme Dominik Csapak
2026-06-09 16:50 ` applied: [PATCH yew-widget-toolkit 1/2] widget: theme mode selector: add tooltips for the different modes Thomas Lamprecht
0 siblings, 2 replies; 3+ messages in thread
From: Dominik Csapak @ 2026-06-02 11:43 UTC (permalink / raw)
To: yew-devel
So it's clear which mode is activated currently.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
src/widget/theme_mode_selector.rs | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/src/widget/theme_mode_selector.rs b/src/widget/theme_mode_selector.rs
index 78df587..b254108 100644
--- a/src/widget/theme_mode_selector.rs
+++ b/src/widget/theme_mode_selector.rs
@@ -3,7 +3,7 @@ use std::rc::Rc;
use yew::virtual_dom::{Key, VComp, VNode};
use crate::state::{Theme, ThemeMode};
-use crate::widget::Button;
+use crate::widget::{Button, Tooltip};
use crate::{impl_class_prop_builder, impl_yew_std_props_builder, prelude::*};
/// Round icon button to select light/dark theme.
@@ -78,15 +78,20 @@ impl Component for PwtThemeModeSelector {
let onclick = ctx.link().callback(|_| Msg::NextMode);
- Button::new_icon(match self.theme {
- ThemeMode::System => "fa fa-fw fa-asterisk",
- ThemeMode::Dark => "fa fa-fw fa-moon-o",
- ThemeMode::Light => "fa fa-fw fa-sun-o",
- })
- .class(props.class.clone())
- .class("circle")
- .onclick(onclick)
- .aria_label("Select Theme Mode")
+ let (icon, tip) = match self.theme {
+ ThemeMode::System => ("fa fa-fw fa-asterisk", tr!("System Theme")),
+ ThemeMode::Dark => ("fa fa-fw fa-moon-o", tr!("Dark Mode")),
+ ThemeMode::Light => ("fa fa-fw fa-sun-o", tr!("Light Mode")),
+ };
+
+ Tooltip::new(
+ Button::new_icon(icon)
+ .class(props.class.clone())
+ .class("circle")
+ .onclick(onclick)
+ .aria_label("Select Theme Mode"),
+ )
+ .tip(tip)
.into()
}
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH yew-widget-toolkit 2/2] widget: theme mode selector: use 'fa-desktop' for system theme
2026-06-02 11:43 [PATCH yew-widget-toolkit 1/2] widget: theme mode selector: add tooltips for the different modes Dominik Csapak
@ 2026-06-02 11:43 ` Dominik Csapak
2026-06-09 16:50 ` applied: [PATCH yew-widget-toolkit 1/2] widget: theme mode selector: add tooltips for the different modes Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Dominik Csapak @ 2026-06-02 11:43 UTC (permalink / raw)
To: yew-devel
this is a more common icon used to represent the system theme and the
asterisk and sun icon are too similar on first glance.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
src/widget/theme_mode_selector.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/widget/theme_mode_selector.rs b/src/widget/theme_mode_selector.rs
index b254108..81390e7 100644
--- a/src/widget/theme_mode_selector.rs
+++ b/src/widget/theme_mode_selector.rs
@@ -79,7 +79,7 @@ impl Component for PwtThemeModeSelector {
let onclick = ctx.link().callback(|_| Msg::NextMode);
let (icon, tip) = match self.theme {
- ThemeMode::System => ("fa fa-fw fa-asterisk", tr!("System Theme")),
+ ThemeMode::System => ("fa fa-fw fa-desktop", tr!("System Theme")),
ThemeMode::Dark => ("fa fa-fw fa-moon-o", tr!("Dark Mode")),
ThemeMode::Light => ("fa fa-fw fa-sun-o", tr!("Light Mode")),
};
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread* applied: [PATCH yew-widget-toolkit 1/2] widget: theme mode selector: add tooltips for the different modes
2026-06-02 11:43 [PATCH yew-widget-toolkit 1/2] widget: theme mode selector: add tooltips for the different modes Dominik Csapak
2026-06-02 11:43 ` [PATCH yew-widget-toolkit 2/2] widget: theme mode selector: use 'fa-desktop' for system theme Dominik Csapak
@ 2026-06-09 16:50 ` Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2026-06-09 16:50 UTC (permalink / raw)
To: yew-devel, Dominik Csapak
On Tue, 02 Jun 2026 13:43:18 +0200, Dominik Csapak wrote:
> So it's clear which mode is activated currently.
Applied, thanks!
[1/2] widget: theme mode selector: add tooltips for the different modes
commit: eb4047acaa1aa9881461bad4868293857849aa6e
[2/2] widget: theme mode selector: use 'fa-desktop' for system theme
commit: 3c63e382ce2a92f9a6b76b06438ae2c18faf4928
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-09 16:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-02 11:43 [PATCH yew-widget-toolkit 1/2] widget: theme mode selector: add tooltips for the different modes Dominik Csapak
2026-06-02 11:43 ` [PATCH yew-widget-toolkit 2/2] widget: theme mode selector: use 'fa-desktop' for system theme Dominik Csapak
2026-06-09 16:50 ` applied: [PATCH yew-widget-toolkit 1/2] widget: theme mode selector: add tooltips for the different modes Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.