Always on top not in dialogs.

This commit is contained in:
Jindra Petřík
2025-05-23 20:51:37 +02:00
parent 6aac0342bc
commit f34176108e
3 changed files with 9 additions and 3 deletions

View File

@@ -30,4 +30,4 @@ Xoetrope.decimalRGB=Decimal RGB
Xoetrope.webSafeColors=Use web safe colors
SystemMenu.alwaysOnTop=Toggle Always on top
SystemMenu.alwaysOnTop=Toggle "Always on top"

View File

@@ -30,4 +30,4 @@ Xoetrope.decimalRGB=Des\u00fdtkov\u00e9 RGB
Xoetrope.webSafeColors=Pou\u017e\u00fd barvy bezpe\u010dn\u00e9 pro web
SystemMenu.alwaysOnTop=P\u0159epnout V\u017edy na vrchu
SystemMenu.alwaysOnTop=P\u0159epnout "V\u017edy na vrchu"

View File

@@ -1157,13 +1157,17 @@ public class SubstanceTitlePane extends JComponent {
this.restoreAction.setEnabled(false);
}
if ((this.toggleButton.getParent() == null)
|| (this.minimizeButton.getParent() == null)) {
|| (this.minimizeButton.getParent() == null)
|| (this.alwaysOnTopButton.getParent() == null)
) {
this.add(this.alwaysOnTopButton);
this.add(this.toggleButton);
this.add(this.minimizeButton);
this.revalidate();
this.repaint();
}
this.toggleButton.setText(null);
this.alwaysOnTopAction.setEnabled(true);
} else {
this.maximizeAction.setEnabled(false);
this.restoreAction.setEnabled(false);
@@ -1175,9 +1179,11 @@ public class SubstanceTitlePane extends JComponent {
}
} else {
// Not contained in a Frame
this.alwaysOnTopAction.setEnabled(false);
this.maximizeAction.setEnabled(false);
this.restoreAction.setEnabled(false);
this.iconifyAction.setEnabled(false);
this.remove(this.alwaysOnTopButton);
this.remove(this.toggleButton);
this.remove(this.minimizeButton);
this.revalidate();