comparison ui/textoverlaybutton.cpp @ 981:947a880ec5d3

(issue72) Set font color in red circle to white. Cleanup old code.
author Emanuel Schuetze <emanuel@intevation.de>
date Fri, 29 Aug 2014 16:08:33 +0200
parents 57371f2e8dae
children
comparison
equal deleted inserted replaced
979:01128d63226d 981:947a880ec5d3
28 painter.setRenderHint(QPainter::Antialiasing, true); 28 painter.setRenderHint(QPainter::Antialiasing, true);
29 29
30 QRect myRect = e->rect().translated(26, -29); 30 QRect myRect = e->rect().translated(26, -29);
31 31
32 // circle 32 // circle
33 /* old manually painted background
34 QLinearGradient gradient(myRect.topLeft(),
35 myRect.bottomRight());
36 gradient.setColorAt(0, Qt::white);
37 gradient.setColorAt(0.7, Qt::red);
38 QBrush brush(gradient);
39 painter.setBrush(brush);
40 painter.setPen(Qt::white);
41 painter.drawEllipse(75.5, 6, 20, 20);
42 */
43 painter.drawPixmap(75.5, 5, mBackground); 33 painter.drawPixmap(75.5, 5, mBackground);
44 34
45 // font 35 // font
46 QFont font; 36 QFont font;
47 font.setPixelSize(11); 37 font.setPixelSize(11);
48 font.setWeight(QFont::Bold); 38 font.setWeight(QFont::Bold);
49 painter.setFont(font); 39 painter.setFont(font);
40 painter.setPen(Qt::white);
50 painter.drawText(myRect, Qt::AlignCenter | Qt::AlignVCenter, mOverlay); 41 painter.drawText(myRect, Qt::AlignCenter | Qt::AlignVCenter, mOverlay);
51 42
52 return; 43 return;
53 } 44 }
54 45

http://wald.intevation.org/projects/trustbridge/