Browse Source

Increase tooltip border radius on macOS and Windows 11

jsvg
Jannis Weis 3 years ago
parent
commit
0bd67edb1f
No known key found for this signature in database
GPG Key ID: 7C9D8D4B558049AB
  1. 2
      core/src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkTooltipBorder.java
  2. 5
      core/src/main/resources/com/github/weisj/darklaf/platform/mac.properties
  3. 3
      core/src/main/resources/com/github/weisj/darklaf/platform/windows11.properties
  4. 3
      core/src/main/resources/com/github/weisj/darklaf/ui/toolTip.properties

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

@ -52,6 +52,8 @@ public class DarkTooltipBorder implements Border, AlignableTooltipBorder {
bubbleBorder.setThickness(1); bubbleBorder.setThickness(1);
bubbleBorder.setPointerSize(8); bubbleBorder.setPointerSize(8);
bubbleBorder.setPointerWidth(12); bubbleBorder.setPointerWidth(12);
int borderRadius = UIManager.getInt("Tooltip.borderRadius");
bubbleBorder.setRadius(borderRadius);
bubbleBorder.setPointerSide(Alignment.CENTER); bubbleBorder.setPointerSide(Alignment.CENTER);
int shadowSize = UIManager.getInt("ToolTip.shadowSize"); int shadowSize = UIManager.getInt("ToolTip.shadowSize");
float opacity = UIManager.getInt("ToolTip.shadowOpacity") / 100.0f; float opacity = UIManager.getInt("ToolTip.shadowOpacity") / 100.0f;

5
core/src/main/resources/com/github/weisj/darklaf/platform/mac.properties

@ -1,6 +1,6 @@
# MIT License # MIT License
# #
# Copyright (c) 2019-2021 Jannis Weis # Copyright (c) 2019-2022 Jannis Weis
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy # Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal # of this software and associated documentation files (the "Software"), to deal
@ -30,13 +30,14 @@ ScrollBar.macos.hideScrollBar = false
ScrollBar.macos.hideDelay = 1200 ScrollBar.macos.hideDelay = 1200
TooltipUI = com.github.weisj.darklaf.ui.tooltip.DarkMacTooltipUI TooltipUI = com.github.weisj.darklaf.ui.tooltip.DarkMacTooltipUI
Tooltip.borderRadius = 10
ToolTip.paintShadow = false
Table.alternateRowColor = true Table.alternateRowColor = true
Tree.alternateRowColor = true Tree.alternateRowColor = true
List.alternateRowColor = true List.alternateRowColor = true
FileChooser.listViewWindowsStyle = false FileChooser.listViewWindowsStyle = false
PopupMenu.defaultLightWeightPopups = false PopupMenu.defaultLightWeightPopups = false
ToolTip.paintShadow = false
InternalFrame.icon = navigation/arrow/thick/arrowDown.svg[themed] InternalFrame.icon = navigation/arrow/thick/arrowDown.svg[themed]
InternalFrame.useExternalMenuBar = true InternalFrame.useExternalMenuBar = true

3
core/src/main/resources/com/github/weisj/darklaf/platform/windows11.properties

@ -1,6 +1,6 @@
# MIT License # MIT License
# #
# Copyright (c) 2021 Jannis Weis # Copyright (c) 2021-2022 Jannis Weis
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy # Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal # of this software and associated documentation files (the "Software"), to deal
@ -27,3 +27,4 @@ ScrollBar.width = 12
ScrollBar.minimumWidth = 3 ScrollBar.minimumWidth = 3
ScrollBar.windows11.hideScrollBar = true ScrollBar.windows11.hideScrollBar = true
ScrollBar.windows11.hideDelay = 1200 ScrollBar.windows11.hideDelay = 1200
Tooltip.borderRadius = 10

3
core/src/main/resources/com/github/weisj/darklaf/ui/toolTip.properties

@ -1,6 +1,6 @@
# MIT License # MIT License
# #
# Copyright (c) 2019-2021 Jannis Weis # Copyright (c) 2019-2022 Jannis Weis
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy # Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal # of this software and associated documentation files (the "Software"), to deal
@ -33,6 +33,7 @@ ToolTip.borderShadowColor = %shadow
ToolTip.paintShadow = true ToolTip.paintShadow = true
ToolTip.shadowOpacity = %shadowOpacityStrong ToolTip.shadowOpacity = %shadowOpacityStrong
ToolTip.shadowSize = 12 ToolTip.shadowSize = 12
Tooltip.borderRadius = 5
ToolTip.borderInsets = 5,10,5,10 ToolTip.borderInsets = 5,10,5,10
ToolTip.plainInsets = 2,5,2,5 ToolTip.plainInsets = 2,5,2,5
ToolTip.defaultStyle = plain ToolTip.defaultStyle = plain

Loading…
Cancel
Save