Skip to content

Conversation

@faogustavo
Copy link
Collaborator

@faogustavo faogustavo commented Oct 27, 2025

  • Updated TabStrip to use ScrollableContainer
  • Updated ScrollableContainer to allow setting the position of scrollbar
  • Added 'WhenParentHovered' visibility configuration for scrollbars
  • Updated TabStrip scrollbar theme on LaF + Stand-alone

Evidences

Before & After

Before After
Screen Recording 2025-10-27 at 09 17 26 Screen Recording 2025-10-27 at 09 11 24

Stand-alone vs IDE

Stand-alone IDE
Screen Recording 2025-10-27 at 09 11 24 Screen Recording 2025-10-27 at 09 10 42

Normal scrollbars: Nothing changed

Before After
Screen Recording 2025-10-27 at 09 13 10 Screen Recording 2025-10-27 at 09 11 52

Release notes

New features

  • Added ScrollbarVisibility.WhenContainerHovered Visibility type
    • To use this properly, we've also added the 'containerState' parameter to the VerticalScrollbar and HorizontalScrollbar composables

Bug fixes

  • Fixed TabStrip scroll to match the design definitions
    • 5.dp size
    • 1.dp padding if not hovered
    • 0.dp padding if hovered (making it show as "bigger")

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).

  • TabStrip:
    • Rewrites to use HorizontallyScrollableContainer (replacing manual scroll + overlay), placing scrollbar at Start.
    • Adds hover-driven scrollbar colors via rememberTabStripScrollbarStyle; removes explicit AnimatedVisibility.
  • Scrollable Container:
    • Introduces ScrollbarPosition and support to place scrollbars at Start/End in ScrollableContainerImpl.
  • Scrollbar API/Behavior:
    • Adds ScrollbarVisibility.trackPaddingExpanded and uses it when expanded; refines hover/drag visibility logic and animations.
    • Adjusts paddings defaults (PaddingValues()) for Windows/Linux variants.
  • Styling:
    • Adds ScrollbarVisibility.tabStrip(...) with 5.dp thickness and tuned animations; deprecates AlwaysVisible.tabStrip(...) overload.
  • IDE LaF Bridge:
    • Introduces readTabStripScrollbarStyle() and switches tab styles to use it.
  • API surface:
    • Updates API dumps (new companions, getters, constructors, functions).

Written by Cursor Bugbot for commit 4151d75. This will update automatically on new commits. Configure here.

ScrollbarVisibility.WhenContainerHovered(
trackThickness = 5.dp,
trackThicknessExpanded = 5.dp,
trackPadding = PaddingValues(1.dp),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Including on the sides?

Copy link
Collaborator Author

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)

public override val trackThicknessExpanded: Dp = trackThickness
public override val expandAnimationDuration: Duration = 0.milliseconds
public override val lingerDuration: Duration = 0.milliseconds
public constructor(
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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 🤔

Copy link
Collaborator

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants