feat: add parameter name class

This commit is contained in:
parker
2025-08-12 00:12:06 +01:00
parent a705b8bad4
commit 185d09b79a
23 changed files with 182 additions and 59 deletions

View File

@@ -71,9 +71,11 @@ void enzo::ui::IntSliderParm::paintEvent(QPaintEvent *event)
painter.setPen(notchPen_);
QRectF markerLinesRect = rect();
markerLinesRect.adjust(margin, margin, -margin, -margin);
for(int i=minValue_+1;i<maxValue_; ++i)
const int notchCount = std::min<int>(valueRange, 100);
for(int i=1;i<notchCount; ++i)
{
float x = ((i-minValue_)*markerLinesRect.width())/valueRange;
float x = ((i-1)*markerLinesRect.width())/notchCount;
x += notchWidth+4; // offset
const float y = markerLinesRect.bottom()-2;
painter.drawLine(x, y, x, y-5);