Merge lp:~apachelogger/ubiquity/fix-squished-text into lp:ubiquity

Proposed by Harald Sitter
Status: Merged
Merged at revision: 6335
Proposed branch: lp:~apachelogger/ubiquity/fix-squished-text
Merge into: lp:ubiquity
Diff against target: 117 lines (+53/-17)
3 files modified
debian/changelog (+31/-0)
gui/qt/app.ui (+3/-16)
ubiquity/frontend/kde_ui.py (+19/-1)
To merge this branch: bzr merge lp:~apachelogger/ubiquity/fix-squished-text
Reviewer Review Type Date Requested Status
Jonathan Riddell Pending
Review via email: mp+272738@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2015-09-23 16:24:49 +0000
3+++ debian/changelog 2015-09-29 13:01:12 +0000
4@@ -1,3 +1,34 @@
5+ubiquity (2.21.32) wily; urgency=medium
6+
7+ * Resolve a spacing issue in the KDE ui.
8+ - Move vertial spacer for branding logo from designer file to code
9+ - Adjust spacing policies of the lefthand pane to do what we need:
10+ + the header layout doesn't expand anymore
11+ + the steps layout expands horizontally and verticall and additionally
12+ enforces its sizeHint as minimum.
13+ + the unused footer layout no longer expands horizontally but sticks to
14+ its minimum
15+ - Push branding logo to smaller size
16+ + The logo is now packed into a layout where it is spaced from left and
17+ right to cause an undefined shrinking as per Qt's choice. This
18+ effectively reduces the sizes of the logo both in width and height (as
19+ height is bound to width). This in turn brings the overall size down
20+ enough to not cause size expansion beyond "resonable" measures.
21+ (Reasonable being just big enough to be good looking but small enough
22+ to not push down on the labels in the steps widget. Latter has an
23+ unknown cause, but when the logo is too big it starts pushing on the
24+ labels, disregarding the entire sizepolicy of all involved widgets.
25+ If the logo is small enough this doesn't happen which either may be
26+ because there is a hardcoded height somewhere or the joint minimal
27+ size of all steps' pages is heigh enough to allow for this to happen.
28+ This overall layout problem has been there for years and only became
29+ visible now because we have a somewhat heigh widget below the steps
30+ layout. Ultimately this issue is going to get resolved if/when
31+ ubiquity gets ported to QML which is substantially more suited to
32+ building UIs like this with right scaling.)
33+
34+ -- Harald Sitter <sitter@kde.org> Tue, 29 Sep 2015 14:37:29 +0200
35+
36 ubiquity (2.21.31) wily; urgency=medium
37
38 [ Iain Lane ]
39
40=== modified file 'gui/qt/app.ui'
41--- gui/qt/app.ui 2015-09-08 16:15:47 +0000
42+++ gui/qt/app.ui 2015-09-29 13:01:12 +0000
43@@ -119,7 +119,7 @@
44 <item row="0" column="0" rowspan="2">
45 <widget class="QWidget" name="sidebar_widget" native="true">
46 <property name="sizePolicy">
47- <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
48+ <sizepolicy hsizetype="Fixed" vsizetype="MinimumExpanding">
49 <horstretch>0</horstretch>
50 <verstretch>0</verstretch>
51 </sizepolicy>
52@@ -191,7 +191,7 @@
53 <item>
54 <widget class="QWidget" name="steps_widget" native="true">
55 <property name="sizePolicy">
56- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
57+ <sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
58 <horstretch>0</horstretch>
59 <verstretch>0</verstretch>
60 </sizepolicy>
61@@ -207,22 +207,9 @@
62 </widget>
63 </item>
64 <item>
65- <spacer name="verticalSpacer">
66- <property name="orientation">
67- <enum>Qt::Vertical</enum>
68- </property>
69- <property name="sizeHint" stdset="0">
70- <size>
71- <width>40</width>
72- <height>20</height>
73- </size>
74- </property>
75- </spacer>
76- </item>
77- <item>
78 <widget class="QFrame" name="sidebar_footer_frame">
79 <property name="sizePolicy">
80- <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
81+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
82 <horstretch>0</horstretch>
83 <verstretch>0</verstretch>
84 </sizepolicy>
85
86=== modified file 'ubiquity/frontend/kde_ui.py'
87--- ubiquity/frontend/kde_ui.py 2015-09-09 08:59:38 +0000
88+++ ubiquity/frontend/kde_ui.py 2015-09-29 13:01:12 +0000
89@@ -182,9 +182,27 @@
90
91 self.ui = UbiquityUI()
92
93+ # Branding logo is spaced from left and right to cause it to shrink
94+ # an undefined amount. This reduces the risk of having the branding
95+ # shrink the steps_widget and thus cause text to be cut off or.
96+ # Above the branding there is also a spacer pushing down on the logo
97+ # and up on the steps to make sure spacing between steps is not
98+ # awkwardly huge.
99 self.icon_widget = SquareSvgWidget(self.ui)
100 self.icon_widget.load("/usr/share/ubiquity/qt/images/branding.svgz")
101- self.ui.sidebar_widget.layout().addWidget(self.icon_widget)
102+ branding_layout = QtGui.QHBoxLayout()
103+ branding_layout.addItem(QtGui.QSpacerItem(1, 1,
104+ QtGui.QSizePolicy.Expanding,
105+ QtGui.QSizePolicy.Minimum))
106+ branding_layout.addWidget(self.icon_widget)
107+ branding_layout.addItem(QtGui.QSpacerItem(1, 1,
108+ QtGui.QSizePolicy.Expanding,
109+ QtGui.QSizePolicy.Minimum))
110+ branding_spacer = QtGui.QSpacerItem(1, 1,
111+ QtGui.QSizePolicy.Minimum,
112+ QtGui.QSizePolicy.Expanding)
113+ self.ui.sidebar_widget.layout().addItem(branding_spacer)
114+ self.ui.sidebar_widget.layout().addItem(branding_layout)
115
116 # initially the steps widget is not visible
117 # it becomes visible once the first step becomes active

Subscribers

People subscribed via source and target branches

to status/vote changes: