forked from qt-creator/qt-creator
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user