mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Added simple small mark to clickable title in calendar box.
This commit is contained in:
@@ -1144,10 +1144,24 @@ void CalendarBox::Title::paintEvent(QPaintEvent *e) {
|
||||
|
||||
const auto clip = e->rect();
|
||||
|
||||
const auto triangleSize = st::lineWidth * 6;
|
||||
const auto triangleX = _textLeft;
|
||||
const auto triangleY = (st::calendarTitleHeight
|
||||
- st::calendarTitleFont->height) / 2
|
||||
+ st::calendarTitleFont->height / 2;
|
||||
auto triangle = QPainterPath();
|
||||
triangle.moveTo(triangleX, triangleY - triangleSize / 2);
|
||||
triangle.lineTo(triangleX + triangleSize, triangleY);
|
||||
triangle.lineTo(triangleX, triangleY + triangleSize / 2);
|
||||
triangle.closeSubpath();
|
||||
p.setPen(Qt::NoPen);
|
||||
p.setBrush(st::windowSubTextFg);
|
||||
p.drawPath(triangle);
|
||||
|
||||
p.setFont(st::calendarTitleFont);
|
||||
p.setPen(_styleColors.titleTextColor);
|
||||
p.drawTextLeft(
|
||||
_textLeft,
|
||||
_textLeft + triangleSize * 2,
|
||||
(st::calendarTitleHeight - st::calendarTitleFont->height) / 2,
|
||||
width(),
|
||||
_text,
|
||||
|
||||
Reference in New Issue
Block a user