GP-3419 add ctrl-0 key binding to reset font size

This commit is contained in:
dev747368 2023-05-10 16:45:44 +00:00
parent babc38dacc
commit ec54bd4e73
2 changed files with 22 additions and 0 deletions

View file

@ -827,6 +827,18 @@ public abstract class ComponentProvider implements HelpDescriptor, ActionContext
ThemeManager.getInstance().setFont(registeredFontId, font.deriveFont((float) size));
}
/**
* Tells the provider to reset the font size for this provider.
* <p>
* See {@link #adjustFontSize(boolean)}
*/
public void resetFontSize() {
if (registeredFontId == null) {
return;
}
ThemeManager.getInstance().restoreFont(registeredFontId);
}
/**
* Registers a fontId for the font that will be automatically adjusted when
* {@link #adjustFontSize(boolean)} is called.