mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-30 22:51:16 +01:00
Compare commits
No commits in common. "3e1bddbcfd0f3a2a01c4b83ae030c8d77e2c89bb" and "9b46845568e7dc5d2ab51dad77b1de0c3e445d4b" have entirely different histories.
3e1bddbcfd
...
9b46845568
@ -13,18 +13,15 @@ static Qt::PenStyle styles[] = {Qt::SolidLine, Qt::DashLine, Qt::DotLine,
|
|||||||
|
|
||||||
QIcon StyleComboBox::icon(Qt::PenStyle style)
|
QIcon StyleComboBox::icon(Qt::PenStyle style)
|
||||||
{
|
{
|
||||||
qreal ratio(devicePixelRatioF());
|
QPixmap pm(iconSize());
|
||||||
QSize size(iconSize());
|
|
||||||
QPixmap pm(size * ratio);
|
|
||||||
pm.setDevicePixelRatio(ratio);
|
|
||||||
pm.fill(Qt::transparent);
|
pm.fill(Qt::transparent);
|
||||||
|
|
||||||
QBrush brush(QPalette().brush(QPalette::Active, QPalette::WindowText));
|
QBrush brush(QPalette().brush(QPalette::Active, QPalette::WindowText));
|
||||||
QPen pen(brush, size.height() / LINE_WIDTH_RATIO, style);
|
QPen pen(brush, pm.height() / LINE_WIDTH_RATIO, style);
|
||||||
|
|
||||||
QPainter painter(&pm);
|
QPainter painter(&pm);
|
||||||
painter.setPen(pen);
|
painter.setPen(pen);
|
||||||
painter.drawLine(0, size.height() / 2, size.width(), size.height() / 2);
|
painter.drawLine(0, pm.height() / 2, pm.width(), pm.height() / 2);
|
||||||
|
|
||||||
return QIcon(pm);
|
return QIcon(pm);
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,7 @@ Data::Data(const QString &fileName, bool tryUnknown)
|
|||||||
_errorLine = 0;
|
_errorLine = 0;
|
||||||
|
|
||||||
if (!file.open(QFile::ReadOnly)) {
|
if (!file.open(QFile::ReadOnly)) {
|
||||||
_errorString = file.errorString();
|
_errorString = qPrintable(file.errorString());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user