Skip to content

Commit

Permalink
Size adjustments to improve Mac appearance.
Browse files Browse the repository at this point in the history
As much as possible, sizes for controls should be avoided so that each platform can choose its own preferred size. Mac fonts and controls tend to be a few pixels larger than X11. Using absolute numbers to tighten a layout on X11 often results in truncated or compressed items on a Mac. A QPushButton will not render correctly on a Mac for widths less than 60.


git-svn-id: http://svn.osgeo.org/qgis/trunk@6138 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
telwertowski committed Nov 27, 2006
1 parent 042fb3b commit 6a4a430
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 39 deletions.
4 changes: 4 additions & 0 deletions src/gui/qgsmeasure.cpp
Expand Up @@ -31,6 +31,10 @@ QgsMeasure::QgsMeasure(bool measureArea, QgsMapCanvas *mc, Qt::WFlags f)
: QDialog(mc->topLevelWidget(), f), QgsMapTool(mc)
{
setupUi(this);
#ifdef Q_WS_MAC
// Mac buttons are larger than X11 and require a larger minimum width to be drawn correctly
frame4->setMinimumSize(QSize(224, 0));
#endif
connect(mRestartButton, SIGNAL(clicked()), this, SLOT(restart()));
connect(mCloseButton, SIGNAL(clicked()), this, SLOT(close()));

Expand Down
5 changes: 0 additions & 5 deletions src/ui/qgsmeasurebase.ui
Expand Up @@ -35,13 +35,8 @@
<widget class="QLineEdit" name="editTotal" >
<property name="font" >
<font>
<family>Sans Serif</family>
<pointsize>9</pointsize>
<weight>75</weight>
<italic>false</italic>
<bold>true</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="alignment" >
Expand Down
4 changes: 2 additions & 2 deletions src/ui/qgsoptionsbase.ui
Expand Up @@ -611,8 +611,8 @@ identifying features without zooming in very close.
<widget class="QPushButton" name="btnFindBrowser" >
<property name="maximumSize" >
<size>
<width>21</width>
<height>21</height>
<width>60</width>
<height>32767</height>
</size>
</property>
<property name="text" >
Expand Down
2 changes: 1 addition & 1 deletion src/ui/qgspluginmanagerbase.ui
Expand Up @@ -47,7 +47,7 @@
<widget class="QPushButton" name="btnBrowse" >
<property name="maximumSize" >
<size>
<width>30</width>
<width>60</width>
<height>32767</height>
</size>
</property>
Expand Down
30 changes: 0 additions & 30 deletions src/ui/qgsrasterlayerpropertiesbase.ui
Expand Up @@ -120,12 +120,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="maximum" >
<number>255</number>
</property>
Expand Down Expand Up @@ -608,12 +602,6 @@
</property>
<item row="0" column="3" >
<widget class="QSpinBox" name="spinMaximumScale" >
<property name="minimumSize" >
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="toolTip" >
<string>Maximum scale at which this layer will be displayed. </string>
</property>
Expand All @@ -637,12 +625,6 @@
</item>
<item row="0" column="1" >
<widget class="QSpinBox" name="spinMinimumScale" >
<property name="minimumSize" >
<size>
<width>0</width>
<height>12</height>
</size>
</property>
<property name="toolTip" >
<string>Minimum scale at which this layer will be displayed. </string>
</property>
Expand Down Expand Up @@ -681,25 +663,13 @@
</property>
<item row="0" column="1" >
<widget class="QPushButton" name="pbnChangeSpatialRefSys" >
<property name="minimumSize" >
<size>
<width>0</width>
<height>12</height>
</size>
</property>
<property name="text" >
<string>Change</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLineEdit" name="leSpatialRefSys" >
<property name="minimumSize" >
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
Expand Down
2 changes: 1 addition & 1 deletion src/ui/qgsserversourceselectbase.ui
Expand Up @@ -269,7 +269,7 @@
<property name="minimumSize" >
<size>
<width>16</width>
<height>60</height>
<height>64</height>
</size>
</property>
<property name="title" >
Expand Down

0 comments on commit 6a4a430

Please sign in to comment.