View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0017982 | Scribus | User Interface | public | 2026-09-19 08:55 | 2026-09-19 08:55 |
| Reporter | buttar | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | new | Resolution | open | ||
| Platform | Linux | OS | Fedora Workstation | OS Version | 44 |
| Product Version | 1.7.4.svn | ||||
| Summary | 0017982: [patch] FormWidget captions do not follow inherited UI font size | ||||
| Description | (follows mui1.patch from 0017981) * Makes `FormWidget` captions follow the effective inherited Palette font. -- Removes the separate shadow font property/state and custom `setFont()` handling. -- Derives small captions from the inherited font at the existing 0000086:0000075% size relationship. -- Recalculates caption geometry on runtime `FontChange`. -- Preserves `useSmallFont=false` captions at the full inherited size. -- Keeps the macOS smallest-readable-font safeguard as a lower bound. -- Removes 72 obsolete hardcoded 8 pt `FormWidget` settings from 12 `.ui` files. -- Removes three obsolete 8 pt `PageLayouts` font assignments without changing its widgets or controls. -- Allows compact secondary captions to scale consistently with `Preferences → User Interface → Font Sizes → Palettes`. | ||||
| Tags | #please_test | ||||
| Attached Files | mui2-formwidget-font-scaling-v1.00.patch (35,073 bytes)
Index: scribus/ui/colorpicker/colorpicker_gradient.ui
===================================================================
--- scribus/ui/colorpicker/colorpicker_gradient.ui (revision 27827)
+++ scribus/ui/colorpicker/colorpicker_gradient.ui (working copy)
@@ -137,11 +137,6 @@
<property name="label" stdset="0">
<string>Color</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_18">
<property name="spacing">
<number>4</number>
@@ -179,11 +174,6 @@
<property name="label" stdset="0">
<string>Shade</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_19">
<property name="spacing">
<number>4</number>
@@ -217,11 +207,6 @@
<property name="label" stdset="0">
<string>Opacity</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_20">
<property name="spacing">
<number>4</number>
@@ -310,11 +295,6 @@
<property name="label" stdset="0">
<string>Color</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="spacing">
<number>4</number>
@@ -352,11 +332,6 @@
<property name="label" stdset="0">
<string>Shade</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<property name="spacing">
<number>4</number>
@@ -400,11 +375,6 @@
<property name="label" stdset="0">
<string>Opacity</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_14">
<property name="spacing">
<number>4</number>
@@ -455,11 +425,6 @@
<property name="label" stdset="0">
<string>Color</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>4</number>
@@ -497,11 +462,6 @@
<property name="label" stdset="0">
<string>Shade</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<property name="spacing">
<number>4</number>
@@ -545,11 +505,6 @@
<property name="label" stdset="0">
<string>Opacity</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_16">
<property name="spacing">
<number>4</number>
@@ -600,11 +555,6 @@
<property name="label" stdset="0">
<string>Color</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="spacing">
<number>4</number>
@@ -642,11 +592,6 @@
<property name="label" stdset="0">
<string>Shade</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>4</number>
@@ -690,11 +635,6 @@
<property name="label" stdset="0">
<string>Opacity</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_13">
<property name="spacing">
<number>4</number>
@@ -758,11 +698,6 @@
<property name="label" stdset="0">
<string>Color</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<property name="spacing">
<number>4</number>
@@ -800,11 +735,6 @@
<property name="label" stdset="0">
<string>Shade</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<property name="spacing">
<number>4</number>
@@ -848,11 +778,6 @@
<property name="label" stdset="0">
<string>Opacity</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_15">
<property name="spacing">
<number>4</number>
Index: scribus/ui/colorpicker/colorpicker_gradient_properties.ui
===================================================================
--- scribus/ui/colorpicker/colorpicker_gradient_properties.ui (revision 27827)
+++ scribus/ui/colorpicker/colorpicker_gradient_properties.ui (working copy)
@@ -54,11 +54,6 @@
<property name="label" stdset="0">
<string>End</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<property name="leftMargin">
<number>0</number>
@@ -96,11 +91,6 @@
<property name="label" stdset="0">
<string/>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<property name="preserveLabelSpace">
<bool>true</bool>
</property>
@@ -155,11 +145,6 @@
<property name="label" stdset="0">
<string>Skew</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<property name="leftMargin">
<number>0</number>
@@ -207,11 +192,6 @@
<property name="label" stdset="0">
<string>Start</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<property name="leftMargin">
<number>0</number>
@@ -288,11 +268,6 @@
<property name="label" stdset="0">
<string>Start</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_10">
<property name="leftMargin">
<number>0</number>
@@ -330,11 +305,6 @@
<property name="label" stdset="0">
<string/>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<property name="preserveLabelSpace">
<bool>true</bool>
</property>
@@ -372,11 +342,6 @@
<property name="label" stdset="0">
<string>Focal</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_12">
<property name="leftMargin">
<number>0</number>
@@ -414,11 +379,6 @@
<property name="label" stdset="0">
<string>End</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_11">
<property name="leftMargin">
<number>0</number>
@@ -456,11 +416,6 @@
<property name="label" stdset="0">
<string>Skew</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_13">
<property name="leftMargin">
<number>0</number>
@@ -521,11 +476,6 @@
<property name="label" stdset="0">
<string>Scale</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_14">
<property name="leftMargin">
<number>0</number>
Index: scribus/ui/colorpicker/colorpicker_hatch.ui
===================================================================
--- scribus/ui/colorpicker/colorpicker_hatch.ui (revision 27827)
+++ scribus/ui/colorpicker/colorpicker_hatch.ui (working copy)
@@ -45,11 +45,6 @@
<property name="label" stdset="0">
<string>Distance</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="leftMargin">
<number>0</number>
@@ -80,11 +75,6 @@
<property name="label" stdset="0">
<string>Angle</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="leftMargin">
<number>0</number>
@@ -122,11 +112,6 @@
<property name="label" stdset="0">
<string>Type</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin">
<number>0</number>
@@ -190,11 +175,6 @@
<property name="label" stdset="0">
<string>Line</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<property name="leftMargin">
<number>0</number>
@@ -229,11 +209,6 @@
<property name="label" stdset="0">
<string>Background</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<property name="leftMargin">
<number>0</number>
Index: scribus/ui/colorpicker/colorpicker_pattern.ui
===================================================================
--- scribus/ui/colorpicker/colorpicker_pattern.ui (revision 27827)
+++ scribus/ui/colorpicker/colorpicker_pattern.ui (working copy)
@@ -67,11 +67,6 @@
<property name="label" stdset="0">
<string>Rotation</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>0</number>
@@ -102,11 +97,6 @@
<property name="label" stdset="0">
<string>Spacing</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<property name="leftMargin">
<number>0</number>
@@ -137,11 +127,6 @@
<property name="label" stdset="0">
<string>Flip</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>4</number>
@@ -207,11 +192,6 @@
<property name="label" stdset="0">
<string>Offset</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="leftMargin">
<number>0</number>
@@ -265,11 +245,6 @@
<property name="label" stdset="0">
<string/>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<property name="preserveLabelSpace">
<bool>true</bool>
</property>
@@ -307,11 +282,6 @@
<property name="label" stdset="0">
<string>Skew</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<property name="leftMargin">
<number>0</number>
@@ -342,11 +312,6 @@
<property name="label" stdset="0">
<string>Scale</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<property name="leftMargin">
<number>0</number>
@@ -383,11 +348,6 @@
<property name="label" stdset="0">
<string/>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<property name="preserveLabelSpace">
<bool>true</bool>
</property>
Index: scribus/ui/gradienteditor.ui
===================================================================
--- scribus/ui/gradienteditor.ui (revision 27827)
+++ scribus/ui/gradienteditor.ui (working copy)
@@ -57,11 +57,6 @@
<property name="label" stdset="0">
<string>Opacity</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="leftMargin">
<number>0</number>
@@ -108,11 +103,6 @@
<property name="label" stdset="0">
<string>Position</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>0</number>
@@ -166,11 +156,6 @@
<property name="label" stdset="0">
<string>Color</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin">
<number>0</number>
@@ -205,11 +190,6 @@
<property name="label" stdset="0">
<string>Shade</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="leftMargin">
<number>0</number>
@@ -256,11 +236,6 @@
<property name="label" stdset="0">
<string>Extend</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<property name="leftMargin">
<number>0</number>
Index: scribus/ui/newmarginwidgetbase.ui
===================================================================
--- scribus/ui/newmarginwidgetbase.ui (revision 27827)
+++ scribus/ui/newmarginwidgetbase.ui (working copy)
@@ -83,11 +83,6 @@
<property name="label" stdset="0">
<string/>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<property name="preserveLabelSpace">
<bool>true</bool>
</property>
@@ -134,11 +129,6 @@
<property name="label" stdset="0">
<string>Left</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<property name="leftMargin">
<number>0</number>
@@ -176,11 +166,6 @@
<property name="label" stdset="0">
<string>Top</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="leftMargin">
<number>0</number>
@@ -245,11 +230,6 @@
<property name="label" stdset="0">
<string>Bottom</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<property name="leftMargin">
<number>0</number>
@@ -287,11 +267,6 @@
<property name="label" stdset="0">
<string>Right</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<property name="leftMargin">
<number>0</number>
Index: scribus/ui/propertiespalette_attributes.ui
===================================================================
--- scribus/ui/propertiespalette_attributes.ui (revision 27827)
+++ scribus/ui/propertiespalette_attributes.ui (working copy)
@@ -39,11 +39,6 @@
<property name="label" stdset="0">
<string>Name</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<property name="preserveLabelSpace">
<bool>false</bool>
</property>
@@ -78,11 +73,6 @@
<property name="label" stdset="0">
<string>Export</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<property name="space">
<number>2</number>
</property>
Index: scribus/ui/propertiespalette_fill.ui
===================================================================
--- scribus/ui/propertiespalette_fill.ui (revision 27827)
+++ scribus/ui/propertiespalette_fill.ui (working copy)
@@ -39,11 +39,6 @@
<property name="label" stdset="0">
<string>Color</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin">
<number>0</number>
@@ -77,11 +72,6 @@
<property name="label" stdset="0">
<string>Mask</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="spacing">
<number>4</number>
@@ -113,11 +103,6 @@
<property name="label" stdset="0">
<string>Blendmode</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<property name="leftMargin">
<number>0</number>
@@ -144,11 +129,6 @@
<property name="label" stdset="0">
<string>Fill Rule</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="spacing">
<number>4</number>
Index: scribus/ui/propertiespalette_linebase.ui
===================================================================
--- scribus/ui/propertiespalette_linebase.ui (revision 27827)
+++ scribus/ui/propertiespalette_linebase.ui (working copy)
@@ -126,11 +126,6 @@
<property name="label" stdset="0">
<string>Color</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_12">
<property name="leftMargin">
<number>0</number>
@@ -167,11 +162,6 @@
<property name="label" stdset="0">
<string>Mask</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_13">
<property name="leftMargin">
<number>0</number>
@@ -200,11 +190,6 @@
<property name="label" stdset="0">
<string>Blendmode</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<property name="leftMargin">
<number>0</number>
@@ -231,11 +216,6 @@
<property name="label" stdset="0">
<string>Marker</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>4</number>
@@ -319,11 +299,6 @@
<property name="label" stdset="0">
<string>Width</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="spacing">
<number>4</number>
@@ -364,11 +339,6 @@
<property name="label" stdset="0">
<string>Type</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<property name="spacing">
<number>4</number>
@@ -426,11 +396,6 @@
<property name="label" stdset="0">
<string>Caps</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>4</number>
@@ -488,11 +453,6 @@
<property name="label" stdset="0">
<string>Joins</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<property name="spacing">
<number>4</number>
Index: scribus/ui/propertiespalette_shadowbase.ui
===================================================================
--- scribus/ui/propertiespalette_shadowbase.ui (revision 27827)
+++ scribus/ui/propertiespalette_shadowbase.ui (working copy)
@@ -137,11 +137,6 @@
<property name="label" stdset="0">
<string>Color</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<property name="spacing">
<number>4</number>
@@ -173,11 +168,6 @@
<property name="label" stdset="0">
<string>Blendmode</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<property name="spacing">
<number>4</number>
@@ -302,11 +292,6 @@
<property name="label" stdset="0">
<string>Erase Fill</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_11">
<property name="leftMargin">
<number>0</number>
@@ -390,11 +375,6 @@
<property name="label" stdset="0">
<string/>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<property name="preserveLabelSpace">
<bool>true</bool>
</property>
Index: scribus/ui/propertiespalette_shapebase.ui
===================================================================
--- scribus/ui/propertiespalette_shapebase.ui (revision 27827)
+++ scribus/ui/propertiespalette_shapebase.ui (working copy)
@@ -115,11 +115,6 @@
<property name="label" stdset="0">
<string>Text Flow</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>4</number>
Index: scribus/ui/propertiespalette_xyzbase.ui
===================================================================
--- scribus/ui/propertiespalette_xyzbase.ui (revision 27827)
+++ scribus/ui/propertiespalette_xyzbase.ui (working copy)
@@ -119,11 +119,6 @@
<property name="label" stdset="0">
<string>Flip</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_11">
<property name="spacing">
<number>4</number>
@@ -162,11 +157,6 @@
<property name="label" stdset="0">
<string>Lock</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_12">
<property name="spacing">
<number>4</number>
@@ -208,11 +198,6 @@
<property name="label" stdset="0">
<string>Group</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_17">
<property name="spacing">
<number>4</number>
@@ -414,11 +399,6 @@
<property name="label" stdset="0">
<string>&Rotation</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<property name="spacing">
<number>4</number>
@@ -489,11 +469,6 @@
<property name="label" stdset="0">
<string>Level</string>
</property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
<property name="labelVisibility">
<bool>true</bool>
</property>
Index: scribus/ui/widgets/form_widget.cpp
===================================================================
--- scribus/ui/widgets/form_widget.cpp (revision 27827)
+++ scribus/ui/widgets/form_widget.cpp (working copy)
@@ -4,7 +4,7 @@
#include <QEvent>
#include <QShortcutEvent>
#include <QFontDatabase>
-#include <QApplication>
+#include <QFontInfo>
#include "form_widget.h"
@@ -12,8 +12,6 @@
FormWidget::FormWidget(QWidget *parent)
: QWidget(parent)
{
- m_font = this->font();
-
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
calculateFrame();
@@ -96,7 +94,7 @@
opt.initFrom(this);
int align = QStyle::visualAlignment(this->layoutDirection(), Qt::AlignCenter);
- QFont tmpFont(m_font);
+ QFont tmpFont(font());
if (m_useSmallFont)
tmpFont.setPointSize(smallFontSize());
@@ -181,6 +179,17 @@
}
+void FormWidget::changeEvent(QEvent *e)
+{
+ QWidget::changeEvent(e);
+
+ if (e->type() == QEvent::FontChange)
+ {
+ calculateFrame();
+ updateGeometry();
+ }
+}
+
bool FormWidget::event(QEvent *e)
{
@@ -303,7 +312,7 @@
if (canUseLabel())
{
- QFont tmpFont(m_font);
+ QFont tmpFont(font());
if (m_useSmallFont)
tmpFont.setPointSize(smallFontSize());
@@ -360,15 +369,21 @@
int FormWidget::smallFontSize() const
{
- // uncommend to compare the different font size calculations
- // qDebug() << Q_FUNC_INFO << QFont().pointSize() << qRound(QFont().pointSize() * .75) << QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont).pointSize();
+ qreal pointSize = font().pointSizeF();
+ if (pointSize <= 0)
+ pointSize = QFontInfo(font()).pointSizeF();
+
+ int size = qMax(1, qRound(pointSize * 0.75));
#ifdef Q_OS_MACOS
- return QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont).pointSize();
-#else
- return qRound(QFont().pointSize() * .75);
+ const QFont readableFont = QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont);
+ qreal readablePointSize = readableFont.pointSizeF();
+ if (readablePointSize <= 0)
+ readablePointSize = QFontInfo(readableFont).pointSizeF();
+ size = qMax(size, qRound(readablePointSize));
#endif
+ return size;
}
@@ -410,12 +425,6 @@
calculateFrame();
}
-void FormWidget::setFont(QFont font)
-{
- m_font = font;
- calculateFrame();
-}
-
void FormWidget::setUseSmallFont(bool smallFont)
{
m_useSmallFont = smallFont;
Index: scribus/ui/widgets/form_widget.h
===================================================================
--- scribus/ui/widgets/form_widget.h (revision 27827)
+++ scribus/ui/widgets/form_widget.h (working copy)
@@ -2,7 +2,6 @@
#define FORMWIDGET_H
#include <QWidget>
-#include <QFont>
//#include "scribusapi.h"
@@ -22,7 +21,6 @@
Q_PROPERTY(QSize pixmapSize READ pixmapSize WRITE setPixmapSize)
Q_PROPERTY(LabelPosition direction READ direction WRITE setDirection)
Q_PROPERTY(LabelPosition iconDirection READ iconDirection WRITE setIconDirection)
- Q_PROPERTY(QFont font READ font WRITE setFont STORED true)
Q_PROPERTY(bool useSmallFont READ useSmallFont WRITE setUseSmallFont)
Q_PROPERTY(int space READ space WRITE setSpace)
Q_PROPERTY(bool preserveLabelSpace READ preserveLabelSpace WRITE setPreserveLabelSpace)
@@ -57,9 +55,6 @@
void setIconDirection(FormWidget::LabelPosition direction);
FormWidget::LabelPosition iconDirection() { return m_iconPosition; };
- void setFont(QFont font);
- QFont font() { return m_font; };
-
void setUseSmallFont(bool smallFont);
bool useSmallFont() { return m_useSmallFont; };
@@ -81,6 +76,7 @@
protected:
void paintEvent(QPaintEvent *e) override;
+ void changeEvent(QEvent *e) override;
bool event(QEvent *e) override;
private:
@@ -90,7 +86,6 @@
int m_labelOffset {0};
QSize m_pixmapSize {QSize(16,16)};
QString m_label {"Label"};
- QFont m_font;
QPixmap m_pixmap {QPixmap()};
bool m_iconVisibility {true};
bool m_preserveLabelSpace {false};
Index: scribus/ui/widgets/pagelayout.cpp
===================================================================
--- scribus/ui/widgets/pagelayout.cpp (revision 27827)
+++ scribus/ui/widgets/pagelayout.cpp (working copy)
@@ -35,14 +35,10 @@
layoutGroupLayout->setSpacing(4);
layoutGroupLayout->setContentsMargins(0, 0, 0, 0);
- QFont layFont(this->font());
- layFont.setPointSize(8);
-
buttonScheme = new DropdownButton(this);
buttonScheme->setPopupMode(QToolButton::InstantPopup);
labelScheme = new FormWidget();
- labelScheme->setFont(layFont);
labelScheme->addWidget(buttonScheme);
labelScheme->setLabelVisibility(!m_hideLabels);
layoutGroupLayout->addWidget( labelScheme );
@@ -51,7 +47,6 @@
buttonFirstPage->setPopupMode(QToolButton::InstantPopup);
labelPages = new FormWidget();
- labelPages->setFont(layFont);
labelPages->addWidget( buttonFirstPage );
labelPages->setLabelVisibility(!m_hideLabels);
layoutGroupLayout->addWidget( labelPages );
@@ -67,7 +62,6 @@
buttonBindingDirection->setIcon(pageBindingIcon);
labelBinding = new FormWidget();
- labelBinding->setFont(layFont);
labelBinding->addWidget( buttonBindingDirection );
labelBinding->setLabelVisibility(!m_hideLabels);
layoutGroupLayout->addWidget( labelBinding );
| ||||
| Patch | Yes | ||||