Commit f78dc335 authored by Ragnar Thomsen's avatar Ragnar Thomsen

Improve layout of internal previewer

Move the mimetype icon and mimetype comment below the KPart. Decrease
the icon size. Remove some unnessesary margins.

BUG: 385710
FIXED-IN: 17.08.3
Differential Revision: D8294
parent 0c4f5b62
......@@ -172,7 +172,7 @@ bool ArkViewer::viewInInternalViewer(const QString& fileName, const QMimeType &m
setWindowFilePath(fileName);
// Set icon and comment for the mimetype.
m_iconLabel->setPixmap(QIcon::fromTheme(mimeType.iconName()).pixmap(IconSize(KIconLoader::Desktop), IconSize(KIconLoader::Desktop)));
m_iconLabel->setPixmap(QIcon::fromTheme(mimeType.iconName()).pixmap(IconSize(KIconLoader::Small), IconSize(KIconLoader::Small)));
m_commentLabel->setText(mimeType.comment());
// Create the ReadOnlyPart instance.
......
......@@ -15,6 +15,24 @@
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="m_partPlaceholder" native="true"/>
</item>
<item>
<widget class="QWidget" name="m_mimeWidget" native="true">
<property name="sizePolicy">
......@@ -24,6 +42,12 @@
</sizepolicy>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="m_iconLabel">
<property name="text">
......@@ -51,22 +75,19 @@
</property>
</spacer>
</item>
<item>
<widget class="QDialogButtonBox" name="m_buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="m_partPlaceholder" native="true"/>
</item>
<item>
<widget class="QDialogButtonBox" name="m_buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
......
Markdown is supported
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