[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeedu/khangman/khangman
From: Anne-Marie Mahfouf <annma () kde ! org>
Date: 2005-04-12 20:58:45
Message-ID: 20050412205845.F3104658 () office ! kde ! org
[Download RAW message or body]
CVS commit by annma:
fix tooltips location
typo in data
M +16 -11 khangmanview.cpp 1.107
M +1 -1 data/en/animals.kvtml 1.2
--- kdeedu/khangman/khangman/khangmanview.cpp #1.106:1.107
@@ -158,6 +158,13 @@ void KHangManView::mousePressEvent(QMous
myPopup->setTimeout(4000); //show for 4 seconds
myPopup->show();
- int x = width()*254/700;
- int y = height()*405/535;
+ int x=0, y=0;
+ if (Prefs::mode() ==0) {
+ x = width()*300/700;
+ y = height()*510/535;
+ }
+ else {
+ x = width()*254/700;
+ y = height()*405/535;
+ }
myPopup->move(x, y);
//maybe it's better to popup where the mouse clicks, in that case kill the \
popup before new click @@ -188,10 +195,9 @@ void KHangManView::paintWord()
QPainter paint;
paint.begin(paletteBackgroundPixmap());
+ paint.setFont(QFont("Arial", 30));
if (Prefs::mode() ==0) {
kdDebug() << "in paint word sea " << endl;
paint.setPen( QColor(148, 156, 167));
- paint.setFont(QFont("Arial", 30));
- //TODO instead of using bluePIc should be done in code: get the part of the \
background, copy it, and repaint it
- //copyBlt(paletteBackgroundPixmap(), QPoint(0, height()-height()*126/535), \
paletteBackgroundPixmap(), QRect(0, height()-height()*126/535, width()*366/700, \
height()*126/535)); + //TODO instead of using bluePic should be done in code: \
get the part of the background, copy it, and repaint it
paint.drawPixmap(QRect(0, height()-height()*126/535, width()*366/700, \
height()*126/535), bluePic);
paint.drawText(width()/50, height()-height()/10- height()*126/535/2, \
width()*366/700, height()*126/535, AlignCenter|AlignCenter, goodWord); @@ -199,8 \
+205,7 @@ void KHangManView::paintWord() else {
paint.setPen( QColor(87, 0, 0));
- paint.setFont(QFont("Arial", 30));
- //TODO instead of using bluePIc should be done in code: get the part of the \
background, copy it, and repaint it + //TODO instead of using greenPic should \
be done in code: get the part of the background, copy it, and repaint \
it
paint.drawPixmap(QRect(width()-width()*325/700, height()-height()*86/535, \
width()*325/700, height()*86/535), greenPic);
- paint.drawText(width()*385/700, height()-height()*43/535-height()*86/535, \
width()*325/700, height()*86/535, AlignCenter, goodWord); + \
paint.drawText(width()*385/700, height()-height()*43/535-height()*86/535, \
width()*325/700, height()*86/535, AlignCenter|AlignCenter, goodWord); }
paint.end();
@@ -214,5 +219,5 @@ void KHangManView::paintWordTwice()
paint.setFont(QFont("Arial", 30));
paint.setPen(QColor(Qt::red));
- QRect aux = paint.boundingRect(QRect(), AlignAuto, goodWord.left(redIndex));
+ QRect aux = paint.boundingRect(QRect(), AlignCenter|AlignCenter, \
goodWord.left(redIndex)); if (Prefs::mode() ==0) { //sea theme
if (redIndex == 0)
@@ -223,7 +228,7 @@ void KHangManView::paintWordTwice()
else { //desert theme
if (redIndex == 0)
- paint.drawText(width()*385/700+aux.width(), height()-height()*43/535, \
QString(goodWord[redIndex])); + \
paint.drawText(width()*325/700+aux.width(), height()-height()*43/535-height()*86/535, \
width()*325/700, height()*86/535, AlignCenter|AlignCenter, \
QString(goodWord[redIndex])); else
- paint.drawText(width()*385/700+aux.width()-2, height()-height()*43/535, \
QString(goodWord[redIndex])); + \
paint.drawText(width()*325/700+aux.width(), height()-height()*43/535-height()*86/535, \
width()*325/700, height()*86/535, AlignCenter|AlignCenter, \
QString(goodWord[redIndex])); }
paint.end();
--- kdeedu/khangman/khangman/data/en/animals.kvtml #1.1:1.2
@@ -44,5 +44,5 @@
<e>
<o>snake</o>
- <t>reptile with no lgs</t>
+ <t>reptile with no legs</t>
</e>
<e>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic