Skip to content

Commit 3ee93d0

Browse files
author
telwertowski
committedNov 27, 2006
Size adjustments to improve Mac appearance.
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/qgis@6138 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

6 files changed

+8
-39
lines changed

6 files changed

+8
-39
lines changed
 

‎src/gui/qgsmeasure.cpp‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ QgsMeasure::QgsMeasure(bool measureArea, QgsMapCanvas *mc, Qt::WFlags f)
3131
: QDialog(mc->topLevelWidget(), f), QgsMapTool(mc)
3232
{
3333
setupUi(this);
34+
#ifdef Q_WS_MAC
35+
// Mac buttons are larger than X11 and require a larger minimum width to be drawn correctly
36+
frame4->setMinimumSize(QSize(224, 0));
37+
#endif
3438
connect(mRestartButton, SIGNAL(clicked()), this, SLOT(restart()));
3539
connect(mCloseButton, SIGNAL(clicked()), this, SLOT(close()));
3640

‎src/ui/qgsmeasurebase.ui‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,8 @@
3535
<widget class="QLineEdit" name="editTotal" >
3636
<property name="font" >
3737
<font>
38-
<family>Sans Serif</family>
39-
<pointsize>9</pointsize>
4038
<weight>75</weight>
41-
<italic>false</italic>
4239
<bold>true</bold>
43-
<underline>false</underline>
44-
<strikeout>false</strikeout>
4540
</font>
4641
</property>
4742
<property name="alignment" >

‎src/ui/qgsoptionsbase.ui‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,8 +611,8 @@ identifying features without zooming in very close.
611611
<widget class="QPushButton" name="btnFindBrowser" >
612612
<property name="maximumSize" >
613613
<size>
614-
<width>21</width>
615-
<height>21</height>
614+
<width>60</width>
615+
<height>32767</height>
616616
</size>
617617
</property>
618618
<property name="text" >

‎src/ui/qgspluginmanagerbase.ui‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<widget class="QPushButton" name="btnBrowse" >
4848
<property name="maximumSize" >
4949
<size>
50-
<width>30</width>
50+
<width>60</width>
5151
<height>32767</height>
5252
</size>
5353
</property>

‎src/ui/qgsrasterlayerpropertiesbase.ui‎

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,6 @@
120120
<verstretch>0</verstretch>
121121
</sizepolicy>
122122
</property>
123-
<property name="minimumSize" >
124-
<size>
125-
<width>0</width>
126-
<height>20</height>
127-
</size>
128-
</property>
129123
<property name="maximum" >
130124
<number>255</number>
131125
</property>
@@ -608,12 +602,6 @@
608602
</property>
609603
<item row="0" column="3" >
610604
<widget class="QSpinBox" name="spinMaximumScale" >
611-
<property name="minimumSize" >
612-
<size>
613-
<width>0</width>
614-
<height>20</height>
615-
</size>
616-
</property>
617605
<property name="toolTip" >
618606
<string>Maximum scale at which this layer will be displayed. </string>
619607
</property>
@@ -637,12 +625,6 @@
637625
</item>
638626
<item row="0" column="1" >
639627
<widget class="QSpinBox" name="spinMinimumScale" >
640-
<property name="minimumSize" >
641-
<size>
642-
<width>0</width>
643-
<height>12</height>
644-
</size>
645-
</property>
646628
<property name="toolTip" >
647629
<string>Minimum scale at which this layer will be displayed. </string>
648630
</property>
@@ -681,25 +663,13 @@
681663
</property>
682664
<item row="0" column="1" >
683665
<widget class="QPushButton" name="pbnChangeSpatialRefSys" >
684-
<property name="minimumSize" >
685-
<size>
686-
<width>0</width>
687-
<height>12</height>
688-
</size>
689-
</property>
690666
<property name="text" >
691667
<string>Change</string>
692668
</property>
693669
</widget>
694670
</item>
695671
<item row="0" column="0" >
696672
<widget class="QLineEdit" name="leSpatialRefSys" >
697-
<property name="minimumSize" >
698-
<size>
699-
<width>0</width>
700-
<height>20</height>
701-
</size>
702-
</property>
703673
<property name="readOnly" >
704674
<bool>true</bool>
705675
</property>

‎src/ui/qgsserversourceselectbase.ui‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@
269269
<property name="minimumSize" >
270270
<size>
271271
<width>16</width>
272-
<height>60</height>
272+
<height>64</height>
273273
</size>
274274
</property>
275275
<property name="title" >

0 commit comments

Comments
 (0)
Please sign in to comment.