summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-08-04 13:27:29 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-04 09:50:55 -0700
commit0416a09a1e3d2a2fe3f97dbe098520bb24cc2a8d (patch)
treebe53918c53323948aa1647f72599a37a2437cc3e /qt-ui
parent116608201dae69e68f4366746e1a2de2adcfe1b2 (diff)
downloadsubsurface-0416a09a1e3d2a2fe3f97dbe098520bb24cc2a8d.tar.gz
Fix the layout on the Print Dialog
The layout was a hardcoded position without layouts, that would only work on english language since other languages can have bigger strings than the current ones. Also removed the 'setFixedSize' stuff and let the widget find it's best size for itself. Fixes #656 Fixes #396 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/printdialog.cpp1
-rw-r--r--qt-ui/printoptions.ui375
2 files changed, 166 insertions, 210 deletions
diff --git a/qt-ui/printdialog.cpp b/qt-ui/printdialog.cpp
index 472b7d942..e8a323e03 100644
--- a/qt-ui/printdialog.cpp
+++ b/qt-ui/printdialog.cpp
@@ -57,7 +57,6 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f
hLayout->addWidget(buttonBox);
- setFixedSize(550, 400);
setWindowTitle(tr("Print"));
setWindowIcon(QIcon(":subsurface-icon"));
diff --git a/qt-ui/printoptions.ui b/qt-ui/printoptions.ui
index e7bdbf683..59a48b956 100644
--- a/qt-ui/printoptions.ui
+++ b/qt-ui/printoptions.ui
@@ -6,224 +6,181 @@
<rect>
<x>0</x>
<y>0</y>
- <width>511</width>
- <height>308</height>
+ <width>367</width>
+ <height>433</height>
</rect>
</property>
- <widget class="QGroupBox" name="printOptions">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>70</y>
- <width>489</width>
- <height>81</height>
- </rect>
- </property>
- <property name="title">
- <string>Print options</string>
- </property>
- <widget class="QCheckBox" name="printSelected">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>30</y>
- <width>461</width>
- <height>18</height>
- </rect>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Print only selected dives</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="printInColor">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>50</y>
- <width>461</width>
- <height>18</height>
- </rect>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Print in color</string>
- </property>
- </widget>
- </widget>
- <widget class="QGroupBox" name="printType">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>10</y>
- <width>489</width>
- <height>51</height>
- </rect>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="baseSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="title">
- <string>Print type</string>
- </property>
- <widget class="QWidget" name="horizontalLayoutWidget_2">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>20</y>
- <width>491</width>
- <height>31</height>
- </rect>
- </property>
- <layout class="QHBoxLayout" name="layoutPrintType">
- <property name="sizeConstraint">
- <enum>QLayout::SetDefaultConstraint</enum>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <item>
+ <widget class="QGroupBox" name="printType">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- <property name="leftMargin">
- <number>15</number>
+ <property name="baseSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
</property>
- <property name="rightMargin">
- <number>15</number>
+ <property name="title">
+ <string>Print type</string>
</property>
- <item>
- <widget class="QRadioButton" name="radioSixDives">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>6 dives per page</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="radioTwoDives">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>2 dives per page</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="radioOneDive">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>1 dive per page</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="radioTablePrint">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Table print</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- <widget class="QGroupBox" name="ordering">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>160</y>
- <width>489</width>
- <height>81</height>
- </rect>
- </property>
- <property name="title">
- <string>Ordering</string>
- </property>
- <widget class="QRadioButton" name="profileOnTop">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>30</y>
- <width>461</width>
- <height>18</height>
- </rect>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Profile on top</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- <widget class="QRadioButton" name="notesOnTop">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>50</y>
- <width>461</width>
- <height>18</height>
- </rect>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Notes on top</string>
- </property>
- <property name="checked">
- <bool>false</bool>
- </property>
- </widget>
- </widget>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0" colspan="2">
+ <widget class="QRadioButton" name="radioSixDives">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;6 dives per page</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QRadioButton" name="radioOneDive">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;1 dive per page</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" colspan="2">
+ <widget class="QRadioButton" name="radioTwoDives">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;2 dives per page</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QRadioButton" name="radioTablePrint">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Table print</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2" rowspan="2">
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="printOptions">
+ <property name="title">
+ <string>Print options</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QCheckBox" name="printSelected">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Print only selected dives</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="printInColor">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Print in color</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="ordering">
+ <property name="title">
+ <string>Ordering</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QRadioButton" name="profileOnTop">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Prof&amp;ile on top</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="notesOnTop">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Notes on top</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
</widget>
<tabstops>
<tabstop>radioSixDives</tabstop>
<tabstop>radioTwoDives</tabstop>
- <tabstop>radioTablePrint</tabstop>
<tabstop>printSelected</tabstop>
<tabstop>printInColor</tabstop>
<tabstop>profileOnTop</tabstop>