Browse Source

Fixed button shadow size.

Signed-off-by: weisj <weisj@arcor.de>
pull/15/head
weisj 5 years ago
parent
commit
d44618f808
  1. 6
      build.gradle
  2. 1
      src/main/java/com/github/weisj/darklaf/ui/button/DarkButtonUI.java
  3. 1
      src/main/java/com/github/weisj/darklaf/ui/combobox/DarkComboBoxUI.java
  4. 4
      src/main/java/com/github/weisj/darklaf/ui/menu/DarkPopupMenuUI.java

6
build.gradle

@ -1,7 +1,5 @@
import org.gradle.internal.jvm.Jvm
plugins {
id 'com.github.johnrengelman.shadow' version '5.1.0'
id 'java'
@ -15,7 +13,7 @@ repositories {
mavenLocal()
mavenCentral()
maven {
url = 'http://repo.maven.apache.org/maven2'
url = 'https://repo.maven.apache.org/maven2'
}
}
@ -50,7 +48,7 @@ publishing {
customizePom(pom)
groupId = 'com.github.weisj'
artifactId 'darklaf'
version = '1.3.1.1'
version = '1.3.1.2'
from components.java

1
src/main/java/com/github/weisj/darklaf/ui/button/DarkButtonUI.java

@ -161,6 +161,7 @@ public class DarkButtonUI extends BasicButtonUI {
if (isFullShadow(c)) {
g.fillRect(0, 0, c.getWidth(), c.getHeight());
} else {
margin.set(0, 0, 0, 0);
DarkUIUtil.fillRoundRect((Graphics2D) g, margin.left, margin.top,
c.getWidth() - margin.left - margin.right,
c.getHeight() - margin.top - margin.bottom, arc);

1
src/main/java/com/github/weisj/darklaf/ui/combobox/DarkComboBoxUI.java

@ -58,7 +58,6 @@ public class DarkComboBoxUI extends BasicComboBoxUI implements Border {
private final MouseListener mouseListener = new MouseAdapter() {
@Override
public void mousePressed(final MouseEvent e) {
super.mousePressed(e);
comboBox.getEditor().getEditorComponent().requestFocus();
}
};

4
src/main/java/com/github/weisj/darklaf/ui/menu/DarkPopupMenuUI.java

@ -107,8 +107,8 @@ public class DarkPopupMenuUI extends BasicPopupMenuUI {
Field field = BasicPopupMenuUI.class.getDeclaredField("MOUSE_GRABBER_KEY");
field.setAccessible(true);
Object value = field.get(null);
MouseGrabber mouseGrabber = (MouseGrabber) context.get(value);
if (mouseGrabber != null) {
Object mouseGrabber = context.get(value);
if (mouseGrabber instanceof MouseGrabber) {
Method method = mouseGrabber.getClass().getDeclaredMethod("uninstall");
method.setAccessible(true);
method.invoke(mouseGrabber);

Loading…
Cancel
Save