From: Dominik Csapak <d.csapak@proxmox.com>
To: yew-devel@lists.proxmox.com
Subject: [yew-devel] [PATCH yew-widget-toolkit] widget: tab panel: fix tab bar bottom border
Date: Thu, 28 Aug 2025 10:32:32 +0200 [thread overview]
Message-ID: <20250828083240.1338864-1-d.csapak@proxmox.com> (raw)
commit:
028af44 (pwt-tab-material: do not set flex property)
in pwt-assets removed the flex property from the css class of the tab
bar, because we also use the tab bar outside of the tab panel sometimes
(and the flex layout is not always correct there)
later, wrong layout was noticed, but only when scroll-mode was set to
`None` by commit:
4aad755 (fix tab panel layout when scroll_mode is None)
We actually want to set the flex property with every scroll mode,
otherwise the bottom border of the tab bar does not fill all the way to
the right with tab panels.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
src/widget/tab/tab_panel.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/widget/tab/tab_panel.rs b/src/widget/tab/tab_panel.rs
index 642df54..cd8bce9 100644
--- a/src/widget/tab/tab_panel.rs
+++ b/src/widget/tab/tab_panel.rs
@@ -2,13 +2,13 @@ use yew::html::IntoPropValue;
use yew::prelude::*;
use yew::virtual_dom::{Key, VList, VNode};
-use crate::prelude::*;
use crate::props::{IntoOptionalInlineHtml, IntoStorageLocation, StorageLocation};
use crate::state::Selection;
use crate::widget::{
Column, MiniScroll, MiniScrollMode, SelectionView, SelectionViewRenderInfo, TabBar, TabBarItem,
TabBarStyle,
};
+use crate::{css, prelude::*};
use pwt_macros::{builder, widget};
@@ -225,7 +225,7 @@ impl Component for PwtTabPanel {
.selection(self.selection.clone())
.style(props.tab_bar_style)
.state_id(props.state_id.clone())
- .class(props.scroll_mode.is_none().then(|| "pwt-flex-fill"))
+ .class(css::Flex::Fill)
.into();
if let Some(scroll_mode) = props.scroll_mode {
--
2.47.2
_______________________________________________
yew-devel mailing list
yew-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel
reply other threads:[~2025-08-28 8:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250828083240.1338864-1-d.csapak@proxmox.com \
--to=d.csapak@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