Draw map point on HistoryLocation.

This commit is contained in:
John Preston 2018-10-09 13:27:18 +03:00
parent f9632d5c43
commit 3992cea084
4 changed files with 10 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 941 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -468,3 +468,5 @@ historyAboutProxy: FlatLabel(defaultFlatLabel) {
textFg: windowSubTextFg;
}
historyAboutProxyPadding: margins(20px, 10px, 20px, 10px);
historyMapPoint: icon {{ "map_point", windowBgActive }};

View file

@ -41,6 +41,7 @@ namespace {
constexpr auto kMaxGifForwardedBarLines = 4;
constexpr auto kMaxOriginalEntryLines = 8192;
const auto kMapPointFg = QColor(64, 167, 227);
using TextState = HistoryView::TextState;
@ -4843,6 +4844,13 @@ void HistoryLocation::draw(Painter &p, const QRect &r, TextSelection selection,
} else {
App::complexLocationRect(p, rthumb, roundRadius, roundCorners);
}
const auto &point = st::historyMapPoint;
point.paint(
p,
rthumb.x() + ((rthumb.width() - point.width()) / 2),
rthumb.y() + (rthumb.height() / 2) - point.height(),
width(),
kMapPointFg);
if (selected) {
App::complexOverlayRect(p, rthumb, roundRadius, roundCorners);
}