separate font zoom from font size

Introduce "Reset Font Size" action, bound to Ctrl+0
This commit is contained in:
mae
2009-11-30 19:00:36 +01:00
parent 85b6ee648c
commit d6e4a787d5
13 changed files with 116 additions and 18 deletions

View File

@@ -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;