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

Customizing title font and icons #589

Closed
rkeen-siemens opened this issue Sep 13, 2022 · 2 comments
Closed

Customizing title font and icons #589

rkeen-siemens opened this issue Sep 13, 2022 · 2 comments
Milestone

Comments

@rkeen-siemens
Copy link

The title pane is quite configurable which is great, but I can't see how to achieve the following (at least not via a properties file for a custom theme):

  1. Show the application icon in the title bar for regular windows but hide it for dialogs. I see that the icon is not visible when you use JOptionPane, but if you create a Dialog manually it will display the icon if TitlePane.showIcon is set to true.
  2. Change the font style for the title and menu bar if embedded. I don't see any setting for the for the title other than the base font. Menu.font will change the font, but for all instances including submenus. MenuBar.font is noted as "unused" and indeed does not seem to have any effect. Ideally, the menu bar font could match the title font if it is embedded and use its own settings when displayed separately.
@DevCharly
Copy link
Collaborator

  1. For option pane there is another flag OptionPane.showIcon, which is false by default.
    There is a client property JRootPane.titleBarShowIcon (see https://www.formdev.com/flatlaf/client-properties/#JRootPane) that can be used to hide the icon for dialogs, but this needs to be set on each dialog. There is ATM no option to hide icon for all dialogs.
  2. yes, this needs some improvements...

DevCharly added a commit that referenced this issue Sep 23, 2022
DevCharly added a commit that referenced this issue Sep 23, 2022
@DevCharly
Copy link
Collaborator

This is now implemented in main branch.

There are two new UI properties:

  • TitlePane.showIconInDialogs (boolean; default is true)
  • TitlePane.font is used for window title

Also MenuBar.font is now used for top-level menus (instead of Menu.font)

@DevCharly DevCharly added this to the 2.5 milestone Sep 23, 2022
DevCharly added a commit that referenced this issue Oct 17, 2022
…u item does not have a parent (issue #600; regression since implementing #589 in FlatLaf 2.5; commit f6c5db0)
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