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:
parent
5bf98a03c7
commit
93dd153fc4
@ -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();
|
||||
|
||||
|
@ -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"));
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user