Improve resizing in flameshot (#2931)

* Allow symmetrical resizing using arrow keys when pressing ctrl

* Add feature to preserve aspect ratio while resizing selection window

* Format according to clang-format
This commit is contained in:
Dhruv Maroo
2022-10-03 23:03:20 +05:30
committed by GitHub
parent 11670457f3
commit d2b38f962c
7 changed files with 151 additions and 6 deletions

View File

@@ -1505,6 +1505,18 @@ void CaptureWidget::initShortcuts()
newShortcut(QKeySequence(ConfigHandler().shortcut("TYPE_RESIZE_DOWN")),
m_selection,
SLOT(resizeDown()));
newShortcut(QKeySequence(ConfigHandler().shortcut("TYPE_SYM_RESIZE_LEFT")),
m_selection,
SLOT(symResizeLeft()));
newShortcut(QKeySequence(ConfigHandler().shortcut("TYPE_SYM_RESIZE_RIGHT")),
m_selection,
SLOT(symResizeRight()));
newShortcut(QKeySequence(ConfigHandler().shortcut("TYPE_SYM_RESIZE_UP")),
m_selection,
SLOT(symResizeUp()));
newShortcut(QKeySequence(ConfigHandler().shortcut("TYPE_SYM_RESIZE_DOWN")),
m_selection,
SLOT(symResizeDown()));
newShortcut(QKeySequence(ConfigHandler().shortcut("TYPE_MOVE_LEFT")),
m_selection,