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
=== modified file 'debian/changelog'
--- debian/changelog 2013-05-13 15:44:25 +0000
+++ debian/changelog 2013-06-10 15:54:25 +0000
@@ -1,3 +1,9 @@
1konsole-qml-plugin (0.1.2) raring; urgency=low
2
3 * Fixed text display bug (LP:#1182503)
4
5 -- Dmitry Zagnoyko <hiroshidi@gmail.com> Mon, 10 Jun 2013 09:49:02 +0300
6
1konsole-qml-plugin (0.1.1) raring; urgency=low7konsole-qml-plugin (0.1.1) raring; urgency=low
28
3 * Fixed issue with float values of widget size9 * Fixed issue with float values of widget size
410
=== modified file 'konsole-qml-plugin.pro'
--- konsole-qml-plugin.pro 2013-04-27 15:16:34 +0000
+++ konsole-qml-plugin.pro 2013-06-10 15:54:25 +0000
@@ -8,6 +8,9 @@
88
9DEFINES += HAVE_POSIX_OPENPT HAVE_SYS_TIME_H HAVE_UPDWTMPX9DEFINES += HAVE_POSIX_OPENPT HAVE_SYS_TIME_H HAVE_UPDWTMPX
1010
11#MANUALY DEFINED PLATFORM
12DEFINES += Q_WS_UBUNTU
13
11TARGET = kdekonsole14TARGET = kdekonsole
12PLUGIN_IMPORT_PATH = org/kde/konsole15PLUGIN_IMPORT_PATH = org/kde/konsole
13PLUGIN_ASSETS = $$PWD/assets/*16PLUGIN_ASSETS = $$PWD/assets/*
1417
=== modified file 'src/TerminalDisplay.cpp'
--- src/TerminalDisplay.cpp 2013-05-04 11:51:15 +0000
+++ src/TerminalDisplay.cpp 2013-06-10 15:54:25 +0000
@@ -167,8 +167,17 @@
167 m_widgetRect = QRectF(0,0,1,1);167 m_widgetRect = QRectF(0,0,1,1);
168168
169 m_palette = qApp->palette();169 m_palette = qApp->palette();
170
170 m_font = QFont("Monospace",16);171 m_font = QFont("Monospace",16);
171172
173#ifdef Q_WS_UBUNTU
174#if QT_VERSION >= 0x040700
175 m_font.setStyleStrategy(QFont::ForceIntegerMetrics);
176#else
177#warning "Correct handling of the QFont metrics requited Qt>=4.7"
178#endif
179#endif
180
172 // The offsets are not yet calculated.181 // The offsets are not yet calculated.
173 // Do not calculate these too often to be more smoothly when resizing182 // Do not calculate these too often to be more smoothly when resizing
174 // konsole in opaque mode.183 // konsole in opaque mode.
@@ -367,10 +376,8 @@
367{376{
368 QFont font = f;377 QFont font = f;
369378
370#ifdef Q_WS_MAC379#if defined(Q_WS_MAC) || defined(Q_WS_UBUNTU)
371#if QT_VERSION >= 0x040700380#if QT_VERSION >= 0x040700
372 // mac uses floats for font width specification.
373 // this ensures the same handling for all platforms
374 font.setStyleStrategy(QFont::ForceIntegerMetrics);381 font.setStyleStrategy(QFont::ForceIntegerMetrics);
375#else382#else
376#warning "Correct handling of the QFont metrics requited Qt>=4.7"383#warning "Correct handling of the QFont metrics requited Qt>=4.7"
@@ -1916,6 +1923,14 @@
1916 font.setUnderline(useUnderline);1923 font.setUnderline(useUnderline);
1917 }1924 }
19181925
1926#ifdef Q_WS_UBUNTU
1927#if QT_VERSION >= 0x040700
1928 font.setStyleStrategy(QFont::ForceIntegerMetrics);
1929#else
1930#warning "Correct handling of the QFont metrics requited Qt>=4.7"
1931#endif
1932#endif
1933
1919 painter->setFont(font);1934 painter->setFont(font);
19201935
1921 // setup pen1936 // setup pen

Subscribers

People subscribed via source and target branches