MiniSplitter: Make it actually themable via SplitterColor

The CE_Splitter drawControl code in ManhattanStyle wasn't used. This
patch removes it, changes MiniPliter::onPaint to use the theme color,
and adjusts dark.creatortheme's SplitterColor so that actually nothing
changes visually.

Change-Id: I0b94bd2125fd037c2c21dad195f31d092332db43
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
This commit is contained in:
Alessandro Portale
2015-12-08 11:17:35 +01:00
parent 957c0af570
commit b327f1a78c
3 changed files with 6 additions and 9 deletions

View File

@@ -31,6 +31,7 @@
#include "minisplitter.h"
#include <utils/stylehelper.h>
#include <utils/theme/theme.h>
#include <QPaintEvent>
#include <QPainter>
@@ -76,7 +77,10 @@ void MiniSplitterHandle::resizeEvent(QResizeEvent *event)
void MiniSplitterHandle::paintEvent(QPaintEvent *event)
{
QPainter painter(this);
painter.fillRect(event->rect(), Utils::StyleHelper::borderColor(m_lightColored));
const QColor color = m_lightColored
? Utils::StyleHelper::borderColor(m_lightColored)
: Utils::creatorTheme()->color(Utils::Theme::SplitterColor);
painter.fillRect(event->rect(), color);
}
QSplitterHandle *MiniSplitter::createHandle()