Browse Source

Fixed spelling error in property.

Fixed plain tooltip too large.

Signed-off-by: weisj <weisj@arcor.de>
pull/60/head
weisj 5 years ago
parent
commit
1c67576449
  1. 2
      core/src/main/java/com/github/weisj/darklaf/components/tooltip/DarkToolTip.java
  2. 4
      core/src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkTooltipBorder.java
  3. 3
      core/src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkTooltipUI.java
  4. 2
      core/src/main/resources/com/github/weisj/darklaf/properties/ui/button.properties

2
core/src/main/java/com/github/weisj/darklaf/components/tooltip/DarkToolTip.java

@ -159,7 +159,7 @@ public class DarkToolTip extends JToolTip implements PropertyChangeListener {
public FadeInAnimator() {
super("Track fadeout", FADEIN_FRAMES_COUNT / 2,
super("Tooltip fadein", FADEIN_FRAMES_COUNT / 2,
FADEIN_FRAMES_COUNT * 25, false);
}

4
core/src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkTooltipBorder.java

@ -119,8 +119,9 @@ public class DarkTooltipBorder implements Border {
@Override
public Insets getBorderInsets(final Component c) {
Insets uIns = getUserInsets(c);
if (isPlain(c)) {
return new Insets(1, 1, 1, 1);
return new Insets(1 + uIns.top, 1 + uIns.left, 1 + uIns.bottom, 1 + uIns.right);
}
Insets ins = new Insets(0, 0, 0, 0);
Insets bi = bubbleBorder.getBorderInsets(c);
@ -129,7 +130,6 @@ public class DarkTooltipBorder implements Border {
ins.left = Math.max(bi.left, si.left);
ins.right = Math.max(bi.right, si.right);
ins.top = Math.max(bi.top, si.top);
Insets uIns = getUserInsets(c);
ins.left += 5 + uIns.left;
ins.top += 5 + uIns.top;
ins.right += 5 + uIns.right;

3
core/src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkTooltipUI.java

@ -246,6 +246,9 @@ public class DarkTooltipUI extends BasicToolTipUI implements PropertyChangeListe
}
}
}
if ("JToolTip.style".equals(key)) {
tooltip.setPreferredSize(getPreferredSize(tooltip));
}
}
}

2
core/src/main/resources/com/github/weisj/darklaf/properties/ui/button.properties

@ -58,4 +58,4 @@ Button.fullShadowInsets = 0,0,0,0
Button.shadow.hover = %hoverHighlight
Button.shadow.click = %clickHighlight
Button.defaultButtonFollowFocus = false
Button.defaultButtonFollowsFocus = false

Loading…
Cancel
Save