mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-24 05:45:27 +00:00
Updated DisasWidget zoom shortcuts
Now the shortcuts are consistent with the GraphView widget.
This commit is contained in:
parent
7974b18ff9
commit
f830fc17fb
@ -51,6 +51,12 @@ Disassembly view shortcuts
|
|||||||
+------------+----------------------------------+
|
+------------+----------------------------------+
|
||||||
| X | Show Xrefs |
|
| X | Show Xrefs |
|
||||||
+------------+----------------------------------+
|
+------------+----------------------------------+
|
||||||
|
| \+ | Zoom in |
|
||||||
|
+------------+----------------------------------+
|
||||||
|
| \- | Zoom out |
|
||||||
|
+------------+----------------------------------+
|
||||||
|
| = | Reset zoom |
|
||||||
|
+------------+----------------------------------+
|
||||||
|
|
||||||
Graph view shortcuts
|
Graph view shortcuts
|
||||||
--------------------
|
--------------------
|
||||||
|
@ -218,11 +218,10 @@ DisassemblyWidget::DisassemblyWidget(MainWindow *main, QAction *action)
|
|||||||
moveCursorRelative(true, true);
|
moveCursorRelative(true, true);
|
||||||
})
|
})
|
||||||
|
|
||||||
// Plus sign in num-bar considered "Qt::Key_Equal"
|
// Zoom shortcuts
|
||||||
ADD_ACTION(QKeySequence(Qt::CTRL + Qt::Key_Equal), Qt::WidgetWithChildrenShortcut, &DisassemblyWidget::zoomIn)
|
ADD_ACTION(QKeySequence(Qt::Key_Plus), Qt::WidgetWithChildrenShortcut, &DisassemblyWidget::zoomIn)
|
||||||
// Plus sign in numpad
|
ADD_ACTION(QKeySequence(Qt::Key_Minus), Qt::WidgetWithChildrenShortcut, &DisassemblyWidget::zoomOut)
|
||||||
ADD_ACTION(QKeySequence(Qt::CTRL + Qt::Key_Plus), Qt::WidgetWithChildrenShortcut, &DisassemblyWidget::zoomIn)
|
ADD_ACTION(QKeySequence(Qt::Key_Equal), Qt::WidgetWithChildrenShortcut, &DisassemblyWidget::zoomReset)
|
||||||
ADD_ACTION(QKeySequence(Qt::CTRL + Qt::Key_Minus), Qt::WidgetWithChildrenShortcut, &DisassemblyWidget::zoomOut)
|
|
||||||
#undef ADD_ACTION
|
#undef ADD_ACTION
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -397,6 +396,12 @@ void DisassemblyWidget::zoomOut()
|
|||||||
updateMaxLines();
|
updateMaxLines();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DisassemblyWidget::zoomReset()
|
||||||
|
{
|
||||||
|
setupFonts();
|
||||||
|
updateMaxLines();
|
||||||
|
}
|
||||||
|
|
||||||
void DisassemblyWidget::highlightCurrentLine()
|
void DisassemblyWidget::highlightCurrentLine()
|
||||||
{
|
{
|
||||||
QList<QTextEdit::ExtraSelection> extraSelections;
|
QList<QTextEdit::ExtraSelection> extraSelections;
|
||||||
|
@ -48,6 +48,7 @@ protected slots:
|
|||||||
|
|
||||||
void zoomIn();
|
void zoomIn();
|
||||||
void zoomOut();
|
void zoomOut();
|
||||||
|
void zoomReset();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
DisassemblyContextMenu *mCtxMenu;
|
DisassemblyContextMenu *mCtxMenu;
|
||||||
|
Loading…
Reference in New Issue
Block a user