forked from qt-creator/qt-creator
separate font zoom from font size
Introduce "Reset Font Size" action, bound to Ctrl+0
This commit is contained in:
@@ -3411,14 +3411,8 @@ void BaseTextEditor::wheelEvent(QWheelEvent *e)
|
||||
|
||||
void BaseTextEditor::zoomIn(int range)
|
||||
{
|
||||
d->clearVisibleCollapsedBlock();
|
||||
QFont f = font();
|
||||
const int newSize = f.pointSize() + range;
|
||||
if (newSize <= 0)
|
||||
return;
|
||||
emit requestFontSize(newSize);
|
||||
// f.setPointSize(newSize);
|
||||
// setFont(f);
|
||||
d->clearVisibleCollapsedBlock();
|
||||
emit requestFontZoom(range*10);
|
||||
}
|
||||
|
||||
void BaseTextEditor::zoomOut(int range)
|
||||
@@ -3426,6 +3420,11 @@ void BaseTextEditor::zoomOut(int range)
|
||||
zoomIn(-range);
|
||||
}
|
||||
|
||||
void BaseTextEditor::zoomReset()
|
||||
{
|
||||
emit requestZoomReset();
|
||||
}
|
||||
|
||||
bool BaseTextEditor::isElectricCharacter(const QChar &) const
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user