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