Tweaked layout of SelectProductDialog.

- Tweaks to layout so that it resizes without artifacts.
- Removed parent window so that window manager will not center dialog on parent,
  which makes resizing difficult depending on size and location of parent window.
This commit is contained in:
Jim Evins
2017-11-06 22:35:59 -05:00
parent e970301680
commit 7b36ab4943
3 changed files with 69 additions and 62 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ namespace glabels
///
bool File::newLabel( MainWindow *window )
{
SelectProductDialog dialog( window );
SelectProductDialog dialog;
dialog.exec();
const Template* tmplate = dialog.tmplate();
+33 -26
View File
@@ -7,12 +7,21 @@
<x>0</x>
<y>0</y>
<width>997</width>
<height>661</height>
<height>823</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>gLabels - Select Product</string>
</property>
<property name="sizeGripEnabled">
<bool>true</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<layout class="QVBoxLayout" name="verticalLayout_3">
@@ -95,15 +104,10 @@
</property>
<property name="minimumSize">
<size>
<width>146</width>
<height>87</height>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
@@ -117,6 +121,8 @@
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>3</number>
</property>
@@ -142,6 +148,8 @@
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
@@ -170,7 +178,16 @@
<item>
<widget class="QWidget" name="categoriesCheckContainer" native="true">
<layout class="QGridLayout" name="gridLayout">
<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>
<property name="spacing">
@@ -202,7 +219,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
<height>3</height>
</size>
</property>
</spacer>
@@ -253,6 +270,12 @@
</item>
<item>
<widget class="glabels::TemplatePicker" name="templatePicker">
<property name="minimumSize">
<size>
<width>140</width>
<height>0</height>
</size>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
@@ -299,22 +322,6 @@
<include location="../icons.qrc"/>
</resources>
<connections>
<connection>
<sender>pageSizeOtherCheck</sender>
<signal>clicked()</signal>
<receiver>SelectProductDialog</receiver>
<slot>onPageSizeCheckClicked()</slot>
<hints>
<hint type="sourcelabel">
<x>75</x>
<y>207</y>
</hint>
<hint type="destinationlabel">
<x>8</x>
<y>168</y>
</hint>
</hints>
</connection>
<connection>
<sender>pageSizeUsCheck</sender>
<signal>clicked()</signal>
+14 -14
View File
@@ -587,72 +587,72 @@
<context>
<name>SelectProductDialog</name>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="14"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="20"/>
<source>gLabels - Select Product</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="34"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="43"/>
<source>Search all</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="62"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="71"/>
<source>Search</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="111"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="115"/>
<source>Filter by paper size</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="126"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="132"/>
<source>ISO sizes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="133"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="139"/>
<source>US sizes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="140"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="146"/>
<source>Other</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="150"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="158"/>
<source>Filter by category</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="159"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="167"/>
<source>All</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="166"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="174"/>
<source>Selected</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="213"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="230"/>
<source>Search entire product database.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="224"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="241"/>
<source>Recent</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="230"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="247"/>
<source>Select from recently used products.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="281"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="298"/>
<source>&amp;Cancel</source>
<translation type="unfinished"></translation>
</message>