summaryrefslogtreecommitdiff
path: root/muse2/muse
diff options
context:
space:
mode:
authorOrcan Ogetbil <oget.fedora@gmail.com>2010-12-31 19:08:41 +0000
committerOrcan Ogetbil <oget.fedora@gmail.com>2010-12-31 19:08:41 +0000
commitd05d270f7f4a69eac3382f611be949c0cbd783e5 (patch)
treea1f12296ddfdf6131ad815d039f69b2babd14acf /muse2/muse
parentbf97cc86df42bdbef8f626f2fd457e17f8bc4366 (diff)
shadow behind wallpaper titles
Diffstat (limited to 'muse2/muse')
-rw-r--r--muse2/muse/appearance.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/muse2/muse/appearance.cpp b/muse2/muse/appearance.cpp
index 997da343..7b0383b5 100644
--- a/muse2/muse/appearance.cpp
+++ b/muse2/muse/appearance.cpp
@@ -46,14 +46,21 @@ class BgPreviewWidget : public QWidget {
int w = t_widget->width() - 65;
p.drawTiledPixmap(1,1,w,BG_ITEM_HEIGHT-2, pixmap);
+ const QPalette& pal = palette();
+ QColor dark = pal.dark().color();
// We can also draw a rectangle behind the text:
- //const QPalette& pal = palette();
- //QColor dark = pal.dark().color();
//p.fillRect(QRect(w/2 - text_w/2,6,text_w + 20,text_h+4), dark);
QFontMetrics fm = p.fontMetrics();
text_w = fm.width(imagefile);
text_h = fm.height();
+
+ // Do the text shadow first
+ p.save();
+ p.setPen(dark);
+ p.drawText(w/2 - text_w/2 + 1, 7, text_w + 20, text_h+4, Qt::AlignCenter, imagefile);
+ p.restore();
+
p.drawText(w/2 - text_w/2,6, text_w + 20, text_h+4, Qt::AlignCenter, imagefile);
QWidget::paintEvent(event);
}