1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-29 14:52:12 +01:00

Enabled text antialiasing for a number of widgets

Unlike QPainter::setRenderHints(),
QGraphicsView::setRenderHints() set the render hints  to flags passed as parameter,
so QPainter::TextAntialiasing flag is cleared.

changint it to setRenderHint or adding QPainter::TextAntialiasing
value fixes the AA text rendering.
This commit is contained in:
Dmytro Poplavskiy 2012-08-09 21:52:50 +10:00 committed by David Ankers
parent 5bf98a03c7
commit 93dd153fc4
4 changed files with 4 additions and 4 deletions

View File

@ -40,7 +40,7 @@ DialGadgetWidget::DialGadgetWidget(QWidget *parent) : QGraphicsView(parent)
setMinimumSize(64,64);
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
setScene(new QGraphicsScene(this));
setRenderHints(QPainter::Antialiasing);
setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing);
m_renderer = new QSvgRenderer();

View File

@ -40,7 +40,7 @@ JoystickControl::JoystickControl(QWidget *parent) : QGraphicsView(parent)
setMinimumSize(64, 64);
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
setScene(new QGraphicsScene(this));
setRenderHints(QPainter::Antialiasing);
setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing);
m_renderer = new QSvgRenderer();
bool test = m_renderer->load(QString(":/gcscontrol/images/joystick.svg"));

View File

@ -36,7 +36,7 @@ LineardialGadgetWidget::LineardialGadgetWidget(QWidget *parent) : QGraphicsView(
setMinimumSize(32,32);
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
setScene(new QGraphicsScene(this));
setRenderHints(QPainter::Antialiasing);
setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing);
m_renderer = new QSvgRenderer();
verticalDial = false;

View File

@ -46,7 +46,7 @@ PositionField::PositionField(QWidget *parent) :
setMinimumSize(64,64);
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
setScene(new QGraphicsScene(this));
setRenderHints(QPainter::Antialiasing);
setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing);
m_renderer = new QSvgRenderer();
Q_ASSERT( m_renderer->load(QString(":/magicwaypoint/images/positionfield.svg")) != 0 );