forked from qt-creator/qt-creator
TextEditor: bound increase and decreaseFontZoom to a 10% grid
This allows to get back to a 100% font zoom with the keyboard shortcuts by zooming to an odd zoom factor by other means. Change-Id: Ie90853367b17c207e9c47fc108b8d6f451e0f838 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -6891,6 +6891,18 @@ static void showZoomIndicator(QWidget *editor, const int newZoom)
|
||||
Utils::FadingIndicator::SmallText);
|
||||
}
|
||||
|
||||
void TextEditorWidget::increaseFontZoom()
|
||||
{
|
||||
d->clearVisibleFoldedBlock();
|
||||
showZoomIndicator(this, TextEditorSettings::increaseFontZoom());
|
||||
}
|
||||
|
||||
void TextEditorWidget::decreaseFontZoom()
|
||||
{
|
||||
d->clearVisibleFoldedBlock();
|
||||
showZoomIndicator(this, TextEditorSettings::decreaseFontZoom());
|
||||
}
|
||||
|
||||
void TextEditorWidget::zoomF(float delta)
|
||||
{
|
||||
d->clearVisibleFoldedBlock();
|
||||
|
||||
Reference in New Issue
Block a user