Enable scrolling in tab bar (#3614)
This PR enables scrolling horizontally in the tab bar. Currently this requires holding down <kbd>Shift</kbd> for the scroll to activate. We'll need to look into this. Scrolling also currently works when there is a split in the editor, as the non-split view goes down a different rendering path that does not constrain the pane width, which breaks a number of things. Release Notes: - N/A
This commit is contained in:
parent
d2feaa41a5
commit
e489e2e583
4 changed files with 56 additions and 4 deletions
|
@ -93,11 +93,10 @@ impl RenderOnce for TabBar {
|
|||
.id(self.id)
|
||||
.group("tab_bar")
|
||||
.track_focus(&self.focus_handle)
|
||||
.w_full()
|
||||
.h(rems(HEIGHT_IN_REMS))
|
||||
.overflow_hidden()
|
||||
.flex()
|
||||
.flex_none()
|
||||
.w_full()
|
||||
.h(rems(HEIGHT_IN_REMS))
|
||||
.bg(cx.theme().colors().tab_bar_background)
|
||||
.child(
|
||||
h_stack()
|
||||
|
@ -125,7 +124,13 @@ impl RenderOnce for TabBar {
|
|||
.border_b()
|
||||
.border_color(cx.theme().colors().border),
|
||||
)
|
||||
.child(h_stack().id("tabs").z_index(2).children(self.children)),
|
||||
.child(
|
||||
h_stack()
|
||||
.id("tabs")
|
||||
.z_index(2)
|
||||
.overflow_x_scroll()
|
||||
.children(self.children),
|
||||
),
|
||||
)
|
||||
.child(
|
||||
h_stack()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue