From 0bd67edb1fb72b7ee6c6a8cd56f318db930c88bd Mon Sep 17 00:00:00 2001 From: Jannis Weis <31143295+weisJ@users.noreply.github.com> Date: Mon, 3 Jan 2022 13:31:00 +0100 Subject: [PATCH] Increase tooltip border radius on macOS and Windows 11 --- .../github/weisj/darklaf/ui/tooltip/DarkTooltipBorder.java | 2 ++ .../com/github/weisj/darklaf/platform/mac.properties | 5 +++-- .../com/github/weisj/darklaf/platform/windows11.properties | 3 ++- .../resources/com/github/weisj/darklaf/ui/toolTip.properties | 3 ++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkTooltipBorder.java b/core/src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkTooltipBorder.java index 27efedad..bfdc7795 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkTooltipBorder.java +++ b/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.setPointerSize(8); bubbleBorder.setPointerWidth(12); + int borderRadius = UIManager.getInt("Tooltip.borderRadius"); + bubbleBorder.setRadius(borderRadius); bubbleBorder.setPointerSide(Alignment.CENTER); int shadowSize = UIManager.getInt("ToolTip.shadowSize"); float opacity = UIManager.getInt("ToolTip.shadowOpacity") / 100.0f; diff --git a/core/src/main/resources/com/github/weisj/darklaf/platform/mac.properties b/core/src/main/resources/com/github/weisj/darklaf/platform/mac.properties index dae13e89..e93da7c6 100644 --- a/core/src/main/resources/com/github/weisj/darklaf/platform/mac.properties +++ b/core/src/main/resources/com/github/weisj/darklaf/platform/mac.properties @@ -1,6 +1,6 @@ # 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 # of this software and associated documentation files (the "Software"), to deal @@ -30,13 +30,14 @@ ScrollBar.macos.hideScrollBar = false ScrollBar.macos.hideDelay = 1200 TooltipUI = com.github.weisj.darklaf.ui.tooltip.DarkMacTooltipUI +Tooltip.borderRadius = 10 +ToolTip.paintShadow = false Table.alternateRowColor = true Tree.alternateRowColor = true List.alternateRowColor = true FileChooser.listViewWindowsStyle = false PopupMenu.defaultLightWeightPopups = false -ToolTip.paintShadow = false InternalFrame.icon = navigation/arrow/thick/arrowDown.svg[themed] InternalFrame.useExternalMenuBar = true diff --git a/core/src/main/resources/com/github/weisj/darklaf/platform/windows11.properties b/core/src/main/resources/com/github/weisj/darklaf/platform/windows11.properties index a2cecc6d..380d253d 100644 --- a/core/src/main/resources/com/github/weisj/darklaf/platform/windows11.properties +++ b/core/src/main/resources/com/github/weisj/darklaf/platform/windows11.properties @@ -1,6 +1,6 @@ # 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 # of this software and associated documentation files (the "Software"), to deal @@ -27,3 +27,4 @@ ScrollBar.width = 12 ScrollBar.minimumWidth = 3 ScrollBar.windows11.hideScrollBar = true ScrollBar.windows11.hideDelay = 1200 +Tooltip.borderRadius = 10 diff --git a/core/src/main/resources/com/github/weisj/darklaf/ui/toolTip.properties b/core/src/main/resources/com/github/weisj/darklaf/ui/toolTip.properties index 5dd67243..a6d67166 100644 --- a/core/src/main/resources/com/github/weisj/darklaf/ui/toolTip.properties +++ b/core/src/main/resources/com/github/weisj/darklaf/ui/toolTip.properties @@ -1,6 +1,6 @@ # 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 # of this software and associated documentation files (the "Software"), to deal @@ -33,6 +33,7 @@ ToolTip.borderShadowColor = %shadow ToolTip.paintShadow = true ToolTip.shadowOpacity = %shadowOpacityStrong ToolTip.shadowSize = 12 +Tooltip.borderRadius = 5 ToolTip.borderInsets = 5,10,5,10 ToolTip.plainInsets = 2,5,2,5 ToolTip.defaultStyle = plain