From bb44837d7c7e1a1ac33d029b3613252b9d4b9f58 Mon Sep 17 00:00:00 2001 From: con Date: Thu, 16 Jul 2009 15:57:59 +0200 Subject: Remove usage of QToolBar from debugger tool bar. --- src/libs/utils/styledbar.cpp | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'src/libs/utils/styledbar.cpp') diff --git a/src/libs/utils/styledbar.cpp b/src/libs/utils/styledbar.cpp index f647829b07..99a86437d0 100644 --- a/src/libs/utils/styledbar.cpp +++ b/src/libs/utils/styledbar.cpp @@ -5,6 +5,7 @@ #include #include #include +#include using namespace Core::Utils; @@ -27,8 +28,6 @@ bool StyledBar::isSingleRow() const void StyledBar::paintEvent(QPaintEvent *event) { - // Currently from the style - // Goal should be to migrate that into a Utils::StyledWidget class Q_UNUSED(event) QPainter painter(this); @@ -74,3 +73,26 @@ void StyledBar::paintEvent(QPaintEvent *event) QPixmapCache::insert(key, pixmap); } } + +StyledSeparator::StyledSeparator(QWidget *parent) + : QWidget(parent) +{ + setFixedWidth(10); +} + +void StyledSeparator::paintEvent(QPaintEvent *event) +{ + Q_UNUSED(event) + QPainter painter(this); + QRect selfRect = rect(); + + QColor separatorColor = StyleHelper::borderColor(); + separatorColor.setAlpha(100); + painter.setPen(separatorColor); + const int margin = 6; + const int offset = selfRect.width()/2; + painter.drawLine(selfRect.bottomLeft().x() + offset, + selfRect.bottomLeft().y() - margin, + selfRect.topLeft().x() + offset, + selfRect.topLeft().y() + margin); +} -- cgit v1.2.1