mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EditorImpl: editor-based cell renderer performance & setFontPreferences() fix
This commit is contained in:
@@ -6075,6 +6075,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
public void setEditorFontSize(int fontSize) {
|
||||
if (fontSize < MIN_FONT_SIZE) fontSize = MIN_FONT_SIZE;
|
||||
if (fontSize > myMaxFontSize) fontSize = myMaxFontSize;
|
||||
if (fontSize == myFontSize) return;
|
||||
myFontSize = fontSize;
|
||||
initFonts();
|
||||
}
|
||||
@@ -6087,8 +6088,9 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
|
||||
@Override
|
||||
public void setFontPreferences(@NotNull FontPreferences preferences) {
|
||||
if (Comparing.equal(preferences, myFontPreferences)) return;
|
||||
preferences.copyTo(myFontPreferences);
|
||||
initFonts();
|
||||
reinitSettings();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -6101,6 +6103,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
|
||||
@Override
|
||||
public void setEditorFontName(String fontName) {
|
||||
if (Comparing.equal(fontName, myFaceName)) return;
|
||||
myFaceName = fontName;
|
||||
initFonts();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user