summaryrefslogtreecommitdiff
path: root/src/libs/utils/styledbar.cpp
diff options
context:
space:
mode:
authorcon <qtc-committer@nokia.com>2009-07-16 15:57:59 +0200
committercon <qtc-committer@nokia.com>2009-07-16 18:06:38 +0200
commitbb44837d7c7e1a1ac33d029b3613252b9d4b9f58 (patch)
treee0b9be4dd979f613f8d77daaea13ce77cab743cf /src/libs/utils/styledbar.cpp
parentcb1cd84c5a61d041ed9e8c343581b7b72b470598 (diff)
downloadqt-creator-bb44837d7c7e1a1ac33d029b3613252b9d4b9f58.tar.gz
Remove usage of QToolBar from debugger tool bar.
Diffstat (limited to 'src/libs/utils/styledbar.cpp')
-rw-r--r--src/libs/utils/styledbar.cpp26
1 files changed, 24 insertions, 2 deletions
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 <QtCore/QVariant>
#include <QtGui/QPainter>
#include <QtGui/QPixmapCache>
+#include <QtGui/QStyle>
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);
+}