mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-20 20:06:12 +00:00
widgets/disasm: Add shortcuts to change font-size
Add two shortcut for changing the font-size in the Disassembly window: CTRL+PLUS : increase font size CTRL+MINUS: decrease font size Issue: #298
This commit is contained in:
parent
81aa85e461
commit
db76bffbe3
@ -169,6 +169,8 @@ DisassemblyWidget::DisassemblyWidget(MainWindow *main, QAction *action)
|
||||
ADD_SHORTCUT(QKeySequence::MoveToPreviousPage, [this]() {
|
||||
moveCursorRelative(true, true);
|
||||
})
|
||||
ADD_SHORTCUT(QKeySequence(Qt::CTRL + Qt::Key_Plus), &DisassemblyWidget::zoomIn)
|
||||
ADD_SHORTCUT(QKeySequence(Qt::CTRL + Qt::Key_Minus), &DisassemblyWidget::zoomOut)
|
||||
#undef ADD_SHORTCUT
|
||||
}
|
||||
|
||||
@ -293,6 +295,16 @@ bool DisassemblyWidget::updateMaxLines()
|
||||
return false;
|
||||
}
|
||||
|
||||
void DisassemblyWidget::zoomIn() {
|
||||
mDisasTextEdit->zoomIn();
|
||||
updateMaxLines();
|
||||
}
|
||||
|
||||
void DisassemblyWidget::zoomOut() {
|
||||
mDisasTextEdit->zoomOut();
|
||||
updateMaxLines();
|
||||
}
|
||||
|
||||
void DisassemblyWidget::highlightCurrentLine()
|
||||
{
|
||||
QList<QTextEdit::ExtraSelection> extraSelections;
|
||||
|
@ -39,6 +39,9 @@ private slots:
|
||||
|
||||
void cursorPositionChanged();
|
||||
|
||||
void zoomIn();
|
||||
void zoomOut();
|
||||
|
||||
private:
|
||||
DisassemblyContextMenu *mCtxMenu;
|
||||
DisassemblyScrollArea *mDisasScrollArea;
|
||||
|
Loading…
Reference in New Issue
Block a user