From 6440b937db698ec12c222e56d54026bcdc5b56aa Mon Sep 17 00:00:00 2001 From: laserpants Date: Sat, 30 Apr 2016 13:22:49 +0300 Subject: [PATCH] make slider pretty --- components/slider.cpp | 4 ++-- components/slider.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/slider.cpp b/components/slider.cpp index bc1a43a..9f4c094 100644 --- a/components/slider.cpp +++ b/components/slider.cpp @@ -80,8 +80,8 @@ void Slider::paintEvent(QPaintEvent *event) const int y = height()/2; QRect r = Qt::Vertical == _orientation - ? QRect(x-2, 0, 4, height()) - : QRect(0, y-2, width(), 4); + ? QRect(x-1, 0, 2, height()) + : QRect(0, y-1, width(), 2); QBrush brush; brush.setStyle(Qt::SolidPattern); diff --git a/components/slider.h b/components/slider.h index 0d27c38..fcf48c5 100644 --- a/components/slider.h +++ b/components/slider.h @@ -14,7 +14,7 @@ public: explicit Handle(Slider *slider); ~Handle(); - inline QSize sizeHint() const Q_DECL_OVERRIDE { return QSize(16, 16); } + inline QSize sizeHint() const Q_DECL_OVERRIDE { return QSize(12, 12); } inline void setRelativePosition(const QPoint &pos) { setPosition(_offset + pos); }