Browse Source

Don't paint titlebar border when it isn't opaque

titlebar_button_bounds
Jannis Weis 3 years ago
parent
commit
2a9efee3e5
No known key found for this signature in database
GPG Key ID: 7C9D8D4B558049AB
  1. 4
      macos/src/main/java/com/github/weisj/darklaf/platform/macos/ui/MacOSTitlePane.java
  2. 2
      windows/src/main/java/com/github/weisj/darklaf/platform/windows/ui/WindowsTitlePane.java

4
macos/src/main/java/com/github/weisj/darklaf/platform/macos/ui/MacOSTitlePane.java

@ -101,10 +101,11 @@ public class MacOSTitlePane extends CustomTitlePane {
@Override
public void paintComponent(final Graphics g) {
if (!isOpaque()) return;
int width = getWidth();
int height = getHeight();
if (isOpaque()) {
Window window = getWindow();
boolean active = window == null || window.isActive();
@ -112,7 +113,6 @@ public class MacOSTitlePane extends CustomTitlePane {
g.setColor(background);
g.fillRect(0, 0, width, height);
}
if (!hideTitleBar()) {
g.setColor(border);

2
windows/src/main/java/com/github/weisj/darklaf/platform/windows/ui/WindowsTitlePane.java

@ -486,12 +486,12 @@ public class WindowsTitlePane extends CustomTitlePane {
g.setColor(background);
g.fillRect(0, 0, width, height);
}
if (isDrawBorder()) {
g.setColor(border);
g.fillRect(0, height - 1, width, 1);
}
}
GraphicsConfiguration currentGC = getGraphicsConfiguration();
if (currentGC != null && currentGC != gc) {

Loading…
Cancel
Save