mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-02-22 02:20:47 +01:00
IMG maps font sizes adjustement
This commit is contained in:
parent
53e960fabe
commit
63335aa004
@ -148,8 +148,14 @@ void Style::defaultLineStyle()
|
|||||||
_lines[TYPE(0x29)].setTextFontSize(Style::None);
|
_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[0x2a00] = Point(QImage(":/restaurant-11.png"));
|
||||||
_points[0x2a01] = Point(QImage(":/restaurant-11.png"));
|
_points[0x2a01] = Point(QImage(":/restaurant-11.png"));
|
||||||
_points[0x2a02] = Point(QImage(":/restaurant-noodle-11.png"));
|
_points[0x2a02] = Point(QImage(":/restaurant-noodle-11.png"));
|
||||||
@ -934,7 +940,7 @@ Style::Style(SubFile *typ)
|
|||||||
{
|
{
|
||||||
defaultLineStyle();
|
defaultLineStyle();
|
||||||
defaultPolygonStyle();
|
defaultPolygonStyle();
|
||||||
defaultPOIStyle();
|
defaultPointStyle();
|
||||||
|
|
||||||
if (typ && typ->isValid())
|
if (typ && typ->isValid())
|
||||||
parseTYPFile(typ);
|
parseTYPFile(typ);
|
||||||
|
@ -138,7 +138,7 @@ private:
|
|||||||
const Section §ion, ItemInfo &info);
|
const Section §ion, ItemInfo &info);
|
||||||
void defaultPolygonStyle();
|
void defaultPolygonStyle();
|
||||||
void defaultLineStyle();
|
void defaultLineStyle();
|
||||||
void defaultPOIStyle();
|
void defaultPointStyle();
|
||||||
|
|
||||||
QMap<quint32, Line> _lines;
|
QMap<quint32, Line> _lines;
|
||||||
QMap<quint32, Polygon> _polygons;
|
QMap<quint32, Polygon> _polygons;
|
||||||
|
@ -118,10 +118,10 @@ static const QFont *name() \
|
|||||||
return &f; \
|
return &f; \
|
||||||
}
|
}
|
||||||
|
|
||||||
FONT(largeFont, 14)
|
FONT(largeFont, 16)
|
||||||
FONT(normalFont, 12)
|
FONT(normalFont, 14)
|
||||||
FONT(smallFont, 10)
|
FONT(smallFont, 12)
|
||||||
FONT(poiFont, 9)
|
FONT(poiFont, 10)
|
||||||
|
|
||||||
static const QColor *shieldBgColor(Label::Shield::Type type)
|
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:
|
case Style::Large:
|
||||||
font = largeFont();
|
font = largeFont();
|
||||||
break;
|
break;
|
||||||
case Style::Small:
|
case Style::Normal:
|
||||||
font = smallFont();
|
font = normalFont();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
font = normalFont();
|
font = smallFont();
|
||||||
}
|
}
|
||||||
const QColor *color = style.textColor().isValid()
|
const QColor *color = style.textColor().isValid()
|
||||||
? &style.textColor() : 0;
|
? &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;
|
int idx = poly.points.size()/2, inc = 0, sign = 1;
|
||||||
|
|
||||||
TextPointItem *item = new TextPointItem(
|
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()));
|
0, &shieldColor, shieldBgColor(shield.type()));
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
@ -444,14 +444,14 @@ void IMGMap::processPoints(QList<IMG::Point> &points,
|
|||||||
case Style::None:
|
case Style::None:
|
||||||
label = 0;
|
label = 0;
|
||||||
break;
|
break;
|
||||||
case Style::Normal:
|
|
||||||
font = normalFont();
|
|
||||||
break;
|
|
||||||
case Style::Small:
|
case Style::Small:
|
||||||
font = smallFont();
|
font = smallFont();
|
||||||
break;
|
break;
|
||||||
default:
|
case Style::Large:
|
||||||
font = largeFont();
|
font = largeFont();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
font = normalFont();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const QColor *color = style.textColor().isValid()
|
const QColor *color = style.textColor().isValid()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user