Repository navigation
feat(qt): add global zoom shortcuts #7216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
1d97f9b
d5f2e46
02897a5
6ce9363
713c318
cbf65bb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| GUI changes | ||
| ----------- | ||
|
|
||
| - The Window menu has new Zoom In, Zoom Out and Reset Zoom entries that change | ||
| the font scale of the whole application, bound to the platform zoom | ||
| shortcuts (Ctrl++ / Ctrl+= and Ctrl+- / Ctrl+_; Cmd on macOS) and Ctrl+0. | ||
| The new scale is saved like the Appearance tab's font scale setting. Like | ||
| that slider, the entries are disabled when `-font-scale` is given on the | ||
| command line. Inside the RPC console window the zoom-in/out keys still resize | ||
| only the console text, and when the console is the main window | ||
| (`-disablewallet` or builds without wallet support) the keys stay with the | ||
| console while the menu entries keep zooming the whole application. (#7216) | ||
|
|
||
| - The font scale range is now -50 to 100, both for `-font-scale` and the | ||
| Appearance tab slider, which used to stop at -30 and 30. `-font-scale` values | ||
| below -50 on the command line or in the configuration file, which earlier | ||
| versions accepted down to -100 although they shrank text towards zero size, | ||
| are now rejected at startup. A font scale saved in `settings.json` | ||
| outside the range is clamped on load and the clamped value is saved. (#7216) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -553,6 +553,16 @@ RPCConsole::RPCConsole(interfaces::Node& node, QWidget* parent, Qt::WindowFlags | |
|
|
||
| setButtonIcons(); | ||
|
|
||
| // Not in setButtonIcons(): it re-runs on theme changes and would stack duplicate QShortcuts. | ||
| //: Main shortcut to increase the RPC console font size. | ||
| ui->fontBiggerButton->setShortcut(tr("Ctrl++")); | ||
| //: Secondary shortcut to increase the RPC console font size. | ||
| GUIUtil::AddButtonShortcut(ui->fontBiggerButton, tr("Ctrl+=")); | ||
| //: Main shortcut to decrease the RPC console font size. | ||
| ui->fontSmallerButton->setShortcut(tr("Ctrl+-")); | ||
| //: Secondary shortcut to decrease the RPC console font size. | ||
| GUIUtil::AddButtonShortcut(ui->fontSmallerButton, tr("Ctrl+_")); | ||
|
|
||
| // Install event filter for up and down arrow | ||
| ui->lineEdit->installEventFilter(this); | ||
| ui->lineEdit->setMaxLength(16 * 1024 * 1024); | ||
|
|
@@ -1342,16 +1352,7 @@ void RPCConsole::setButtonIcons() | |
| GUIUtil::setIcon(ui->clearButton, "remove", GUIUtil::ThemedColor::RED, consoleButtonsSize); | ||
|
|
||
| GUIUtil::setIcon(ui->fontBiggerButton, "fontbigger", GUIUtil::ThemedColor::BLUE, consoleButtonsSize); | ||
| //: Main shortcut to increase the RPC console font size. | ||
| ui->fontBiggerButton->setShortcut(tr("Ctrl++")); | ||
| //: Secondary shortcut to increase the RPC console font size. | ||
| GUIUtil::AddButtonShortcut(ui->fontBiggerButton, tr("Ctrl+=")); | ||
|
|
||
| GUIUtil::setIcon(ui->fontSmallerButton, "fontsmaller", GUIUtil::ThemedColor::BLUE, consoleButtonsSize); | ||
| //: Main shortcut to decrease the RPC console font size. | ||
| ui->fontSmallerButton->setShortcut(tr("Ctrl+-")); | ||
| //: Secondary shortcut to decrease the RPC console font size. | ||
| GUIUtil::AddButtonShortcut(ui->fontSmallerButton, tr("Ctrl+_")); | ||
|
Comment on lines
-1345
to
-1354
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shortcut Ctrl++ doesn't work when RPC Console is open (no zoom for main window); but shortcut for font bigger / font smaller is removed by this PR. Could you revert these changes?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reverted in e4498de ( With the console in its own window, 🤖 Posted autonomously by Codex on behalf of pasta. |
||
| } | ||
|
|
||
| void RPCConsole::reloadThemedWidgets() | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.