Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Denvi committed Nov 20, 2016
1 parent 1a148ea commit e6a862d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
1 change: 0 additions & 1 deletion src/frmmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <QMimeData>
#include "frmmain.h"
#include "ui_frmmain.h"
#include "windows.h"

frmMain::frmMain(QWidget *parent) :
QMainWindow(parent),
Expand Down
15 changes: 2 additions & 13 deletions src/widgets/slider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,9 @@ void Slider::paintEvent(QPaintEvent *ev)
QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing);

QPen pen(0x999999);
pen.setWidth(3);

QPolygon poly(QVector<QPoint>() << QPoint(0, 7) << QPoint(-5, 0) << QPoint(5, 0));
int pos = ((double)this->width() - 18) / (this->maximum() - this->minimum()) * (this->m_currentValue - this->minimum()) + 9;
poly.translate(pos, 2);

QImage image(":/images/handle2s1.png");

painter.setPen(pen);
painter.setBrush(QBrush(0x999999));
// painter.drawPolygon(poly);
// painter.drawLine(pos, 3, pos, this->height() - 3);
painter.drawImage(pos - image.width() / 2, 2, image);
int pos = ((double)this->width() - 18) / (this->maximum() - this->minimum()) * (this->m_currentValue - this->minimum()) + 9;
painter.drawImage(pos - image.width() / 2, (this->height() - image.height()) / 2, image);
}
}

Expand Down

0 comments on commit e6a862d

Please # to comment.