This is an automated email from the ASF dual-hosted git repository.
ebakke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git
The following commit(s) were added to refs/heads/master by this push:
new 8f1f57b Tweak color of 3 LAF-independent HiDPI icons for dark themes
(e.g. Darcula).
8f1f57b is described below
commit 8f1f57bdc2552541b9947fd12ac8dd74796539f6
Author: Eirik Bakke <[email protected]>
AuthorDate: Tue Oct 30 19:22:08 2018 -0400
Tweak color of 3 LAF-independent HiDPI icons for dark themes (e.g. Darcula).
---
platform/openide.awt/src/org/openide/awt/IconWithArrow.java | 10 +++++++++-
.../openide.awt/src/org/openide/awt/ToolbarWithOverflow.java | 9 ++++++++-
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/platform/openide.awt/src/org/openide/awt/IconWithArrow.java
b/platform/openide.awt/src/org/openide/awt/IconWithArrow.java
index 1c87da8..d2ac2a8 100644
--- a/platform/openide.awt/src/org/openide/awt/IconWithArrow.java
+++ b/platform/openide.awt/src/org/openide/awt/IconWithArrow.java
@@ -26,6 +26,7 @@ import java.awt.Graphics2D;
import java.awt.geom.Path2D;
import javax.swing.Icon;
import javax.swing.UIManager;
+import org.openide.util.ImageUtilities;
import org.openide.util.Parameters;
import org.openide.util.VectorIcon;
@@ -101,7 +102,14 @@ class IconWithArrow implements Icon {
@Override
protected void paintIcon(Component c, Graphics2D g, int width, int
height, double scaling) {
- g.setColor(disabled ? new Color(201, 201, 201, 255) : new
Color(86, 86, 86, 255));
+ final Color color;
+ if (UIManager.getBoolean("nb.dark.theme")) {
+ // Foreground brightness level taken from the combobox dropdown
on Darcula.
+ color = disabled ? new Color(90, 90, 90, 255) : new Color(187,
187, 187, 255);
+ } else {
+ color = disabled ? new Color(201, 201, 201, 255) : new Color(86,
86, 86, 255);
+ }
+ g.setColor(color);
final double overshoot = 2.0 / scaling;
final double arrowWidth = width + overshoot * scaling;
final double arrowHeight = height - 0.2 * scaling;
diff --git a/platform/openide.awt/src/org/openide/awt/ToolbarWithOverflow.java
b/platform/openide.awt/src/org/openide/awt/ToolbarWithOverflow.java
index b2c03dd..1951e77 100644
--- a/platform/openide.awt/src/org/openide/awt/ToolbarWithOverflow.java
+++ b/platform/openide.awt/src/org/openide/awt/ToolbarWithOverflow.java
@@ -511,7 +511,14 @@ public class ToolbarWithOverflow extends JToolBar {
// Draw two chevrons pointing downwards. Make strokes a little
thicker at low scalings.
double strokeWidth = 0.8 * scaling + 0.3;
g.setStroke(new BasicStroke((float) strokeWidth));
- g.setColor(new Color(50, 50, 50, 255));
+ final Color color;
+ if (UIManager.getBoolean("nb.dark.theme")) {
+ // Foreground brightness level taken from the combobox dropdown
on Darcula.
+ color = new Color(187, 187, 187, 255);
+ } else {
+ color = new Color(50, 50, 50, 255);
+ }
+ g.setColor(color);
for (int i = 0; i < 2; i++) {
final int y = round((1.4 + 4.1 * i) * scaling);
final double arrowWidth = round(5.0 * scaling);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists