Skip to content

Commit

Permalink
Merge pull request #36 from Presence-Man/starting-minimized
Browse files Browse the repository at this point in the history
Starting minimized
  • Loading branch information
xxAROX authored Jan 5, 2024
2 parents f9f7418 + 96a9e9d commit 996f0de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/xxAROX/PresenceMan/Application/ui/AppUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ public AppUI() {
ToolTipManager.sharedInstance().setInitialDelay(100);
ToolTipManager.sharedInstance().setDismissDelay(10_000);
SwingUtilities.updateComponentTreeUI(this);
this.setVisible(true);
setVisible(false);
setExtendedState(JFrame.ICONIFIED);
tray.showInTray();
}

private void setLookAndFeel() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public Tray() {
public void mouseReleased(MouseEvent e) {
if (e.getClickCount() == 2 && e.getButton() == 1) {
App.ui.setVisible(true);
App.ui.setExtendedState(JFrame.NORMAL);
hideFromTray();
} else if (e.getClickCount() == 3 && e.getButton() == 3) {
App.getInstance().shutdown();
Expand Down

0 comments on commit 996f0de

Please sign in to comment.