mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJPL-184075 Expose EditorImpl.setFontSize(float, Point)
Needed for the terminal. GitOrigin-RevId: f43b33b1348805bcf60a5d061b506421ba090516
This commit is contained in:
committed by
intellij-monorepo-bot
parent
cc888c0173
commit
c161a522a1
@@ -1325,12 +1325,17 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
|
||||
@Override
|
||||
public void setFontSize(int fontSize) {
|
||||
ReadAction.run(() -> setFontSize(fontSize, null));
|
||||
ReadAction.run(() -> setFontSizeImpl(fontSize, null));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFontSize(float fontSize) {
|
||||
ReadAction.run(() -> setFontSize(fontSize, null));
|
||||
ReadAction.run(() -> setFontSizeImpl(fontSize, null));
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public void setFontSize(float fontSize, @Nullable Point zoomCenter) {
|
||||
ReadAction.run(() -> setFontSizeImpl(fontSize, zoomCenter));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1339,7 +1344,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
* @param fontSize new font size
|
||||
* @param zoomCenter zoom point, relative to viewport
|
||||
*/
|
||||
private void setFontSize(float fontSize, @Nullable Point zoomCenter) {
|
||||
private void setFontSizeImpl(float fontSize, @Nullable Point zoomCenter) {
|
||||
int oldFontSize = myScheme.getEditorFontSize();
|
||||
float oldFontSize2D = myScheme.getEditorFontSize2D();
|
||||
|
||||
@@ -5800,12 +5805,12 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
size -= shift;
|
||||
if (size >= MIN_FONT_SIZE) {
|
||||
if (isWheelFontChangePersistent) {
|
||||
setFontSize(UISettingsUtils.getInstance().scaleFontSize(size),
|
||||
convertPoint(this, e.getPoint(), getViewport()));
|
||||
setFontSizeImpl(UISettingsUtils.getInstance().scaleFontSize(size),
|
||||
convertPoint(this, e.getPoint(), getViewport()));
|
||||
adjustGlobalFontSize(size);
|
||||
}
|
||||
else {
|
||||
setFontSize(size, convertPoint(this, e.getPoint(), getViewport()));
|
||||
setFontSizeImpl(size, convertPoint(this, e.getPoint(), getViewport()));
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user