Commit 6a4d08ba authored by Jens Bache-Wiig's avatar Jens Bache-Wiig
Browse files

Fix some layout issues with the new dialog

* Slightly larger row height
* Make the default size slightly nicer
* Fixed a drawing artifact in certain styles

Note that the dialog will be resizable on linux now.

Reviewed-by: mae
parent bc193370
......@@ -95,7 +95,7 @@ public:
}
};
#define CATEGORY_ROW_HEIGHT 18
#define ROW_HEIGHT 24
class FancyTopLevelDelegate : public QItemDelegate
{
......@@ -127,8 +127,8 @@ public:
{
QSize size = QItemDelegate::sizeHint(option, index);
if (!index.parent().isValid())
size = size.expandedTo(QSize(0, CATEGORY_ROW_HEIGHT));
size = size.expandedTo(QSize(0, ROW_HEIGHT));
return size;
}
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>513</width>
<height>390</height>
<width>554</width>
<height>412</height>
</rect>
</property>
<property name="sizePolicy">
......@@ -16,47 +16,57 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="windowTitle">
<string>New Project</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item row="3" column="1">
<widget class="QTextBrowser" name="templateDescription">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Choose a template:</string>
</property>
</widget>
</item>
<item row="1" column="0" rowspan="3">
<widget class="QTreeView" name="templateCategoryView">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>100</height>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
<enum>Qt::StrongFocus</enum>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<property name="styleSheet">
<string notr="true"> QTreeView::branch {
background: transparent;
}</string>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
<property name="indentation">
<number>0</number>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Choose a template:</string>
<property name="rootIsDecorated">
<bool>false</bool>
</property>
<property name="itemsExpandable">
<bool>false</bool>
</property>
<property name="headerHidden">
<bool>true</bool>
</property>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
<item row="1" column="1" rowspan="2">
......@@ -78,32 +88,33 @@
</property>
</widget>
</item>
<item row="1" column="0" rowspan="3">
<widget class="QTreeView" name="templateCategoryView">
<item row="3" column="1">
<widget class="QTextBrowser" name="templateDescription">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height>
<width>16777215</width>
<height>140</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="indentation">
<number>0</number>
</property>
<property name="rootIsDecorated">
<bool>false</bool>
<enum>Qt::NoFocus</enum>
</property>
<property name="itemsExpandable">
<bool>false</bool>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="headerHidden">
<bool>true</bool>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
</layout>
......
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