summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2018-09-25 14:56:50 +0300
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2018-09-25 12:22:27 +0000
commitbc944ad74073362672dba0335785b4557ce65626 (patch)
tree6aec16cebd60a4daa83397cc52810972238669d6
parent0e7e7996a422b47bd371115e6aa4e2998bbda6fb (diff)
Fix welcome screen glitches
The dummy label is needed to fix background quadrupling issue when dragging the welcome screen to another screen with different device pixel ratio. It is unclear why exactly it fixes it, and why it needs to be a label with some visible text to do so, instead of some other widget. It is somehow related to the layout handling on the dialog. Task-number: QT3DS-2392 Change-Id: I945d29e6d735d400c80668cab458bf46e9b57f0c Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r--src/Authoring/Studio/Application/StudioTutorialWidget.ui70
-rw-r--r--src/Authoring/Studio/style.qss6
2 files changed, 41 insertions, 35 deletions
diff --git a/src/Authoring/Studio/Application/StudioTutorialWidget.ui b/src/Authoring/Studio/Application/StudioTutorialWidget.ui
index 2bef1ed8..df82fa79 100644
--- a/src/Authoring/Studio/Application/StudioTutorialWidget.ui
+++ b/src/Authoring/Studio/Application/StudioTutorialWidget.ui
@@ -65,7 +65,7 @@
<item>
<widget class="QCheckBox" name="studioTutorialShowAgain">
<property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -74,12 +74,12 @@
<string>studioTutorialShowAgain</string>
</property>
<property name="text">
- <string/>
+ <string>Do Not Show This Again</string>
</property>
</widget>
</item>
<item>
- <widget class="QLabel" name="checkBoxLabel">
+ <widget class="QLabel" name="dummyLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -87,7 +87,7 @@
</sizepolicy>
</property>
<property name="text">
- <string>Do Not Show This Again</string>
+ <string>.</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
@@ -127,7 +127,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
- <height>150</height>
+ <height>125</height>
</size>
</property>
</spacer>
@@ -142,12 +142,41 @@
</property>
<property name="sizeHint" stdset="0">
<size>
- <width>685</width>
+ <width>620</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="2" column="2">
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>45</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
+ <item row="3" column="0">
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>200</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
<item row="2" column="1">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
@@ -351,35 +380,6 @@
</item>
</layout>
</item>
- <item row="2" column="2">
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>80</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="3" column="0">
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>200</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</widget>
</item>
diff --git a/src/Authoring/Studio/style.qss b/src/Authoring/Studio/style.qss
index 37458cd2..cfdb4cf8 100644
--- a/src/Authoring/Studio/style.qss
+++ b/src/Authoring/Studio/style.qss
@@ -271,6 +271,12 @@ QDialog#StudioTutorialWidget QWidget {
border: 0px;
}
+/* This dummy label is a hack to fix the background quadrupling issue */
+QLabel#dummyLabel {
+ font-size: 1px;
+ color: "#273049"; /* color to match background in case text size already doesn't hide it */
+}
+
QLabel#studioTutorialName {
font-size: 42px;
font-family: "Titillium Web";