Skip to content

Commit

Permalink
[ui] Fix hidpi/resizing issue with auxiliary-related dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Jul 29, 2019
1 parent 9521742 commit 606c88d
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 105 deletions.
2 changes: 2 additions & 0 deletions src/gui/qgsnewauxiliaryfielddialog.cpp
Expand Up @@ -17,6 +17,7 @@

#include "qgsnewauxiliaryfielddialog.h"
#include "qgsauxiliarystorage.h"
#include "qgsgui.h"

#include <QMessageBox>

Expand All @@ -27,6 +28,7 @@ QgsNewAuxiliaryFieldDialog::QgsNewAuxiliaryFieldDialog( const QgsPropertyDefinit
, mPropertyDefinition( def )
{
setupUi( this );
QgsGui::instance()->enableAutoGeometryRestore( this );

mType->addItem( tr( "String" ) );
mType->addItem( tr( "Real" ) );
Expand Down
4 changes: 3 additions & 1 deletion src/gui/qgsnewauxiliarylayerdialog.cpp
Expand Up @@ -16,8 +16,9 @@
***************************************************************************/

#include "qgsnewauxiliarylayerdialog.h"
#include "qgsproject.h"
#include "qgsauxiliarystorage.h"
#include "qgsproject.h"
#include "qgsgui.h"

#include <QMessageBox>
#include <QPushButton>
Expand All @@ -27,6 +28,7 @@ QgsNewAuxiliaryLayerDialog::QgsNewAuxiliaryLayerDialog( QgsVectorLayer *layer, Q
, mLayer( layer )
{
setupUi( this );
QgsGui::instance()->enableAutoGeometryRestore( this );

const QgsFields fields = mLayer->fields();
for ( const QgsField &field : fields )
Expand Down
119 changes: 58 additions & 61 deletions src/ui/qgsnewauxiliaryfielddialogbase.ui
Expand Up @@ -6,72 +6,69 @@
<rect>
<x>0</x>
<y>0</y>
<width>397</width>
<height>159</height>
<width>440</width>
<height>190</height>
</rect>
</property>
<property name="windowTitle">
<string>Auxiliary Storage : New Auxiliary Field</string>
</property>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="geometry">
<rect>
<x>50</x>
<y>120</y>
<width>341</width>
<height>32</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
<widget class="QWidget" name="verticalLayoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>381</width>
<height>101</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>New auxiliary field parameters</string>
</property>
</widget>
</item>
<item>
<layout class="QFormLayout" name="formLayout">
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Type</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="mType"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Name</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="mName"/>
</item>
</layout>
</item>
</layout>
</widget>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>New auxiliary field parameters</string>
</property>
</widget>
</item>
<item>
<layout class="QFormLayout" name="formLayout">
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Type</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="mType"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Name</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="mName"/>
</item>
</layout>
</item>
<item>
<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>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
Expand Down
83 changes: 40 additions & 43 deletions src/ui/qgsnewauxiliarylayerdialogbase.ui
Expand Up @@ -6,54 +6,51 @@
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>139</height>
<width>440</width>
<height>180</height>
</rect>
</property>
<property name="windowTitle">
<string>Auxiliary Storage : Choose Primary Key</string>
</property>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="geometry">
<rect>
<x>50</x>
<y>100</y>
<width>341</width>
<height>32</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
<widget class="QWidget" name="verticalLayoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>381</width>
<height>81</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Select the primary key to use for joining with internal data storage</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox"/>
</item>
</layout>
</widget>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Select the primary key to use for joining with internal data storage</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox"/>
</item>
<item>
<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>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
Expand Down

0 comments on commit 606c88d

Please sign in to comment.