pane: Fix pin tabs double border not visible when unpinned tab is active (#30367)

Before:


https://github.com/user-attachments/assets/7bf39b99-d589-49c5-aba9-ae804c50af74

After:


https://github.com/user-attachments/assets/c0f15b78-6103-4f1c-9392-ec738d2e091b

Release Notes:

- N/A
This commit is contained in:
Smit Barmase 2025-05-09 04:33:22 -07:00 committed by GitHub
parent 857134d6dc
commit 2c602bb0e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2677,10 +2677,13 @@ impl Pane {
// We need to check both because offset returns delta values even when the scroll handle is not scrollable
let is_scrollable = content_width > viewport_width;
let is_scrolled = self.tab_bar_scroll_handle.offset().x < px(0.);
let has_active_unpinned_tab = self.active_item_index >= self.pinned_tab_count;
h_flex()
.children(pinned_tabs)
.when(is_scrollable && is_scrolled, |this| {
this.border_r_1().border_color(cx.theme().colors().border)
this.when(has_active_unpinned_tab, |this| this.border_r_2())
.when(!has_active_unpinned_tab, |this| this.border_r_1())
.border_color(cx.theme().colors().border)
})
}))
.child(