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,25 +47,33 @@ 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">
<item>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>&amp;Application's name:</string>
<string>&amp;Name:</string>
</property>
<property name="buddy">
<cstring>mName</cstring>
@ -77,7 +103,7 @@ parameters: -l(line) (file)</string>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLineEdit" name="mName"/>
</item>
@ -92,7 +118,7 @@ parameters: -l(line) (file)</string>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
@ -115,6 +141,8 @@ parameters: -l(line) (file)</string>
</item>
</layout>
</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();
}