[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kde-workspace/previewsoc13] kcontrol/keyboard/preview: fixed the position of 3rd and fourh level sy
From: shivam makkar <amourphious1992 () gmail ! com>
Date: 2013-11-15 9:25:18
Message-ID: E1VhFeQ-0007Ik-Pf () scm ! kde ! org
[Download RAW message or body]
Git commit 3558852fab28560d31959d67a5c7274d355a09d2 by shivam makkar.
Committed on 15/11/2013 at 09:24.
Pushed by makkar into branch 'previewsoc13'.
fixed the position of 3rd and fourh level symbols and warning
M +6 -4 kcontrol/keyboard/preview/kbpreviewframe.cpp
http://commits.kde.org/kde-workspace/3558852fab28560d31959d67a5c7274d355a09d2
diff --git a/kcontrol/keyboard/preview/kbpreviewframe.cpp b/kcontrol/keyboard/preview/kbpreviewframe.cpp
index 2d7a11e..aa0427d 100644
--- a/kcontrol/keyboard/preview/kbpreviewframe.cpp
+++ b/kcontrol/keyboard/preview/kbpreviewframe.cpp
@@ -46,7 +46,7 @@ static const QColor unknownSymbolColor("#FF3300");
static const int xOffset[] = {10, 10, -15, -15 };
static const int yOffset[] = {5, -20, 5, -20 };
static const QColor color[] = { lev12color, lev12color, lev34color, lev34color };
-static const int keyLevel[3][4] = { { 1, 0, 2, 3}, { 1, 0, 4, 5}, { 1, 0, 6, 7} };
+static const int keyLevel[3][4] = { { 1, 0, 3, 2}, { 1, 0, 5, 4}, { 1, 0, 7, 6} };
static const QRegExp fkKey("^FK\\d+$");
@@ -127,10 +127,12 @@ void KbPreviewFrame::drawKeySymbols(QPainter &painter, QPoint temp[], const GSha
painter.setPen(Qt::black);
if( name.contains(fkKey) ){
- name.remove("K");
+ QString tempName = name;
+ tempName.remove("K");
+ painter.drawText(temp[0].x()+s.size(0)-10, temp[0].y()+3*s.size(1)/2, tempName);
}
-
- painter.drawText(temp[0].x()+s.size(0)-10, temp[0].y()+3*s.size(1)/2, name);
+ else
+ painter.drawText(temp[0].x()+s.size(0)-10, temp[0].y()+3*s.size(1)/2, name);
tip = name;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic