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:
parent
857134d6dc
commit
2c602bb0e5
1 changed files with 4 additions and 1 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue