mirror of
https://github.com/yse/easy_profiler.git
synced 2025-01-14 08:37:55 +08:00
(ProfGraphicsScrollbar) overflow guard (it seems that this is because of floating point precision)
This commit is contained in:
parent
24f181c040
commit
cdd74503eb
@ -185,7 +185,7 @@ void ProfMinimapItem::paint(QPainter* _painter, const QStyleOptionGraphicsItem*
|
|||||||
// Draw rectangle
|
// Draw rectangle
|
||||||
|
|
||||||
const auto h = ::std::max((item.width() - m_minDuration) * coeff, 5.0);
|
const auto h = ::std::max((item.width() - m_minDuration) * coeff, 5.0);
|
||||||
const auto col = h * heightRevert;
|
const auto col = ::std::min(h * heightRevert, 0.9999999);
|
||||||
//const auto color = ::profiler_gui::toRgb(col * 255, (1.0 - col) * 255, 0); // item.color;
|
//const auto color = ::profiler_gui::toRgb(col * 255, (1.0 - col) * 255, 0); // item.color;
|
||||||
const auto color = 0x00ffffff & QColor::fromHsvF((1.0 - col) * 0.35, 0.85, 0.85).rgb();
|
const auto color = 0x00ffffff & QColor::fromHsvF((1.0 - col) * 0.35, 0.85, 0.85).rgb();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user