]> sigrok.org Git - pulseview.git/blobdiff - pv/view/ruler.cpp
Fixed timeline scale
[pulseview.git] / pv / view / ruler.cpp
index f71240de1722c301d9b6ad0bb1960a8ff338e5ed..5dea19474c84714a3f653e8449ff099f0f700625 100644 (file)
@@ -68,7 +68,7 @@ void Ruler::paintEvent(QPaintEvent *event)
        assert(prefix >= 0);
        assert(prefix < countof(SIPrefixes));
 
        assert(prefix >= 0);
        assert(prefix < countof(SIPrefixes));
 
-       const double multiplier = pow(0.1, prefix * 3 + FirstSIPrefixPower);
+       const double multiplier = pow(10.0, - prefix * 3 - FirstSIPrefixPower);
 
        const int text_height = p.boundingRect(0, 0, INT_MAX, INT_MAX,
                Qt::AlignLeft | Qt::AlignTop, "8").height();
 
        const int text_height = p.boundingRect(0, 0, INT_MAX, INT_MAX,
                Qt::AlignLeft | Qt::AlignTop, "8").height();