1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-06 14:53:21 +02:00

IMG maps font sizes adjustement

This commit is contained in:
Martin Tůma 2019-07-04 21:38:57 +02:00
parent 53e960fabe
commit 63335aa004
3 changed files with 21 additions and 15 deletions

View File

@ -148,8 +148,14 @@ void Style::defaultLineStyle()
_lines[TYPE(0x29)].setTextFontSize(Style::None);
}
void Style::defaultPOIStyle()
void Style::defaultPointStyle()
{
// Cities
_points[TYPE(0x01)].setTextFontSize(Style::Large);
_points[TYPE(0x02)].setTextFontSize(Style::Large);
_points[TYPE(0x03)].setTextFontSize(Style::Large);
// POI
_points[0x2a00] = Point(QImage(":/restaurant-11.png"));
_points[0x2a01] = Point(QImage(":/restaurant-11.png"));
_points[0x2a02] = Point(QImage(":/restaurant-noodle-11.png"));
@ -934,7 +940,7 @@ Style::Style(SubFile *typ)
{
defaultLineStyle();
defaultPolygonStyle();
defaultPOIStyle();
defaultPointStyle();
if (typ && typ->isValid())
parseTYPFile(typ);

View File

@ -138,7 +138,7 @@ private:
const Section &section, ItemInfo &info);
void defaultPolygonStyle();
void defaultLineStyle();
void defaultPOIStyle();
void defaultPointStyle();
QMap<quint32, Line> _lines;
QMap<quint32, Polygon> _polygons;

View File

@ -118,10 +118,10 @@ static const QFont *name() \
return &f; \
}
FONT(largeFont, 14)
FONT(normalFont, 12)
FONT(smallFont, 10)
FONT(poiFont, 9)
FONT(largeFont, 16)
FONT(normalFont, 14)
FONT(smallFont, 12)
FONT(poiFont, 10)
static const QColor *shieldBgColor(Label::Shield::Type type)
{
@ -352,11 +352,11 @@ void IMGMap::processLines(QList<IMG::Poly> &lines, const QPoint &tile,
case Style::Large:
font = largeFont();
break;
case Style::Small:
font = smallFont();
case Style::Normal:
font = normalFont();
break;
default:
font = normalFont();
font = smallFont();
}
const QColor *color = style.textColor().isValid()
? &style.textColor() : 0;
@ -388,7 +388,7 @@ void IMGMap::processLines(QList<IMG::Poly> &lines, const QPoint &tile,
int idx = poly.points.size()/2, inc = 0, sign = 1;
TextPointItem *item = new TextPointItem(
poly.points.at(idx).toPoint(), &shield.text(), smallFont(),
poly.points.at(idx).toPoint(), &shield.text(), poiFont(),
0, &shieldColor, shieldBgColor(shield.type()));
while (1) {
@ -444,14 +444,14 @@ void IMGMap::processPoints(QList<IMG::Point> &points,
case Style::None:
label = 0;
break;
case Style::Normal:
font = normalFont();
break;
case Style::Small:
font = smallFont();
break;
default:
case Style::Large:
font = largeFont();
break;
default:
font = normalFont();
}
}
const QColor *color = style.textColor().isValid()