mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 23:27:09 +02:00
Improved style of line filter buttons under charts.
This commit is contained in:
parent
3425b40746
commit
10e3115c39
2 changed files with 11 additions and 8 deletions
|
@ -57,14 +57,15 @@ ChartLinesFilterWidget::FlatCheckbox::FlatCheckbox(
|
|||
: Ui::AbstractButton(parent)
|
||||
, _activeColor(activeColor)
|
||||
, _inactiveColor(st::boxBg->c)
|
||||
, _text(st::statisticsDetailsBottomCaptionStyle, text) {
|
||||
, _text(st::statisticsDetailsPopupStyle, text) {
|
||||
const auto &margins = st::statisticsChartFlatCheckboxMargins;
|
||||
const auto h = _text.minHeight() + rect::m::sum::v(margins) * 2;
|
||||
resize(
|
||||
_text.maxWidth()
|
||||
+ rect::m::sum::h(margins)
|
||||
+ h
|
||||
+ st::statisticsChartFlatCheckboxCheckWidth * 3,
|
||||
+ st::statisticsChartFlatCheckboxCheckWidth * 3
|
||||
- st::statisticsChartFlatCheckboxShrinkkWidth,
|
||||
h);
|
||||
}
|
||||
|
||||
|
@ -160,6 +161,7 @@ void ChartLinesFilterWidget::FlatCheckbox::paintEvent(QPaintEvent *e) {
|
|||
_text.draw(p, textContext);
|
||||
|
||||
if (progress > kCheckPartProgress) {
|
||||
auto hq = PainterHighQualityEnabler(p);
|
||||
p.setPen(QPen(textColor, st::statisticsChartLineWidth));
|
||||
const auto bounceProgress = checkProgress - 1.;
|
||||
const auto start = QPoint(
|
||||
|
|
|
@ -10,12 +10,12 @@ using "ui/basic.style";
|
|||
using "window/window.style";
|
||||
using "ui/widgets/widgets.style";
|
||||
|
||||
statisticsLayerOverviewMargins: margins(0px, 17px, 0px, 3px);
|
||||
statisticsLayerOverviewMargins: margins(0px, 17px, 0px, 9px);
|
||||
statisticsLayerMargins: margins(20px, 0px, 20px, 0px);
|
||||
|
||||
statisticsChartHeight: 200px;
|
||||
|
||||
statisticsChartEntryPadding: margins(0px, 13px, 0px, 8px);
|
||||
statisticsChartEntryPadding: margins(0px, 13px, 0px, 2px);
|
||||
|
||||
statisticsDetailsArrowShift: 2px;
|
||||
statisticsDetailsArrowStroke: 1.5;
|
||||
|
@ -25,7 +25,7 @@ statisticsDetailsPopupMidLineSpace: 4px;
|
|||
statisticsDetailsDotRadius: 5px;
|
||||
statisticsChartLineWidth: 2px;
|
||||
|
||||
statisticsChartFooterSkip: 10px;
|
||||
statisticsChartFooterSkip: 11px;
|
||||
statisticsChartFooterHeight: 42px;
|
||||
statisticsChartFooterBetweenSide: 5px;
|
||||
statisticsChartFooterSideWidth: 10px;
|
||||
|
@ -39,10 +39,11 @@ statisticsChartBottomCaptionSkip: 6px;
|
|||
|
||||
statisticsChartBottomCaptionMaxWidth: 44px;
|
||||
|
||||
statisticsChartFlatCheckboxMargins: margins(4px, 4px, 4px, 4px);
|
||||
statisticsChartFlatCheckboxCheckWidth: 4px;
|
||||
statisticsChartFlatCheckboxMargins: margins(4px, 3px, 4px, 5px);
|
||||
statisticsChartFlatCheckboxCheckWidth: 3px;
|
||||
statisticsChartFlatCheckboxShrinkkWidth: 4px;
|
||||
|
||||
statisticsFilterButtonsPadding: margins(0px, 6px, 0px, 0px);
|
||||
statisticsFilterButtonsPadding: margins(0px, 12px, 0px, 8px);
|
||||
|
||||
statisticsDetailsPopupHeaderStyle: TextStyle(defaultTextStyle) {
|
||||
font: font(12px semibold);
|
||||
|
|
Loading…
Add table
Reference in a new issue