|
|
@ -400,7 +400,7 @@ void SignalItemDelegate::drawSparkline(QPainter *painter, const QStyleOptionView |
|
|
|
|
|
|
|
|
|
|
|
int h_margin = option.widget->style()->pixelMetric(QStyle::PM_FocusFrameHMargin); |
|
|
|
int h_margin = option.widget->style()->pixelMetric(QStyle::PM_FocusFrameHMargin); |
|
|
|
int v_margin = std::max(option.widget->style()->pixelMetric(QStyle::PM_FocusFrameVMargin) + 2, 4); |
|
|
|
int v_margin = std::max(option.widget->style()->pixelMetric(QStyle::PM_FocusFrameVMargin) + 2, 4); |
|
|
|
const double xscale = (option.rect.width() - 175.0 * option.widget->devicePixelRatioF() - h_margin * 2) / settings.sparkline_range; |
|
|
|
const double xscale = (option.rect.width() - 175.0 - h_margin * 2) / settings.sparkline_range; |
|
|
|
const double yscale = (option.rect.height() - v_margin * 2) / (max - min); |
|
|
|
const double yscale = (option.rect.height() - v_margin * 2) / (max - min); |
|
|
|
const int left = option.rect.left(); |
|
|
|
const int left = option.rect.left(); |
|
|
|
const int top = option.rect.top() + v_margin; |
|
|
|
const int top = option.rect.top() + v_margin; |
|
|
|