mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-27 08:41:02 +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
|
||||
|
||||
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 = 0x00ffffff & QColor::fromHsvF((1.0 - col) * 0.35, 0.85, 0.85).rgb();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user