Commit dad73768 authored by Scott Petrovic's avatar Scott Petrovic

condense new image a bit to help with Android build

parent 221737ae
......@@ -40,7 +40,6 @@ KisDetailsPane::KisDetailsPane(QWidget* parent, const QString& header)
setupUi(this);
m_previewLabel->installEventFilter(this);
m_documentList->installEventFilter(this);
m_documentList->setIconSize(QSize(IconExtent, IconExtent));
m_documentList->setModel(&d->m_model);
......@@ -62,12 +61,6 @@ KisDetailsPane::~KisDetailsPane()
bool KisDetailsPane::eventFilter(QObject* watched, QEvent* e)
{
if (watched == m_previewLabel) {
if (e->type() == QEvent::MouseButtonDblClick) {
openFile();
}
}
if (watched == m_documentList) {
if ((e->type() == QEvent::Resize) && isVisible()) {
emit splitterResized(this, m_splitter->sizes());
......
......@@ -123,16 +123,13 @@ void KisTemplatesPane::selectionChanged(const QModelIndex& index)
QStandardItem* item = model()->itemFromIndex(index);
m_openButton->setEnabled(true);
m_alwaysUseCheckBox->setEnabled(true);
m_titleLabel->setText(item->data(Qt::DisplayRole).toString());
m_previewLabel->setPixmap(item->data(Qt::UserRole + 2).value<QPixmap>());
m_detailsLabel->setHtml(item->data(Qt::UserRole).toString());
m_alwaysUseCheckBox->setChecked(item->data(Qt::UserRole + 1).toString() == d->m_alwaysUseTemplate);
} else {
m_openButton->setEnabled(false);
m_alwaysUseCheckBox->setEnabled(false);
m_alwaysUseCheckBox->setChecked(false);
m_titleLabel->clear();
m_previewLabel->setPixmap(QPixmap());
m_detailsLabel->clear();
}
}
......
......@@ -6,25 +6,34 @@
<rect>
<x>0</x>
<y>0</y>
<width>598</width>
<height>556</height>
<width>395</width>
<height>383</height>
</rect>
</property>
<property name="windowTitle">
<string comment="KDE::DoNotExtract">DetailsPaneBase</string>
</property>
<layout class="QGridLayout">
<property name="margin">
<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 row="0" column="0" colspan="2">
<widget class="QSplitter" name="m_splitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<enum>Qt::Vertical</enum>
</property>
<widget class="QTreeView" name="m_documentList">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
......@@ -38,38 +47,23 @@
</widget>
<widget class="QWidget" name="layoutWidget">
<layout class="QGridLayout">
<item row="0" column="0" colspan="3">
<widget class="QLabel" name="m_previewLabel">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0" colspan="3">
<widget class="QLabel" name="m_titleLabel">
<property name="font">
<font>
<family>Sans Serif</family>
<pointsize>9</pointsize>
<weight>75</weight>
<italic>false</italic>
<bold>true</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
<item row="0" column="2">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="text">
<string/>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>10</height>
</size>
</property>
</widget>
</spacer>
</item>
<item row="2" column="0">
<item row="4" column="1">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
......@@ -79,26 +73,42 @@
</property>
<property name="sizeHint" stdset="0">
<size>
<width>81</width>
<height>23</height>
<width>461</width>
<height>26</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="m_alwaysUseCheckBox">
<item row="3" column="0" colspan="3">
<widget class="QTextBrowser" name="m_detailsLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QPushButton" name="m_openButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Always use this template at application start up</string>
</property>
<property name="text">
<string>Always use this template</string>
<string/>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="2">
<item row="0" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
......@@ -108,13 +118,13 @@
</property>
<property name="sizeHint" stdset="0">
<size>
<width>81</width>
<height>23</height>
<width>10</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="0" colspan="3">
<item row="2" column="0" colspan="3">
<widget class="Line" name="line1">
<property name="frameShape">
<enum>QFrame::HLine</enum>
......@@ -127,42 +137,22 @@
</property>
</widget>
</item>
<item row="5" column="0" colspan="3">
<widget class="QTextBrowser" name="m_detailsLabel">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
</widget>
</item>
<item row="6" column="1">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>461</width>
<height>26</height>
</size>
</property>
</spacer>
</item>
<item row="6" column="2">
<widget class="QPushButton" name="m_openButton">
<item row="0" column="1">
<widget class="QCheckBox" name="m_alwaysUseCheckBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string/>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="autoDefault">
<bool>true</bool>
<property name="toolTip">
<string>Always use this template at application start up</string>
</property>
<property name="default">
<bool>true</bool>
<property name="text">
<string>Always use this template</string>
</property>
</widget>
</item>
......
......@@ -6,10 +6,22 @@
<rect>
<x>0</x>
<y>0</y>
<width>411</width>
<height>74</height>
<width>276</width>
<height>151</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
......@@ -33,6 +45,10 @@
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="lblColorModels">
<property name="text">
......@@ -53,13 +69,6 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="bnAdvanced">
<property name="text">
<string>Color Space Browser</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
......@@ -99,8 +108,14 @@
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="bnAdvanced">
<property name="text">
<string>Color Space Browser</string>
</property>
</widget>
</item>
</layout>
<zorder>lblColorSpaces</zorder>
</widget>
<customwidgets>
<customwidget>
......
This diff is collapsed.
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