From: "Shannon Sterz" <s.sterz@proxmox.com>
To: "Shannon Sterz" <s.sterz@proxmox.com>, <yew-devel@lists.proxmox.com>
Subject: Superseded: Re: [PATCH yew-widget-toolkit] widget: navigation drawer: match menu item indents with the icon width
Date: Tue, 01 Dec 2026 13:48:29 +0100 [thread overview]
Message-ID: <DN9EP7BBH7X6.2ISJ9LXLDIC4B@proxmox.com> (raw)
In-Reply-To: <20261201110250.105081-1-s.sterz@proxmox.com>
superseded-by: https://lore.proxmox.com/yew-devel/20261201124753.176304-1-s.sterz@proxmox.com/T/#t
On Tue Dec 1, 2026 at 12:02 PM CET, Shannon Sterz wrote:
> Icons have a fixed width of 16px in essentially all themes. 1rem is
> equivalent to the font-size of the root element of the current
> document. This varies by theme between 13 and 20px. So the icons here
> aligned differently depending on the theme. Make the indent always
> match the width of an icon to avoid that. This should improve
> usability for deeply nested menus.
>
> Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
> ---
> src/widget/nav/navigation_drawer.rs | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/widget/nav/navigation_drawer.rs b/src/widget/nav/navigation_drawer.rs
> index ab8ac2e8..491cccd4 100644
> --- a/src/widget/nav/navigation_drawer.rs
> +++ b/src/widget/nav/navigation_drawer.rs
> @@ -264,7 +264,7 @@ impl PwtNavigationDrawer {
> .onkeydown(onkeydown)
> // add indentation
> .with_optional_child((indent_level > 0).then(|| {
> - html! {<span style={format!("width: {}rem", (indent_level as f32) * 1.0)}/>}
> + html! {<span style={format!("width: {}px", indent_level * 16)}/>}
> }))
> // add optional icon on the left
> .with_optional_child(
next prev parent reply other threads:[~2026-12-01 12:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 11:02 [PATCH yew-widget-toolkit] widget: navigation drawer: match menu item indents with the icon width Shannon Sterz
2026-12-01 11:42 ` Dominik Csapak
2026-12-01 12:27 ` Shannon Sterz
2026-12-01 12:48 ` Shannon Sterz [this message]
2026-12-01 14:21 ` applied: " Thomas Lamprecht
2026-12-01 14:33 ` Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DN9EP7BBH7X6.2ISJ9LXLDIC4B@proxmox.com \
--to=s.sterz@proxmox.com \
--cc=yew-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox