Permalink
Browse files

GUI: Improve the Application dialog layoyt.

In GNOME the whole big text area was not shown without making the
dialog bigger. So improve the layout for better scaling and adjust
dialog size when it gets initialized.
  • Loading branch information...
1 parent cfd570e commit 820e1697cc2c915f0bdb7255c7a5b877b96bf233 @kimmov kimmov committed Apr 4, 2011
Showing with 91 additions and 62 deletions.
  1. +90 −62 gui/application.ui
  2. +1 −0 gui/applicationdialog.cpp
View
@@ -10,15 +10,33 @@
<x>0</x>
<y>0</y>
<width>569</width>
- <height>328</height>
+ <height>471</height>
</rect>
</property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="windowTitle">
<string>Add an application</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout">
+ <layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QLabel" name="label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
<property name="text">
<string>Here you can add an application that can open error files. Specify a name for the application, the application executable and command line parameters for the application.
@@ -29,92 +47,102 @@ The following texts in parameters are replaced with appropriate values when appl
(severity) - Error severity
Example opening a file with Kate and make Kate scroll to the correct line:
-executable: kate
-parameters: -l(line) (file)</string>
+Executable: kate
+Parameters: -l(line) (file)</string>
</property>
<property name="textFormat">
<enum>Qt::AutoText</enum>
</property>
+ <property name="scaledContents">
+ <bool>false</bool>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <layout class="QVBoxLayout" name="verticalLayout_3">
<item>
- <layout class="QVBoxLayout" name="verticalLayout_3">
+ <layout class="QHBoxLayout" name="horizontalLayout">
<item>
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>&amp;Application's name:</string>
- </property>
- <property name="buddy">
- <cstring>mName</cstring>
- </property>
- </widget>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>&amp;Name:</string>
+ </property>
+ <property name="buddy">
+ <cstring>mName</cstring>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>&amp;Executable:</string>
+ </property>
+ <property name="buddy">
+ <cstring>mPath</cstring>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>&amp;Parameters:</string>
+ </property>
+ <property name="buddy">
+ <cstring>mParameters</cstring>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
<item>
- <widget class="QLabel" name="label_3">
- <property name="text">
- <string>&amp;Executable:</string>
- </property>
- <property name="buddy">
- <cstring>mPath</cstring>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label_4">
- <property name="text">
- <string>&amp;Parameters:</string>
- </property>
- <property name="buddy">
- <cstring>mParameters</cstring>
- </property>
- </widget>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QLineEdit" name="mName"/>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="mPath"/>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="mParameters"/>
+ </item>
+ </layout>
</item>
</layout>
</item>
<item>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QLineEdit" name="mName"/>
- </item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
- <widget class="QLineEdit" name="mPath"/>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
</item>
<item>
- <widget class="QLineEdit" name="mParameters"/>
+ <widget class="QPushButton" name="mButtonBrowse">
+ <property name="text">
+ <string>Browse</string>
+ </property>
+ </widget>
</item>
</layout>
</item>
</layout>
</item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="mButtonBrowse">
- <property name="text">
- <string>Browse</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
<item>
<widget class="QDialogButtonBox" name="mButtons">
<property name="orientation">
@@ -40,6 +40,7 @@ ApplicationDialog::ApplicationDialog(const QString &title,
mUI.mName->setText(app.getName());
mUI.mParameters->setText(app.getParameters());
setWindowTitle(title);
+ adjustSize();
}

0 comments on commit 820e169

Please sign in to comment.