Merge lp:~dandrader/qtubuntu/resizeToolTip into lp:qtubuntu

Proposed by Daniel d'Andrada
Status: Superseded
Proposed branch: lp:~dandrader/qtubuntu/resizeToolTip
Merge into: lp:qtubuntu
Diff against target: 107 lines (+15/-22)
4 files modified
debian/control (+1/-1)
src/ubuntumirclient/input.cpp (+9/-0)
src/ubuntumirclient/screen.h (+1/-1)
src/ubuntumirclient/window.cpp (+4/-20)
To merge this branch: bzr merge lp:~dandrader/qtubuntu/resizeToolTip
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team Pending
Review via email: mp+313798@code.launchpad.net

Commit message

Resize menus and toolips when told to do so

Description of the change

Fixes the following bug that you can see when running the childWindows branches + https://code.launchpad.net/~alan-griffiths/miral/fix-1652109/+merge/313782

1 - launch Kate
2 - Open some big text file (at least hundreds of lines long)
3 - scroll to the very top
4 - shorten the Kate window so that it doesn't not show many lines at once
5 - press and hold the down arrow on the scroll bar
6 - see the tooltip displaying some line numbers

expected outcome:
tooltip gets wider once it starts diplaying numbers bigger than 99

actual outcome:
numbers get squeezed once they get past 99

To post a comment you must log in.
lp:~dandrader/qtubuntu/resizeToolTip updated
361. By Gerry Boland

Remove mircommon specifier for header, fix other ftbfs with mir 0.25 (LP: #1653905)

Approved by: Albert Astals Cid, Unity8 CI Bot

362. By CI Train Bot Account

Releasing 0.63+17.04.20170104-0ubuntu1

363. By CI Train Bot Account

Resync trunk.

364. By Daniel d'Andrada

Resize menus and toolips when told to do so

365. By Daniel d'Andrada

Also move child window when updating its geometry

366. By Daniel d'Andrada

Fix positioning

367. By Daniel d'Andrada

Update copyright header

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2016-09-22 19:45:30 +0000
3+++ debian/control 2016-12-22 19:19:53 +0000
4@@ -10,7 +10,7 @@
5 libgles2-mesa-dev,
6 libglib2.0-dev,
7 libinput-dev,
8- libmirclient-dev (>= 0.13.0),
9+ libmirclient-dev (>= 0.25.0),
10 libmirclient-debug-extension-dev,
11 libmtdev-dev,
12 libubuntu-application-api-dev (>= 2.9.0),
13
14=== modified file 'src/ubuntumirclient/input.cpp'
15--- src/ubuntumirclient/input.cpp 2016-11-04 13:24:35 +0000
16+++ src/ubuntumirclient/input.cpp 2016-12-22 19:19:53 +0000
17@@ -232,6 +232,8 @@
18 return "surface_output";
19 case mir_event_type_input_device_state:
20 return "input_device_state";
21+ case mir_event_type_surface_placement:
22+ return "surface_placement";
23 }
24 Q_UNREACHABLE();
25 }
26@@ -328,6 +330,8 @@
27 case mir_input_event_type_pointer:
28 dispatchPointerEvent(window, ev);
29 break;
30+ case mir_input_event_types:
31+ Q_UNREACHABLE();
32 }
33 }
34
35@@ -370,6 +374,9 @@
36 break;
37 case mir_touch_action_change:
38 touchPoint.state = Qt::TouchPointMoved;
39+ break;
40+ case mir_touch_actions:
41+ Q_UNREACHABLE();
42 }
43
44 touchPoints.append(touchPoint);
45@@ -530,6 +537,8 @@
46 case mir_pointer_action_leave:
47 QWindowSystemInterface::handleLeaveEvent(window);
48 break;
49+ case mir_pointer_actions:
50+ Q_UNREACHABLE();
51 }
52 }
53
54
55=== modified file 'src/ubuntumirclient/screen.h'
56--- src/ubuntumirclient/screen.h 2016-04-28 14:09:54 +0000
57+++ src/ubuntumirclient/screen.h 2016-12-22 19:19:53 +0000
58@@ -20,7 +20,7 @@
59 #include <qpa/qplatformscreen.h>
60 #include <QSurfaceFormat>
61
62-#include <mircommon/mir_toolkit/common.h> // just for MirFormFactor enum
63+#include <mir_toolkit/common.h> // just for MirFormFactor enum
64
65 #include "cursor.h"
66
67
68=== modified file 'src/ubuntumirclient/window.cpp'
69--- src/ubuntumirclient/window.cpp 2016-11-23 12:11:14 +0000
70+++ src/ubuntumirclient/window.cpp 2016-12-22 19:19:53 +0000
71@@ -222,18 +222,6 @@
72 return requiresParent(qtWindowTypeToMirSurfaceType(type));
73 }
74
75-bool isMovable(const Qt::WindowType type)
76-{
77- auto mirType = qtWindowTypeToMirSurfaceType(type);
78- switch (mirType) {
79- case mir_surface_type_menu:
80- case mir_surface_type_tip:
81- return true;
82- default:
83- return false;
84- }
85-}
86-
87 Spec makeSurfaceSpec(QWindow *window, MirPixelFormat pixelFormat, UbuntuWindow *parentWindowHandle,
88 MirConnection *connection)
89 {
90@@ -537,14 +525,10 @@
91 qCDebug(ubuntumirclient,"updateGeometry(window=%p, width=%d, height=%d)", mWindow,
92 newGeometry.width(), newGeometry.height());
93
94- Spec spec;
95- if (isMovable(mWindow->type())) {
96- spec = Spec{makeSurfaceSpec(mWindow, mPixelFormat, mParentWindowHandle, mConnection)};
97- } else {
98- spec = Spec{mir_connection_create_spec_for_changes(mConnection)};
99- mir_surface_spec_set_width(spec.get(), newGeometry.width());
100- mir_surface_spec_set_height(spec.get(), newGeometry.height());
101- }
102+ auto spec = Spec{mir_connection_create_spec_for_changes(mConnection)};
103+ mir_surface_spec_set_width(spec.get(), newGeometry.width());
104+ mir_surface_spec_set_height(spec.get(), newGeometry.height());
105+
106 mir_surface_apply_spec(mMirSurface, spec.get());
107 }
108

Subscribers

People subscribed via source and target branches