From kde-commits Fri Nov 15 09:25:18 2013 From: shivam makkar Date: Fri, 15 Nov 2013 09:25:18 +0000 To: kde-commits Subject: [kde-workspace/previewsoc13] kcontrol/keyboard/preview: fixed the position of 3rd and fourh level sy Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=138450752808011 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/3558852fab28560d31959d67a5c7274d355a09= d2 diff --git a/kcontrol/keyboard/preview/kbpreviewframe.cpp b/kcontrol/keyboa= rd/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[] =3D {10, 10, -15, -15 }; static const int yOffset[] =3D {5, -20, 5, -20 }; static const QColor color[] =3D { lev12color, lev12color, lev34color, lev3= 4color }; -static const int keyLevel[3][4] =3D { { 1, 0, 2, 3}, { 1, 0, 4, 5}, { 1, 0= , 6, 7} }; +static const int keyLevel[3][4] =3D { { 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 =3D name; + tempName.remove("K"); + painter.drawText(temp[0].x()+s.size(0)-10, temp[0].y()+3*s.siz= e(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.siz= e(1)/2, name); = tip =3D name; =20