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.
This commit is contained in:
Kimmo Varis 2011-04-04 11:00:09 +03:00
parent cfd570e1f3
commit 820e1697cc
2 changed files with 91 additions and 62 deletions

View File

@ -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">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLineEdit" name="mName"/>
<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="mPath"/>
</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">

View File

@ -40,6 +40,7 @@ ApplicationDialog::ApplicationDialog(const QString &title,
mUI.mName->setText(app.getName());
mUI.mParameters->setText(app.getParameters());
setWindowTitle(title);
adjustSize();
}