mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-19 19:36:11 +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 |
|
||||
+------------+----------------------------------+
|
||||
| \+ | Zoom in |
|
||||
+------------+----------------------------------+
|
||||
| \- | Zoom out |
|
||||
+------------+----------------------------------+
|
||||
| = | Reset zoom |
|
||||
+------------+----------------------------------+
|
||||
|
||||
Graph view shortcuts
|
||||
--------------------
|
||||
|
@ -218,11 +218,10 @@ DisassemblyWidget::DisassemblyWidget(MainWindow *main, QAction *action)
|
||||
moveCursorRelative(true, true);
|
||||
})
|
||||
|
||||
// Plus sign in num-bar considered "Qt::Key_Equal"
|
||||
ADD_ACTION(QKeySequence(Qt::CTRL + Qt::Key_Equal), Qt::WidgetWithChildrenShortcut, &DisassemblyWidget::zoomIn)
|
||||
// Plus sign in numpad
|
||||
ADD_ACTION(QKeySequence(Qt::CTRL + Qt::Key_Plus), Qt::WidgetWithChildrenShortcut, &DisassemblyWidget::zoomIn)
|
||||
ADD_ACTION(QKeySequence(Qt::CTRL + Qt::Key_Minus), Qt::WidgetWithChildrenShortcut, &DisassemblyWidget::zoomOut)
|
||||
// Zoom shortcuts
|
||||
ADD_ACTION(QKeySequence(Qt::Key_Plus), Qt::WidgetWithChildrenShortcut, &DisassemblyWidget::zoomIn)
|
||||
ADD_ACTION(QKeySequence(Qt::Key_Minus), Qt::WidgetWithChildrenShortcut, &DisassemblyWidget::zoomOut)
|
||||
ADD_ACTION(QKeySequence(Qt::Key_Equal), Qt::WidgetWithChildrenShortcut, &DisassemblyWidget::zoomReset)
|
||||
#undef ADD_ACTION
|
||||
}
|
||||
|
||||
@ -397,6 +396,12 @@ void DisassemblyWidget::zoomOut()
|
||||
updateMaxLines();
|
||||
}
|
||||
|
||||
void DisassemblyWidget::zoomReset()
|
||||
{
|
||||
setupFonts();
|
||||
updateMaxLines();
|
||||
}
|
||||
|
||||
void DisassemblyWidget::highlightCurrentLine()
|
||||
{
|
||||
QList<QTextEdit::ExtraSelection> extraSelections;
|
||||
|
@ -48,6 +48,7 @@ protected slots:
|
||||
|
||||
void zoomIn();
|
||||
void zoomOut();
|
||||
void zoomReset();
|
||||
|
||||
protected:
|
||||
DisassemblyContextMenu *mCtxMenu;
|
||||
|
Loading…
Reference in New Issue
Block a user