tab: Fix segmented and underline tab style details. (#1168)

This commit is contained in:
Jason Lee 2025-08-21 20:04:50 +08:00 committed by GitHub
parent 4e5aca3842
commit 09ab49b2d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View file

@ -56,7 +56,10 @@ impl TabVariant {
TabVariant::Underline => px(30.), TabVariant::Underline => px(30.),
_ => px(24.), _ => px(24.),
}, },
Size::Large => px(36.), Size::Large => match self {
TabVariant::Underline => px(44.),
_ => px(36.),
},
_ => match self { _ => match self {
TabVariant::Underline => px(36.), TabVariant::Underline => px(36.),
_ => px(32.), _ => px(32.),

View file

@ -184,8 +184,8 @@ impl RenderOnce for TabBar {
} }
TabVariant::Segmented => { TabVariant::Segmented => {
let padding_x = match self.size { let padding_x = match self.size {
Size::XSmall => px(3.), Size::XSmall => px(2.),
Size::Small => px(3.), Size::Small => px(2.),
Size::Large => px(6.), Size::Large => px(6.),
_ => px(5.), _ => px(5.),
}; };