Skip to content
Permalink
Browse files

Merge PR #2430: LCD: add workarounds for LCD drawing on Qt 5.6.

  • Loading branch information...
mkrautz committed Jul 16, 2016
2 parents 9adc52d + c04aa4e commit b2f2277df2607124a10517b36d01846ca05ca9d3
Showing with 15 additions and 0 deletions.
  1. +15 −0 src/mumble/LCD.cpp
@@ -188,7 +188,14 @@ LCD::LCD() : QObject() {
d->setEnabled(enabled);
}
qiLogo = QIcon(QLatin1String("skin:mumble.svg")).pixmap(48,48).toImage().convertToFormat(QImage::Format_MonoLSB);

#if QT_VERSION >= 0x050600
// Don't invert the logo image when using Qt 5.6.
// See mumble-voip/mumble#2429
#else
qiLogo.invertPixels();
#endif

updateUserView();
}

@@ -242,7 +249,15 @@ void LCD::updateUserView() {
QImage *img = qhImages.value(size);
QPainter painter(img);
painter.setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing, false);

#if QT_VERSION >= 0x050600
// Use Qt::white instead of Qt::color1 on Qt 5.6.
// See mumble-voip/mumble#2429
painter.setPen(Qt::white);
#else
painter.setPen(Qt::color1);
#endif

painter.setFont(qfNormal);

img->fill(Qt::color0);

0 comments on commit b2f2277

Please sign in to comment.
You can’t perform that action at this time.