Merge lp:~hiroshidi/ubuntu-terminal-app/plugin-text-display-fix into lp:~ubuntu-terminal-dev/ubuntu-terminal-app/plugin

Proposed by Dmitry Zagnoyko
Status: Merged
Approved by: Michael Hall
Approved revision: 14
Merged at revision: 13
Proposed branch: lp:~hiroshidi/ubuntu-terminal-app/plugin-text-display-fix
Merge into: lp:~ubuntu-terminal-dev/ubuntu-terminal-app/plugin
Diff against target: 76 lines (+27/-3)
3 files modified
debian/changelog (+6/-0)
konsole-qml-plugin.pro (+3/-0)
src/TerminalDisplay.cpp (+18/-3)
To merge this branch: bzr merge lp:~hiroshidi/ubuntu-terminal-app/plugin-text-display-fix
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Michael Hall Approve
Review via email: mp+168365@code.launchpad.net

Commit message

Fixed text displaying bug (LP: #1182503)

Description of the change

Bug: Command does not appear until enter is pressed.
Cause: float font metric
Fix: force integer font metric

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
14. By Dmitry Zagnoyko

Added platform definition

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Hall (mhall119) wrote :

Looks good to me

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) :
review: Approve (continuous-integration)

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 2013-05-13 15:44:25 +0000
3+++ debian/changelog 2013-06-10 15:54:25 +0000
4@@ -1,3 +1,9 @@
5+konsole-qml-plugin (0.1.2) raring; urgency=low
6+
7+ * Fixed text display bug (LP:#1182503)
8+
9+ -- Dmitry Zagnoyko <hiroshidi@gmail.com> Mon, 10 Jun 2013 09:49:02 +0300
10+
11 konsole-qml-plugin (0.1.1) raring; urgency=low
12
13 * Fixed issue with float values of widget size
14
15=== modified file 'konsole-qml-plugin.pro'
16--- konsole-qml-plugin.pro 2013-04-27 15:16:34 +0000
17+++ konsole-qml-plugin.pro 2013-06-10 15:54:25 +0000
18@@ -8,6 +8,9 @@
19
20 DEFINES += HAVE_POSIX_OPENPT HAVE_SYS_TIME_H HAVE_UPDWTMPX
21
22+#MANUALY DEFINED PLATFORM
23+DEFINES += Q_WS_UBUNTU
24+
25 TARGET = kdekonsole
26 PLUGIN_IMPORT_PATH = org/kde/konsole
27 PLUGIN_ASSETS = $$PWD/assets/*
28
29=== modified file 'src/TerminalDisplay.cpp'
30--- src/TerminalDisplay.cpp 2013-05-04 11:51:15 +0000
31+++ src/TerminalDisplay.cpp 2013-06-10 15:54:25 +0000
32@@ -167,8 +167,17 @@
33 m_widgetRect = QRectF(0,0,1,1);
34
35 m_palette = qApp->palette();
36+
37 m_font = QFont("Monospace",16);
38
39+#ifdef Q_WS_UBUNTU
40+#if QT_VERSION >= 0x040700
41+ m_font.setStyleStrategy(QFont::ForceIntegerMetrics);
42+#else
43+#warning "Correct handling of the QFont metrics requited Qt>=4.7"
44+#endif
45+#endif
46+
47 // The offsets are not yet calculated.
48 // Do not calculate these too often to be more smoothly when resizing
49 // konsole in opaque mode.
50@@ -367,10 +376,8 @@
51 {
52 QFont font = f;
53
54-#ifdef Q_WS_MAC
55+#if defined(Q_WS_MAC) || defined(Q_WS_UBUNTU)
56 #if QT_VERSION >= 0x040700
57- // mac uses floats for font width specification.
58- // this ensures the same handling for all platforms
59 font.setStyleStrategy(QFont::ForceIntegerMetrics);
60 #else
61 #warning "Correct handling of the QFont metrics requited Qt>=4.7"
62@@ -1916,6 +1923,14 @@
63 font.setUnderline(useUnderline);
64 }
65
66+#ifdef Q_WS_UBUNTU
67+#if QT_VERSION >= 0x040700
68+ font.setStyleStrategy(QFont::ForceIntegerMetrics);
69+#else
70+#warning "Correct handling of the QFont metrics requited Qt>=4.7"
71+#endif
72+#endif
73+
74 painter->setFont(font);
75
76 // setup pen

Subscribers

People subscribed via source and target branches