IDEA-190424 New Darcula radio/checkbox svg icons

This commit is contained in:
Kirill Kirichenko
2018-05-04 11:48:25 +03:00
parent 0ed75a14d2
commit 0b4ee67cbc
52 changed files with 177 additions and 12 deletions
@@ -110,7 +110,7 @@ TextAreaUI=com.intellij.ide.ui.laf.darcula.ui.DarculaTextAreaUI
CheckBoxUI=com.intellij.ide.ui.laf.darcula.ui.DarculaCheckBoxUI
CheckBox.border=com.intellij.ide.ui.laf.darcula.ui.DarculaCheckBoxBorder
CheckBox.border.width=3
CheckBox.borderInsets=2,3,3,0
ComboBoxUI=com.intellij.ide.ui.laf.darcula.ui.DarculaComboBoxUI
ComboBox.padding=1,5,1,5
@@ -121,7 +121,7 @@ ComboBox.squareButton=false
RadioButtonUI=com.intellij.ide.ui.laf.darcula.ui.DarculaRadioButtonUI
RadioButton.border=com.intellij.ide.ui.laf.darcula.ui.DarculaRadioButtonBorder
RadioButton.border.width=3
RadioButton.borderInsets=2,2,2,0
RadioButton.darcula.selectionEnabledColor=aaaaaa
RadioButton.darcula.selectionDisabledColor=606060
RadioButton.darcula.selectionEnabledShadowColor=1e1e1e
@@ -18,12 +18,13 @@ public class DarculaCheckBoxBorder implements Border, UIResource {
@Override
public Insets getBorderInsets(Component c) {
int bw = UIUtil.getParentOfType(CellRendererPane.class, c) != null ? 0 : JBUI.getInt(borderWidthPropertyName(), 1);
return JBUI.insets(bw, bw, bw, 0).asUIResource();
return UIUtil.getParentOfType(CellRendererPane.class, c) != null ?
JBUI.emptyInsets().asUIResource() :
JBUI.insets(borderWidthPropertyName(), JBUI.insets(1));
}
protected String borderWidthPropertyName() {
return "CheckBox.border.width";
return "CheckBox.borderInsets";
}
@Override
@@ -4,6 +4,6 @@ package com.intellij.ide.ui.laf.darcula.ui;
public class DarculaRadioButtonBorder extends DarculaCheckBoxBorder {
@Override
protected String borderWidthPropertyName() {
return "RadioButton.border.width";
return "RadioButton.borderInsets";
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 B

@@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="19" height="19" viewBox="0 0 19 19">
<defs>
<rect id="checkbox-a" width="14" height="14" x="3" y="2" rx="2"/>
</defs>
<g fill="none" fill-rule="evenodd">
<use fill="#43494A" xlink:href="#checkbox-a"/>
<rect width="13" height="13" x="3.5" y="2.5" stroke="#6B6B6B" rx="2"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 B

@@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="19" height="19" viewBox="0 0 19 19">
<defs>
<rect id="checkboxdisabled-a" width="14" height="14" x="3" y="2" rx="2"/>
</defs>
<g fill="none" fill-rule="evenodd">
<use fill="#3C3F41" xlink:href="#checkboxdisabled-a"/>
<rect width="13" height="13" x="3.5" y="2.5" stroke="#545556" rx="2"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 B

@@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="19" height="19" viewBox="0 0 19 19">
<defs>
<rect id="checkboxfocused-a" width="18" height="18" x="1" rx="3"/>
<path id="checkboxfocused-b" d="M5,2 L15,2 C16.1045695,2 17,2.8954305 17,4 L17,14 C17,15.1045695 16.1045695,16 15,16 L5,16 C3.8954305,16 3,15.1045695 3,14 L3,4 C3,2.8954305 3.8954305,2 5,2 Z M5,3 C4.44771525,3 4,3.44771525 4,4 L4,14 C4,14.5522847 4.44771525,15 5,15 L15,15 C15.5522847,15 16,14.5522847 16,14 L16,4 C16,3.44771525 15.5522847,3 15,3 L5,3 Z"/>
</defs>
<g fill="none" fill-rule="evenodd">
<use fill="#43494A" xlink:href="#checkboxfocused-a"/>
<rect width="15" height="15" x="2.5" y="1.5" stroke="#3D6185" stroke-width="3" rx="3"/>
<use fill="#466D94" opacity=".65" xlink:href="#checkboxfocused-b"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 852 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 B

@@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="19" height="19" viewBox="0 0 19 19">
<defs>
<rect id="checkboxindeterminateselected-a" width="14" height="14" x="3" y="2" rx="2"/>
</defs>
<g fill="none" fill-rule="evenodd">
<use fill="#43494A" xlink:href="#checkboxindeterminateselected-a"/>
<rect width="13" height="13" x="3.5" y="2.5" stroke="#6B6B6B" rx="2"/>
<rect width="8.4" height="2.8" x="5.8" y="7.6" fill="#A7A7A7" rx="1"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 B

@@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="19" height="19" viewBox="0 0 19 19">
<defs>
<rect id="checkboxindeterminateselecteddisabled-a" width="14" height="14" x="3" y="2" rx="2"/>
</defs>
<g fill="none" fill-rule="evenodd">
<use fill="#3C3F41" xlink:href="#checkboxindeterminateselecteddisabled-a"/>
<rect width="13" height="13" x="3.5" y="2.5" stroke="#545556" rx="2"/>
<rect width="8.4" height="2.8" x="5.8" y="7.6" fill="#606060" rx="1"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 B

@@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="19" height="19" viewBox="0 0 19 19">
<defs>
<rect id="checkboxindeterminateselectedfocused-a" width="18" height="18" x="1" rx="3"/>
<path id="checkboxindeterminateselectedfocused-b" d="M5,2 L15,2 C16.1045695,2 17,2.8954305 17,4 L17,14 C17,15.1045695 16.1045695,16 15,16 L5,16 C3.8954305,16 3,15.1045695 3,14 L3,4 C3,2.8954305 3.8954305,2 5,2 Z M5,3 C4.44771525,3 4,3.44771525 4,4 L4,14 C4,14.5522847 4.44771525,15 5,15 L15,15 C15.5522847,15 16,14.5522847 16,14 L16,4 C16,3.44771525 15.5522847,3 15,3 L5,3 Z"/>
</defs>
<g fill="none" fill-rule="evenodd">
<use fill="#43494A" xlink:href="#checkboxindeterminateselectedfocused-a"/>
<rect width="15" height="15" x="2.5" y="1.5" stroke="#3D6185" stroke-width="3" rx="3"/>
<rect width="8.4" height="2.8" x="5.737" y="7.579" fill="#A7A7A7" rx="1"/>
<use fill="#466D94" opacity=".65" xlink:href="#checkboxindeterminateselectedfocused-b"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1015 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 B

@@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="19" height="19" viewBox="0 0 19 19">
<defs>
<rect id="checkboxselected-a" width="14" height="14" x="3" y="2" rx="2"/>
</defs>
<g fill="none" fill-rule="evenodd">
<use fill="#43494A" xlink:href="#checkboxselected-a"/>
<rect width="13" height="13" x="3.5" y="2.5" stroke="#6B6B6B" rx="2"/>
<polyline stroke="#A7A7A7" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" points="6.733 9.46 8.595 12.267 13.267 5.733"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 B

@@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="19" height="19" viewBox="0 0 19 19">
<defs>
<rect id="checkboxselecteddisabled-a" width="14" height="14" x="3" y="2" rx="2"/>
</defs>
<g fill="none" fill-rule="evenodd">
<use fill="#3C3F41" xlink:href="#checkboxselecteddisabled-a"/>
<rect width="13" height="13" x="3.5" y="2.5" stroke="#545556" rx="2"/>
<polyline stroke="#606060" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" points="6.733 9.46 8.595 12.267 13.267 5.733"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 569 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 B

@@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="19" height="19" viewBox="0 0 19 19">
<defs>
<rect id="checkboxselectedfocused-a" width="18" height="18" x="1" rx="3"/>
<path id="checkboxselectedfocused-b" d="M5,2 L15,2 C16.1045695,2 17,2.8954305 17,4 L17,14 C17,15.1045695 16.1045695,16 15,16 L5,16 C3.8954305,16 3,15.1045695 3,14 L3,4 C3,2.8954305 3.8954305,2 5,2 Z M5,3 C4.44771525,3 4,3.44771525 4,4 L4,14 C4,14.5522847 4.44771525,15 5,15 L15,15 C15.5522847,15 16,14.5522847 16,14 L16,4 C16,3.44771525 15.5522847,3 15,3 L5,3 Z"/>
</defs>
<g fill="none" fill-rule="evenodd">
<use fill="#43494A" xlink:href="#checkboxselectedfocused-a"/>
<rect width="15" height="15" x="2.5" y="1.5" stroke="#395D82" stroke-width="3" rx="3"/>
<polyline stroke="#A7A7A7" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" points="6.684 9.409 8.545 12.214 13.214 5.684"/>
<use fill="#466D94" opacity=".65" xlink:href="#checkboxselectedfocused-b"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 B

@@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="19" height="19" viewBox="0 0 19 19">
<defs>
<circle id="radio-a" cx="7.5" cy="7.5" r="7.5"/>
</defs>
<g fill="none" fill-rule="evenodd" transform="translate(2 2)">
<use fill="#43494A" xlink:href="#radio-a"/>
<circle cx="7.5" cy="7.5" r="7" stroke="#6B6B6B"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 B

@@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="19" height="19" viewBox="0 0 19 19">
<defs>
<circle id="radiodisabled-a" cx="7.5" cy="7.5" r="7.5"/>
</defs>
<g fill="none" fill-rule="evenodd" transform="translate(2 2)">
<use fill="#3C3F41" xlink:href="#radiodisabled-a"/>
<circle cx="7.5" cy="7.5" r="7" stroke="#545556"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

@@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="19" height="19" viewBox="0 0 19 19">
<defs>
<circle id="radiofocused-a" cx="6.5" cy="6.5" r="6.5"/>
<path id="radiofocused-b" d="M9.5,17 C5.35786438,17 2,13.6421356 2,9.5 C2,5.35786438 5.35786438,2 9.5,2 C13.6421356,2 17,5.35786438 17,9.5 C17,13.6421356 13.6421356,17 9.5,17 Z M9.5,16 C13.0898509,16 16,13.0898509 16,9.5 C16,5.91014913 13.0898509,3 9.5,3 C5.91014913,3 3,5.91014913 3,9.5 C3,13.0898509 5.91014913,16 9.5,16 Z"/>
</defs>
<g fill="none" fill-rule="evenodd">
<g transform="translate(3 3)">
<use fill="#43494A" xlink:href="#radiofocused-a"/>
<circle cx="6.5" cy="6.5" r="8" stroke="#3D6185" stroke-width="3"/>
</g>
<use fill="#466D94" opacity=".65" xlink:href="#radiofocused-b"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 834 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 B

@@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="19" height="19" viewBox="0 0 19 19">
<defs>
<circle id="radioselected-a" cx="7.5" cy="7.5" r="7.5"/>
</defs>
<g fill="none" fill-rule="evenodd" transform="translate(2 2)">
<use fill="#43494A" xlink:href="#radioselected-a"/>
<circle cx="7.5" cy="7.5" r="7" stroke="#6B6B6B"/>
<circle cx="7.5" cy="7.5" r="2.5" fill="#A7A7A7"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 B

@@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="19" height="19" viewBox="0 0 19 19">
<defs>
<circle id="radioselecteddisabled-a" cx="7.5" cy="7.5" r="7.5"/>
</defs>
<g fill="none" fill-rule="evenodd" transform="translate(2 2)">
<use fill="#3C3F41" xlink:href="#radioselecteddisabled-a"/>
<circle cx="7.5" cy="7.5" r="7" stroke="#545556"/>
<circle cx="7.5" cy="7.5" r="2.5" fill="#606060"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 468 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 334 B

@@ -0,0 +1,14 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="19" height="19" viewBox="0 0 19 19">
<defs>
<circle id="radioselectedfocused-a" cx="6.5" cy="6.5" r="6.5"/>
<path id="radioselectedfocused-b" d="M9.5,17 C5.35786438,17 2,13.6421356 2,9.5 C2,5.35786438 5.35786438,2 9.5,2 C13.6421356,2 17,5.35786438 17,9.5 C17,13.6421356 13.6421356,17 9.5,17 Z M9.5,16 C13.0898509,16 16,13.0898509 16,9.5 C16,5.91014913 13.0898509,3 9.5,3 C5.91014913,3 3,5.91014913 3,9.5 C3,13.0898509 5.91014913,16 9.5,16 Z"/>
</defs>
<g fill="none" fill-rule="evenodd">
<g transform="translate(3 3)">
<use fill="#43494A" xlink:href="#radioselectedfocused-a"/>
<circle cx="6.5" cy="6.5" r="8" stroke="#3D6185" stroke-width="3"/>
<circle cx="6.5" cy="6.5" r="2.5" fill="#A7A7A7"/>
</g>
<use fill="#466D94" opacity=".65" xlink:href="#radioselectedfocused-b"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 923 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 648 B

@@ -90,7 +90,7 @@ FormattedTextField.border=com.intellij.ide.ui.laf.darcula.ui.DarculaTextBorder
CheckBoxUI=com.intellij.ide.ui.laf.intellij.IntelliJCheckBoxUI
CheckBox.border=com.intellij.ide.ui.laf.darcula.ui.DarculaCheckBoxBorder
CheckBox.border.width=3
CheckBox.borderInsets=3,2,2,0
ComboBoxUI=com.intellij.ide.ui.laf.darcula.ui.DarculaComboBoxUI
ComboBox.padding=1,5,1,5
@@ -103,7 +103,7 @@ ComboBox.darcula.arrowFocusedFillColor=2d82ed
RadioButtonUI=com.intellij.ide.ui.laf.darcula.ui.DarculaRadioButtonUI
RadioButton.border=com.intellij.ide.ui.laf.darcula.ui.DarculaRadioButtonBorder
RadioButton.border.width=2
RadioButton.borderInsets=2,2,2,0
RadioButton.darcula.selectionEnabledColor=ffffff
RadioButton.darcula.selectionDisabledColor=aaaaaa
RadioButton.darcula.selectionEnabledShadowColor=00000040
@@ -12,11 +12,11 @@ Border.width=4
CheckBoxUI=com.intellij.ide.ui.laf.intellij.MacIntelliJCheckBoxUI
CheckBox.border=com.intellij.ide.ui.laf.darcula.ui.DarculaCheckBoxBorder
CheckBox.border.width=4
CheckBox.borderInsets=4,4,4,0
RadioButtonUI=com.intellij.ide.ui.laf.intellij.MacIntelliJRadioButtonUI
RadioButton.border=com.intellij.ide.ui.laf.darcula.ui.DarculaRadioButtonBorder
RadioButton.border.width=3
RadioButton.borderInsets=3,3,3,0
link.foreground=2470B3
link.hover.foreground=2470B3
@@ -97,14 +97,14 @@ FormattedTextField.border=com.intellij.ide.ui.laf.intellij.WinIntelliJTextBorder
CheckBoxUI=com.intellij.ide.ui.laf.intellij.WinIntelliJCheckBoxUI
CheckBox.disabledText=8a8a8a
CheckBox.border=com.intellij.ide.ui.laf.darcula.ui.DarculaCheckBoxBorder
CheckBox.border.width=1
CheckBox.borderInsets=1,1,1,0
ComboBoxUI=com.intellij.ide.ui.laf.intellij.WinIntelliJComboBoxUI
ComboBox.padding=1,5,1,5
RadioButtonUI=com.intellij.ide.ui.laf.intellij.WinIntelliJRadioButtonUI
RadioButton.border=com.intellij.ide.ui.laf.darcula.ui.DarculaRadioButtonBorder
RadioButton.border.width=1
RadioButton.borderInsets=1,1,1,0
RadioButton.disabledText=8a8a8a
@@ -517,6 +517,12 @@ public class JBUI {
return insets(all, all, all, all);
}
@NotNull
public static JBInsets insets(String propName, JBInsets defaultValue) {
JBInsets i = (JBInsets)UIManager.getInsets(propName);
return i != null ? i : defaultValue;
}
@NotNull
public static JBInsets insets(int topBottom, int leftRight) {
return insets(topBottom, leftRight, topBottom, leftRight);