1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Some more regions/countries rendering improvement

This commit is contained in:
Martin Tůma 2020-02-16 20:31:09 +01:00
parent 2c114f43c5
commit f333a76ef7
4 changed files with 12 additions and 4 deletions

View File

@ -346,7 +346,8 @@ bool RGNFile::pointObjects(Handle &hdl, const SubDiv *subdiv,
point.poi = labelPtr & 0x400000; point.poi = labelPtr & 0x400000;
if (lbl && (labelPtr & 0x3FFFFF)) if (lbl && (labelPtr & 0x3FFFFF))
point.label = lbl->label(lblHdl, labelPtr & 0x3FFFFF, point.poi, point.label = lbl->label(lblHdl, labelPtr & 0x3FFFFF, point.poi,
!(point.type == 0x1400 || point.type == 0x1500)); !(point.type == 0x1400 || point.type == 0x1500
|| point.type == 0x1e00));
points->append(point); points->append(point);
} }

View File

@ -116,6 +116,7 @@ void Style::defaultLineStyle()
_lines[TYPE(0x18)].setTextColor(QColor("#9fc4e1")); _lines[TYPE(0x18)].setTextColor(QColor("#9fc4e1"));
//_lines[TYPE(0x1a)] = Line(QPen(QColor("#7697b7"), 1, Qt::DashLine)); //_lines[TYPE(0x1a)] = Line(QPen(QColor("#7697b7"), 1, Qt::DashLine));
_lines[TYPE(0x1b)] = Line(QPen(QColor("#7697b7"), 1, Qt::DashLine)); _lines[TYPE(0x1b)] = Line(QPen(QColor("#7697b7"), 1, Qt::DashLine));
_lines[TYPE(0x1c)] = Line(QPen(QColor("#505145"), 1, Qt::DashLine));
_lines[TYPE(0x1e)] = Line(QPen(QColor("#505145"), 2, Qt::DashDotLine)); _lines[TYPE(0x1e)] = Line(QPen(QColor("#505145"), 2, Qt::DashDotLine));
_lines[TYPE(0x1f)] = Line(QPen(QColor("#9fc4e1"), 3, Qt::SolidLine)); _lines[TYPE(0x1f)] = Line(QPen(QColor("#9fc4e1"), 3, Qt::SolidLine));
_lines[TYPE(0x1f)].setTextColor(QColor("#9fc4e1")); _lines[TYPE(0x1f)].setTextColor(QColor("#9fc4e1"));
@ -146,12 +147,14 @@ void Style::defaultLineStyle()
void Style::defaultPointStyle() void Style::defaultPointStyle()
{ {
// Countries // Countries
_points[TYPE(0x14)].setTextColor(QColor("#777777")); _points[TYPE(0x14)].setTextColor(QColor("#505145"));
_points[TYPE(0x14)].setTextFontSize(Small); _points[TYPE(0x14)].setTextFontSize(Small);
_points[TYPE(0x15)].setTextColor(QColor("#777777")); _points[TYPE(0x15)].setTextColor(QColor("#505145"));
_points[TYPE(0x15)].setTextFontSize(Small); _points[TYPE(0x15)].setTextFontSize(Small);
// Regions // Regions
_points[TYPE(0x1e)].setTextColor(QColor("#505145"));
_points[TYPE(0x1e)].setTextFontSize(ExtraSmall);
_points[TYPE(0x28)].setTextFontSize(Small); _points[TYPE(0x28)].setTextFontSize(Small);
// Cities // Cities

View File

@ -16,7 +16,8 @@ public:
None = 1, None = 1,
Small = 2, Small = 2,
Normal = 3, Normal = 3,
Large = 4 Large = 4,
ExtraSmall = 5
}; };
enum POIClass { enum POIClass {

View File

@ -127,6 +127,7 @@ static QFont *font(Style::FontSize size, Style::FontSize defaultSize
static QFont large = pixelSizeFont(16); static QFont large = pixelSizeFont(16);
static QFont normal = pixelSizeFont(14); static QFont normal = pixelSizeFont(14);
static QFont small = pixelSizeFont(12); static QFont small = pixelSizeFont(12);
static QFont extraSmall = pixelSizeFont(10);
switch (size) { switch (size) {
case Style::None: case Style::None:
@ -137,6 +138,8 @@ static QFont *font(Style::FontSize size, Style::FontSize defaultSize
return &normal; return &normal;
case Style::Small: case Style::Small:
return &small; return &small;
case Style::ExtraSmall:
return &extraSmall;
default: default:
return font(defaultSize); return font(defaultSize);
} }