diff options
author | W. J. van der Laan <laanwj@protonmail.com> | 2021-05-20 20:54:01 +0200 |
---|---|---|
committer | W. J. van der Laan <laanwj@protonmail.com> | 2021-05-20 22:09:15 +0200 |
commit | 710c8ba82953c5fdb7c3c8c9ad6ecf0fd88dface (patch) | |
tree | a8c190d94f7228477c93f9182cef8751f4dbb8f4 /src/fs.h | |
parent | 37e9f07996d3a7504ea54180d188ca91fdf0c884 (diff) | |
parent | 2a45134b5694c12546d77cdff541612881f7e3e7 (diff) |
Merge bitcoin-core/gui#281: set shortcuts for console's resize buttons
2a45134b5694c12546d77cdff541612881f7e3e7 qt: Add shortcuts for console font resize buttons (Hennadii Stepanov)
a2e122f0fe72d695762db2b83905e246f451300c qt: Add GUIUtil::AddButtonShortcut (Hennadii Stepanov)
4ee9ee72363d46c5ba0c71b8d8283d9c5621e3ed qt: Use native presentation of shortcut (Hennadii Stepanov)
Pull request description:
On `master` the only way to resize the console font is to manually move your mouse and click the resize buttons. This PR introduces convenient keyboard shortcuts to resize the console font.
The common resize shortcuts for applications are `Ctrl+=`/`Ctrl++` and `Ctrl+-`/`Ctrl+_`. This means that the resize QPushButtons need two shortcuts each, but you cannot assign multiple shortcuts to a QPushButton. See: https://doc.qt.io/qt-5/qabstractbutton.html#shortcut-prop
To get around this, we introduce a new function in `guiutil`, which connects a supplied `QKeySequence` shortcut to a `QAbstractButton`. This function can be reused in other situations where more than one shortcut is needed for a button.
| PR on macOS | PR on Linux |
| ---------------- | ------------ |
| ![mac-resize-shortcuts](https://user-images.githubusercontent.com/23396902/114750132-a2752580-9d21-11eb-9542-15716f2c257d.gif) | ![linux-resize-shortcuts](https://user-images.githubusercontent.com/23396902/114750165-aacd6080-9d21-11eb-8abc-5388690dcf0b.gif) |
ACKs for top commit:
hebasto:
re-ACK 2a45134b5694c12546d77cdff541612881f7e3e7
Talkless:
tACK 2a45134b5694c12546d77cdff541612881f7e3e7, tested on Debian Sid with Qt 5.15.2, shortcuts still work.
Tree-SHA512: e894ccb7e5c695ba83998c21a474d6c587c9c849f12ced665c5e0034feb6b143e41b32ba135cab6cfab22cbf153d5a52b1083b2a278e6dfca3f5ad14c0f6c573
Diffstat (limited to 'src/fs.h')
0 files changed, 0 insertions, 0 deletions