Decreased size of widget for point details on chart.

This commit is contained in:
23rd 2023-09-08 13:46:11 +03:00 committed by John Preston
parent ecce9dbaaa
commit 2106747496
2 changed files with 7 additions and 4 deletions

View File

@ -39,7 +39,7 @@ PointDetailsWidget::PointDetailsWidget(
, _zoomEnabled(zoomEnabled)
, _chartData(chartData)
, _textStyle(st::statisticsDetailsPopupStyle)
, _headerStyle(st::semiboldTextStyle)
, _headerStyle(st::statisticsDetailsPopupHeaderStyle)
, _longFormat(u"ddd, MMM d hh:mm"_q)
, _shortFormat(u"ddd, MMM d"_q) {
const auto calculatedWidth = [&]{
@ -158,7 +158,7 @@ int PointDetailsWidget::lineYAt(int index) const {
return _textRect.y()
+ _headerStyle.font->height
+ st::statisticsDetailsPopupMargins.bottom()
+ st::statisticsDetailsPopupMargins.bottom() / 2
+ std::ceil(linesHeight);
}

View File

@ -14,7 +14,7 @@ statisticsChartHeight: 150px;
statisticsDetailsPopupMargins: margins(8px, 8px, 8px, 8px);
statisticsDetailsPopupPadding: margins(6px, 6px, 6px, 6px);
statisticsDetailsPopupMidLineSpace: 8px;
statisticsDetailsPopupMidLineSpace: 4px;
statisticsDetailsDotRadius: 4px;
statisticsChartLineWidth: 2px;
@ -34,8 +34,11 @@ statisticsChartFooterHeight: 52px;
statisticsChartFlatCheckboxMargins: margins(6px, 4px, 6px, 4px);
statisticsChartFlatCheckboxCheckWidth: 4px;
statisticsDetailsPopupHeaderStyle: TextStyle(defaultTextStyle) {
font: font(9px semibold);
}
statisticsDetailsPopupStyle: TextStyle(defaultTextStyle) {
font: font(11px);
font: font(8px);
}
statisticsDetailsBottomCaptionStyle: TextStyle(defaultTextStyle) {
font: font(10px);