Commit b1fd0248 authored by Kirill Kirichenko's avatar Kirill Kirichenko
Browse files

IDEA-171869 Win10 LaF new checkbox icons and fix remaining insets for textfields and comboboxes

(cherry picked from commit 9ea1cbc3)
parent 58a69802
Branches unavailable Tags unavailable
No related merge requests found
Showing with 16 additions and 6 deletions
+16 -6
......@@ -92,11 +92,16 @@ public class ComponentWithBrowseButton<Comp extends JComponent> extends JPanel i
}
public void setTextFieldPreferredWidth(final int charCount) {
final Comp comp = getChildComponent();
JComponent comp = getChildComponent();
Dimension size = GuiUtils.getSizeByChars(charCount, comp);
comp.setPreferredSize(size);
final Dimension preferredSize = myBrowseButton.getPreferredSize();
setPreferredSize(new Dimension(size.width + preferredSize.width + 2, UIUtil.isUnderAquaLookAndFeel() ? preferredSize.height : preferredSize.height + 2));
Dimension preferredSize = myBrowseButton.getPreferredSize();
boolean keepHeight = UIUtil.isUnderAquaLookAndFeel() || UIUtil.isUnderWin10LookAndFeel();
preferredSize.setSize(size.width + preferredSize.width + 2,
keepHeight ? preferredSize.height : preferredSize.height + 2);
setPreferredSize(preferredSize);
}
@Override
......@@ -303,9 +308,8 @@ public class ComponentWithBrowseButton<Comp extends JComponent> extends JPanel i
@Override
public final void requestFocus() {
IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(() -> {
IdeFocusManager.getGlobalInstance().requestFocus(myComponent, true);
});
IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(() ->
IdeFocusManager.getGlobalInstance().requestFocus(myComponent, true));
}
@SuppressWarnings("deprecation")
......
platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelected@2x.png

15.5 KB | W: 0px | H: 0px

platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelected@2x.png

30.5 KB | W: 0px | H: 0px

platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelected@2x.png
platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelected@2x.png
platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelected@2x.png
platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelected@2x.png
  • 2-up
  • Swipe
  • Onion skin
platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelectedDisabled@2x.png

491 Bytes | W: 0px | H: 0px

platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelectedDisabled@2x.png

30.1 KB | W: 0px | H: 0px

platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelectedDisabled@2x.png
platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelectedDisabled@2x.png
platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelectedDisabled@2x.png
platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelectedDisabled@2x.png
  • 2-up
  • Swipe
  • Onion skin
platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelectedFocused@2x.png

531 Bytes | W: 0px | H: 0px

platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelectedFocused@2x.png

29.6 KB | W: 0px | H: 0px

platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelectedFocused@2x.png
platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelectedFocused@2x.png
platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelectedFocused@2x.png
platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelectedFocused@2x.png
  • 2-up
  • Swipe
  • Onion skin
platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelectedPressed@2x.png

512 Bytes | W: 0px | H: 0px

platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelectedPressed@2x.png

29.6 KB | W: 0px | H: 0px

platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelectedPressed@2x.png
platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelectedPressed@2x.png
platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelectedPressed@2x.png
platform/platform-impl/src/com/intellij/ide/ui/laf/icons/win10/checkBoxSelectedPressed@2x.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -20,6 +20,7 @@ import com.intellij.openapi.options.ConfigurationException;
import com.intellij.openapi.project.Project;
import com.intellij.ui.TextFieldWithAutoCompletion;
import com.intellij.ui.components.JBRadioButton;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.UIUtil;
import com.intellij.xml.Html5SchemaProvider;
import com.intellij.xml.util.XmlUtil;
......@@ -88,6 +89,11 @@ public class DefaultSchemasConfigurable implements Configurable {
myHtml4RadioButton.addActionListener(listener);
myHtml5RadioButton.addActionListener(listener);
myOtherRadioButton.addActionListener(listener);
if (UIUtil.isUnderWin10LookAndFeel()) {
myOtherRadioButton.setBorder(JBUI.Borders.empty());
}
return myContentPanel;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment