mirror of
https://github.com/zealdocs/zeal.git
synced 2024-08-17 02:00:25 +03:00
fix(ui): do not intercept Alt+Left and Alt+Right
These are reserved for back and forward browser actions. Fixes #1531.
This commit is contained in:
parent
780f2388b1
commit
2024915307
@ -122,14 +122,10 @@ MainWindow::MainWindow(Core::Application *app, QWidget *parent)
|
||||
}
|
||||
});
|
||||
|
||||
ui->actionBack->setShortcut(QKeySequence::Back);
|
||||
connect(ui->actionBack, &QAction::triggered, this, [this]() { currentTab()->webControl()->back(); });
|
||||
addAction(ui->actionBack);
|
||||
|
||||
ui->actionForward->setShortcut(QKeySequence::Forward);
|
||||
connect(ui->actionForward, &QAction::triggered, this, [this]() { currentTab()->webControl()->forward(); });
|
||||
addAction(ui->actionForward);
|
||||
|
||||
shortcut = new QShortcut(QKeySequence::Back, this);
|
||||
connect(shortcut, &QShortcut::activated, this, [this]() { currentTab()->webControl()->back(); });
|
||||
shortcut = new QShortcut(QKeySequence::Forward, this);
|
||||
connect(shortcut, &QShortcut::activated, this, [this]() { currentTab()->webControl()->forward(); });
|
||||
shortcut = new QShortcut(QKeySequence::ZoomIn, this);
|
||||
connect(shortcut, &QShortcut::activated, this, [this]() { currentTab()->webControl()->zoomIn(); });
|
||||
shortcut = new QShortcut(QStringLiteral("Ctrl+="), this);
|
||||
|
@ -132,30 +132,6 @@
|
||||
<string>About &Zeal</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionBack">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-previous">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Back</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionForward">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-next">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Forward</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionNewTab">
|
||||
<property name="icon">
|
||||
<iconset theme="tab-new">
|
||||
|
@ -85,7 +85,7 @@ SearchSidebar::SearchSidebar(const SearchSidebar *other, QWidget *parent)
|
||||
connect(m_treeView, &QTreeView::clicked, this, &SearchSidebar::navigateToIndex);
|
||||
|
||||
// Setup Alt+Up, Alt+Down, etc shortcuts.
|
||||
const auto keyList = {Qt::Key_Up, Qt::Key_Down, Qt::Key_Left, Qt::Key_Right,
|
||||
const auto keyList = {Qt::Key_Up, Qt::Key_Down,
|
||||
Qt::Key_PageUp, Qt::Key_PageDown,
|
||||
Qt::Key_Home, Qt::Key_End};
|
||||
for (const auto key : keyList) {
|
||||
|
Loading…
Reference in New Issue
Block a user