-
Notifications
You must be signed in to change notification settings - Fork 5.6k
[JEWEL-553] Updating TabStrip style #3289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
538536d to
06c8863
Compare
06c8863 to
679e72b
Compare
| ScrollbarVisibility.WhenContainerHovered( | ||
| trackThickness = 5.dp, | ||
| trackThicknessExpanded = 5.dp, | ||
| trackPadding = PaddingValues(1.dp), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Including on the sides?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the value used in swing is JBUI.insets(1) (which is all sides)
platform/jewel/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/ScrollableContainer.kt
Outdated
Show resolved
Hide resolved
platform/jewel/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/ScrollableContainer.kt
Outdated
Show resolved
Hide resolved
platform/jewel/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/ScrollableContainer.kt
Outdated
Show resolved
Hide resolved
platform/jewel/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/ScrollableContainer.kt
Outdated
Show resolved
Hide resolved
platform/jewel/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/styling/ScrollbarStyling.kt
Outdated
Show resolved
Hide resolved
679e72b to
90f2733
Compare
...ewel/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/theme/IntUiBridgeScrollbar.kt
Show resolved
Hide resolved
90f2733 to
ebf8d5b
Compare
| public override val trackThicknessExpanded: Dp = trackThickness | ||
| public override val expandAnimationDuration: Duration = 0.milliseconds | ||
| public override val lingerDuration: Duration = 0.milliseconds | ||
| public constructor( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this this be deprecated/hidden?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about it, but the usage with fewer parameters is still valid, so I wasn't sure. Let me check what happens if I hide this and add default arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's weird, setting this to hidden and adding the parameters with default values did not change the dump file 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't trust the IJP dump files much... That's why we have metalava lol
- Updated TabStrip to use ScrollableContainer - Updated ScrollableContainer to allow setting the position of scrollbar - Updated TabStrip scrollbar theme on LaF + Stand-alone - Updated TabStrip implementation to properly handle different style based on the hover state
ebf8d5b to
4151d75
Compare
Evidences
Before & After
Stand-alone vs IDE
Normal scrollbars: Nothing changed
Release notes
New features
ScrollbarVisibility.WhenContainerHoveredVisibility typeVerticalScrollbarandHorizontalScrollbarcomposablesBug fixes
Note
Refactors TabStrip to use HorizontallyScrollableContainer with a start-positioned, hover-colored tab-strip scrollbar, and extends scrollbar API/styling (positions, expanded padding, tab-strip visibility).
HorizontallyScrollableContainer(replacing manual scroll + overlay), placing scrollbar atStart.rememberTabStripScrollbarStyle; removes explicitAnimatedVisibility.ScrollbarPositionand support to place scrollbars atStart/EndinScrollableContainerImpl.ScrollbarVisibility.trackPaddingExpandedand uses it when expanded; refines hover/drag visibility logic and animations.PaddingValues()) for Windows/Linux variants.ScrollbarVisibility.tabStrip(...)with 5.dp thickness and tuned animations; deprecatesAlwaysVisible.tabStrip(...)overload.readTabStripScrollbarStyle()and switches tab styles to use it.Written by Cursor Bugbot for commit 4151d75. This will update automatically on new commits. Configure here.