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

Tkt 1610 change logo without restart #1723

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

upuente001
Copy link
Contributor

Change the logo without restart

@@ -62,6 +62,9 @@ public void windowOpened(WindowEvent windowEvent) {
}
});
}
void replaceImagePanel(Image image){
myImagePanel.setIcon(new ImageIcon(image.getScaledInstance(-1, 50, Image.SCALE_DEFAULT)));
Copy link
Contributor

Choose a reason for hiding this comment

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

any reason why the height must be 50px? There are calculations in the code below which take into account DPI setting. They probably shall not be ignored?

Image newLogo =getLogo();


((GanttTree2)myFallbackDelegate.getTaskTree()).
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think that we want to expose that many internal fields and do all these casts to concrete classes and call chains.
What about exposing LogoOption from UIFacade instead? Class ChartTabContentPanel has access to UIFacade instance, it will be able to get the logo option and add a listener.

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

Successfully merging this pull request may close these issues.

3 participants