Skip to content
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

Add support for TabbedPane foreground color on hover #627

Closed
rkeen-siemens opened this issue Dec 9, 2022 · 1 comment
Closed

Add support for TabbedPane foreground color on hover #627

rkeen-siemens opened this issue Dec 9, 2022 · 1 comment
Milestone

Comments

@rkeen-siemens
Copy link

TabbedPane currently only has the ability to set the hover background (via "TabbedPane.hoverColor"). It would be nice to have the option to also set the background, perhaps via "TabbledPane.hoverForeground".

DevCharly added a commit that referenced this issue Feb 5, 2023
changed background behavior: `tabbedPane.getBackgroundAt(tabIndex)` now has higher priority than `TabbedPane.focusColor` and `TabbedPane.selectedBackground`
@DevCharly
Copy link
Collaborator

Implemented in latest 3.1-SNAPSHOT: https://github.com/JFormDesigner/FlatLaf#snapshots

grafik

There are 2 new (optional) UI properties:

TabbedPane.hoverForeground
TabbedPane.focusForeground

This allows e.g. following style:

  • normal text color for selected tab
  • dimmed text for non-selected tabs
  • normal text color if mouse is over tab
  • special text color for focused tab
  • no tab background for hover and focused tab

grafik

TabbedPane.foreground = tint(@foreground,50%)
TabbedPane.selectedForeground = @foreground
TabbedPane.hoverForeground = @foreground
TabbedPane.focusForeground = @accentLinkColor
TabbedPane.hoverColor = null
TabbedPane.focusColor = null

@DevCharly DevCharly added this to the 3.1 milestone Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants