mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-149337 [follow-up] UI fonts are too big
Reverted changes in UISettings due to a regression. Filed a separate issue (IDEA-153597) to address the original problem.
This commit is contained in:
@@ -53,15 +53,8 @@ public class UISettings extends SimpleModificationTracker implements PersistentS
|
||||
/** Not tabbed pane. */
|
||||
public static final int TABS_NONE = 0;
|
||||
|
||||
private String lafID;
|
||||
|
||||
public static UISettings getInstance() {
|
||||
UISettings instance = ServiceManager.getService(UISettings.class);
|
||||
if (!instance.lafID.equals(UIManager.getLookAndFeel().getID())) {
|
||||
// Re-init if LaF changed.
|
||||
instance.init();
|
||||
}
|
||||
return instance;
|
||||
return ServiceManager.getService(UISettings.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -142,10 +135,6 @@ public class UISettings extends SimpleModificationTracker implements PersistentS
|
||||
private final EventDispatcher<UISettingsListener> myDispatcher = EventDispatcher.create(UISettingsListener.class);
|
||||
|
||||
public UISettings() {
|
||||
init();
|
||||
}
|
||||
|
||||
private void init() {
|
||||
tweakPlatformDefaults();
|
||||
setSystemFontFaceAndSize();
|
||||
|
||||
@@ -153,7 +142,6 @@ public class UISettings extends SimpleModificationTracker implements PersistentS
|
||||
if (scrollToSource != null) {
|
||||
DEFAULT_AUTOSCROLL_TO_SOURCE = scrollToSource;
|
||||
}
|
||||
lafID = UIManager.getLookAndFeel().getID();
|
||||
}
|
||||
|
||||
private void tweakPlatformDefaults() {
|
||||
@@ -193,9 +181,11 @@ public class UISettings extends SimpleModificationTracker implements PersistentS
|
||||
}
|
||||
|
||||
private void setSystemFontFaceAndSize() {
|
||||
final Pair<String, Integer> fontData = getSystemFontFaceAndSize();
|
||||
FONT_FACE = fontData.first;
|
||||
FONT_SIZE = fontData.second;
|
||||
if (FONT_FACE == null || FONT_SIZE <= 0) {
|
||||
final Pair<String, Integer> fontData = getSystemFontFaceAndSize();
|
||||
FONT_FACE = fontData.first;
|
||||
FONT_SIZE = fontData.second;
|
||||
}
|
||||
}
|
||||
|
||||
private static Pair<String, Integer> getSystemFontFaceAndSize() {
|
||||
|
||||
Reference in New Issue
Block a user