mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-161384 ui: fix text alignment in ComboBoxAction under HiDPI
This commit is contained in:
committed by
Aleksey Pivovarov
parent
64004fc7c5
commit
136bb52aae
@@ -415,7 +415,7 @@ public abstract class ComboBoxAction extends AnAction implements CustomComponent
|
||||
final Font font = getFont();
|
||||
g.setFont(font);
|
||||
g.setColor(textColor);
|
||||
g.drawString(getText(), x, (size.height + font.getSize()) / 2 - 1);
|
||||
UIUtil.drawCenteredString((Graphics2D)g, new Rectangle(x, 0, Integer.MAX_VALUE, size.height), getText(), false, true);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -454,7 +454,7 @@ public abstract class ComboBoxAction extends AnAction implements CustomComponent
|
||||
final Font font = getFont();
|
||||
g2.setFont(font);
|
||||
g2.setColor(textColor);
|
||||
g2.drawString(getText(), x, (size.height + font.getSize()) / 2 - 1);
|
||||
UIUtil.drawCenteredString(g2, new Rectangle(x, 0, Integer.MAX_VALUE, size.height), getText(), false, true);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user