Skip to content

Commit e6a862d

Browse files
committed
Cleanup
1 parent 1a148ea commit e6a862d

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

src/frmmain.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
#include <QMimeData>
3535
#include "frmmain.h"
3636
#include "ui_frmmain.h"
37-
#include "windows.h"
3837

3938
frmMain::frmMain(QWidget *parent) :
4039
QMainWindow(parent),

src/widgets/slider.cpp

+2-13
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,9 @@ void Slider::paintEvent(QPaintEvent *ev)
1414
QPainter painter(this);
1515
painter.setRenderHint(QPainter::Antialiasing);
1616

17-
QPen pen(0x999999);
18-
pen.setWidth(3);
19-
20-
QPolygon poly(QVector<QPoint>() << QPoint(0, 7) << QPoint(-5, 0) << QPoint(5, 0));
21-
int pos = ((double)this->width() - 18) / (this->maximum() - this->minimum()) * (this->m_currentValue - this->minimum()) + 9;
22-
poly.translate(pos, 2);
23-
2417
QImage image(":/images/handle2s1.png");
25-
26-
painter.setPen(pen);
27-
painter.setBrush(QBrush(0x999999));
28-
// painter.drawPolygon(poly);
29-
// painter.drawLine(pos, 3, pos, this->height() - 3);
30-
painter.drawImage(pos - image.width() / 2, 2, image);
18+
int pos = ((double)this->width() - 18) / (this->maximum() - this->minimum()) * (this->m_currentValue - this->minimum()) + 9;
19+
painter.drawImage(pos - image.width() / 2, (this->height() - image.height()) / 2, image);
3120
}
3221
}
3322

0 commit comments

Comments
 (0)