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

SwingX JXTipOfTheDay support #980

Closed
tlf30 opened this issue Mar 6, 2025 · 2 comments
Closed

SwingX JXTipOfTheDay support #980

tlf30 opened this issue Mar 6, 2025 · 2 comments
Milestone

Comments

@tlf30
Copy link

tlf30 commented Mar 6, 2025

When using the SwingX JXTipOfTheDay, the LAF does not properly apply.

             // Create Tip of the day
            TipOfTheDayModel model = new TipOfTheDayModel() {
                private final List<Tip> tipList = tips;

                @Override
                public int getTipCount() {
                    return tipList.size();
                }

                @Override
                public Tip getTipAt(int index) {
                    return tipList.get(index);
                }
            };
            JXTipOfTheDay tipDialog = new JXTipOfTheDay(model);

            // Show it in a dialog
            JXTipOfTheDay.ShowOnStartupChoice choice = new JXTipOfTheDay.ShowOnStartupChoice() {
                @Override
                public boolean isShowingOnStartup() {
                    return FobManager.getConfig().isUiShowTipOfTheDay();
                }

                @Override
                public void setShowingOnStartup(boolean showingOnStartup) {
                    FobManager.getConfig().setUiShowTipOfTheDay(showingOnStartup);
                    FobManager.getConfig().save();
                }
            };

            tipDialog.showDialog(this.getMainWindow(), choice);

private void setLookAndFeel() {
        try {
            // Set the LAF to the "One Dark" IntelliJ theme
            UIManager.setLookAndFeel(new FlatOneDarkIJTheme());
        } catch (UnsupportedLookAndFeelException ex) {
            log.error("Failed to set Look and Feel", ex);
        }
    }

Image

DevCharly added a commit that referenced this issue Mar 7, 2025
@DevCharly
Copy link
Collaborator

Thanks for reporting 👍

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

@DevCharly DevCharly added this to the 3.6 milestone Mar 7, 2025
@tlf30
Copy link
Author

tlf30 commented Mar 7, 2025

Thank you for the very quick response and fix!

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