Commit 5e9c140e authored by Eugene Popov's avatar Eugene Popov 🇺🇦 Committed by Nate Graham
Browse files

Remove redundant close button at the bottom of the preview window

This commit removes a redundant close button that duplicates the close
button in the title bar. Also, the preview window can be closed using
the keyboard shortcuts Ctrl+W / Alt+f4 / Esc.

BUG: 434517
FIXED-IN: 21.12
parent 37fe1d86
Pipeline #84929 passed with stage
in 2 minutes and 35 seconds
......@@ -47,14 +47,11 @@ ArkViewer::ArkViewer()
// Bug 369390: This prevents the Enter key from closing the window.
connect(m_buttonBox, &QDialogButtonBox::rejected, this, &QMainWindow::close);
KStandardAction::close(this, &QMainWindow::close, actionCollection());
QAction *closeAction = actionCollection()->addAction(QStringLiteral("close"), this, &ArkViewer::close);
......@@ -197,7 +194,7 @@ bool ArkViewer::viewInInternalViewer(const KService::Ptr viewer, const QString&
// Insert the KPart into its placeholder.
mainLayout->insertWidget(0, m_part->widget());
QAction* action = actionCollection()->addAction(QStringLiteral("help_about_kpart"));
const KPluginMetaData partMetaData = m_part->metaData();
......@@ -14,7 +14,7 @@
<string notr="true">MainWindow</string>
<widget class="QWidget" name="centralwidget">
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="mainLayout">
<property name="spacing">
......@@ -30,9 +30,6 @@
<property name="bottomMargin">
<widget class="QWidget" name="m_partPlaceholder" native="true"/>
<widget class="QWidget" name="m_mimeWidget" native="true">
<property name="sizePolicy">
......@@ -75,16 +72,6 @@
<widget class="QDialogButtonBox" name="m_buttonBox">
<property name="orientation">
<property name="standardButtons">
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment