Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/editor/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* {
scrollbar-width: thin;
scrollbar-color: hsla(var(--pt-intent-primary-hsl, 215,65%,50%), 0.7) rgba(50, 64, 64, 0.3);
scrollbar-gutter: stable;
}
*::-webkit-scrollbar
{
Expand Down
21 changes: 18 additions & 3 deletions packages/editor/src/renderer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,18 @@ button.kite3d-status-chip {
line-height: inherit;
}

// The left slot's tab panel. The Objects tree scrolls in it, so it keeps the scrollbar's width
// whether the tree overflows or not, and the rows do not jump as branches open and close.
.hierarchy-stack{
scrollbar-gutter: stable;
}

// The Resources tab holds its own scroll box below, so this panel never scrolls and reserves
// nothing.
.hierarchy-stack:has(.resources-panel){
scrollbar-gutter: auto;
}

.hierarchy-stack .folderContent{
flex: 1 1 auto;
max-width: 100%;
Expand All @@ -219,6 +231,8 @@ button.kite3d-status-chip {
flex-direction: column;
height: 100%;
overflow-y: auto;
// The sections scroll here, so the rows keep their width when the scrollbar comes and goes.
scrollbar-gutter: stable;
}
.resources-section-header{
align-items: center;
Expand Down Expand Up @@ -482,6 +496,8 @@ button.kite3d-status-chip {
width: 100%;
flex: 1 1;
overflow-y: auto;
// The grid is the Files tab's scroller, so the items keep their columns as the folder changes.
scrollbar-gutter: stable;
--file-item-button-text-height: 14px;
}
.file-item-button-group{
Expand Down Expand Up @@ -660,11 +676,10 @@ button.kite3d-status-chip {
// tab list's two paddings plus a tab's line height, the three values it is built from above.
--center-tab-strip-height: calc(#{$pt-grid-size} * 3);

// The viewport clips what leaves it and never scrolls, so it keeps no scrollbar gutter; index.html
// asks every scroll container for a stable one, and that gutter would narrow the canvas.
// The viewport clips what leaves it and never scrolls. Its content stands 4 px past the panel, so
// a scroll container here would let a key press nudge the canvas out of place.
> .window-panels-tabs > .bp5-tab-panel {
overflow: hidden;
scrollbar-gutter: auto;
}

> .interactionControlsButtonContainer {
Expand Down
5 changes: 4 additions & 1 deletion packages/uiconfig-blueprint/src/renderer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
.bp5-panel-stack2-view {
background-color: $light-gray4 !important;
transition: var(--background-color-transition);
// The panel's content scrolls here, so the rows keep their width whether the scrollbar is there
// or not. It is the only box in the stack that ever shows one.
scrollbar-gutter: stable;
}

.bp5-dark{
Expand All @@ -141,7 +144,7 @@
height: 100%;
flex-grow: 1;
position: relative;
overflow-y: scroll;
overflow-y: auto;
padding: 0 0 0 0;

.bp5-panel-stack2-header{
Expand Down
Loading