use of com.intellij.util.ui.JBInsets in project intellij-community by JetBrains.
the class DarculaTextFieldUI method getDrawingRect.
protected Rectangle getDrawingRect() {
final JTextComponent c = myTextField;
final JBInsets i = JBInsets.create(c.getInsets());
final int x = i.right - JBUI.scale(4) - JBUI.scale(16);
final int y = i.top - JBUI.scale(3);
final int w = c.getWidth() - i.width() + JBUI.scale(16 * 2 + 7 * 2 - 5);
int h = c.getBounds().height - i.height() + JBUI.scale(4 * 2 - 3);
if (h % 2 == 1)
h++;
return new Rectangle(x, y, w, h);
}
use of com.intellij.util.ui.JBInsets in project intellij-community by JetBrains.
the class LafManagerImpl method updateUI.
/**
* Updates LAF of all windows. The method also updates font of components
* as it's configured in <code>UISettings</code>.
*/
@Override
public void updateUI() {
final UIDefaults uiDefaults = UIManager.getLookAndFeelDefaults();
fixPopupWeight();
fixGtkPopupStyle();
fixTreeWideSelection(uiDefaults);
fixMenuIssues(uiDefaults);
if (UIUtil.isUnderAquaLookAndFeel()) {
uiDefaults.put("Panel.opaque", Boolean.TRUE);
} else if (UIUtil.isWinLafOnVista()) {
uiDefaults.put("ComboBox.border", null);
}
initInputMapDefaults(uiDefaults);
uiDefaults.put("Button.defaultButtonFollowsFocus", Boolean.FALSE);
uiDefaults.put("Balloon.error.textInsets", new JBInsets(3, 8, 3, 8).asUIResource());
patchFileChooserStrings(uiDefaults);
patchLafFonts(uiDefaults);
patchHiDPI(uiDefaults);
patchGtkDefaults(uiDefaults);
fixSeparatorColor(uiDefaults);
updateToolWindows();
for (Frame frame : Frame.getFrames()) {
// So we need to set frames background to exact and correct value.
if (SystemInfo.isMac) {
//noinspection UseJBColor
frame.setBackground(new Color(UIUtil.getPanelBackground().getRGB()));
}
updateUI(frame);
}
fireLookAndFeelChanged();
}
use of com.intellij.util.ui.JBInsets in project intellij-community by JetBrains.
the class MacIntelliJSpinnerUI method layoutEditor.
@Override
protected void layoutEditor(@NotNull JComponent editor) {
int w = spinner.getWidth();
int h = spinner.getHeight();
JBInsets insets = JBUI.insets(spinner.getInsets());
editor.setBounds(insets.left + 5, insets.top + 5, w - 5 - 26 - insets.width(), h - insets.height() - 10);
}
Aggregations