Commit 54b2ab71 authored by Jens Bache-Wiig's avatar Jens Bache-Wiig
Browse files

Color tweaks

parent 7899a273
...@@ -61,6 +61,9 @@ public: ...@@ -61,6 +61,9 @@ public:
static QColor buttonTextColor() { return QColor(0x4c4c4c); } static QColor buttonTextColor() { return QColor(0x4c4c4c); }
static QColor mergedColors(const QColor &colorA, const QColor &colorB, int factor = 50); static QColor mergedColors(const QColor &colorA, const QColor &colorB, int factor = 50);
static QColor sidebarHighlight() { return QColor(255, 255, 255, 40); }
static QColor sidebarShadow() { return QColor(0, 0, 0, 40); }
// Sets the base color and makes sure all top level widgets are updated // Sets the base color and makes sure all top level widgets are updated
static void setBaseColor(const QColor &color); static void setBaseColor(const QColor &color);
......
...@@ -198,8 +198,8 @@ void FancyActionBar::paintEvent(QPaintEvent *event) ...@@ -198,8 +198,8 @@ void FancyActionBar::paintEvent(QPaintEvent *event)
{ {
QPainter painter(this); QPainter painter(this);
Q_UNUSED(event) Q_UNUSED(event)
QColor light = QColor(255, 255, 255, 40); QColor light = Utils::StyleHelper::sidebarHighlight();
QColor dark = QColor(0, 0, 0, 60); QColor dark = Utils::StyleHelper::sidebarShadow();
painter.setPen(dark); painter.setPen(dark);
painter.drawLine(rect().topLeft(), rect().topRight()); painter.drawLine(rect().topLeft(), rect().topRight());
painter.setPen(light); painter.setPen(light);
......
...@@ -57,8 +57,8 @@ void FancyTab::fadeIn() ...@@ -57,8 +57,8 @@ void FancyTab::fadeIn()
{ {
QPropertyAnimation *animation; QPropertyAnimation *animation;
animation = new QPropertyAnimation(this, "fader"); animation = new QPropertyAnimation(this, "fader");
animation->setDuration(160); animation->setDuration(90);
animation->setEndValue(25); animation->setEndValue(50);
animation->start(QAbstractAnimation::DeleteWhenStopped); animation->start(QAbstractAnimation::DeleteWhenStopped);
} }
...@@ -66,7 +66,7 @@ void FancyTab::fadeOut() ...@@ -66,7 +66,7 @@ void FancyTab::fadeOut()
{ {
QPropertyAnimation *animation; QPropertyAnimation *animation;
animation = new QPropertyAnimation(this, "fader"); animation = new QPropertyAnimation(this, "fader");
animation->setDuration(225); animation->setDuration(185);
animation->setEndValue(0); animation->setEndValue(0);
animation->start(QAbstractAnimation::DeleteWhenStopped); animation->start(QAbstractAnimation::DeleteWhenStopped);
} }
...@@ -451,7 +451,7 @@ void FancyTabWidget::paintEvent(QPaintEvent *event) ...@@ -451,7 +451,7 @@ void FancyTabWidget::paintEvent(QPaintEvent *event)
painter.setPen(Utils::StyleHelper::borderColor()); painter.setPen(Utils::StyleHelper::borderColor());
painter.drawLine(rect.topRight(), rect.bottomRight()); painter.drawLine(rect.topRight(), rect.bottomRight());
QColor light = QColor(255, 255, 255, 40); QColor light = Utils::StyleHelper::sidebarHighlight();
painter.setPen(light); painter.setPen(light);
painter.drawLine(rect.bottomLeft(), rect.bottomRight()); painter.drawLine(rect.bottomLeft(), rect.bottomRight());
setContentsMargins(0, 0, 0, 1); setContentsMargins(0, 0, 0, 1);
......
...@@ -836,7 +836,7 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt ...@@ -836,7 +836,7 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
// Note: This is a hack to determine if the // Note: This is a hack to determine if the
// toolbar should draw the top or bottom outline // toolbar should draw the top or bottom outline
// (needed for the find toolbar for instance) // (needed for the find toolbar for instance)
QColor lighter(255, 255, 255, 40); QColor lighter(Utils::StyleHelper::sidebarHighlight());
if (widget && widget->property("topBorder").toBool()) { if (widget && widget->property("topBorder").toBool()) {
painter->drawLine(rect.topLeft(), rect.topRight()); painter->drawLine(rect.topLeft(), rect.topRight());
painter->setPen(lighter); painter->setPen(lighter);
......
...@@ -146,10 +146,10 @@ void ProgressBar::paintEvent(QPaintEvent *) ...@@ -146,10 +146,10 @@ void ProgressBar::paintEvent(QPaintEvent *)
// Draw separator // Draw separator
int h = fm.height(); int h = fm.height();
p.setPen(QColor(0, 0, 0, 70)); p.setPen(Utils::StyleHelper::sidebarShadow());
p.drawLine(0,0, size().width(), 0); p.drawLine(0,0, size().width(), 0);
p.setPen(QColor(255, 255, 255, 70)); p.setPen(Utils::StyleHelper::sidebarHighlight());
p.drawLine(0, 1, size().width(), 1); p.drawLine(0, 1, size().width(), 1);
QRect textRect = rect().adjusted(0, 0, -1, 0); QRect textRect = rect().adjusted(0, 0, -1, 0);
......
...@@ -48,7 +48,7 @@ BuildProgress::BuildProgress(TaskWindow *taskWindow) ...@@ -48,7 +48,7 @@ BuildProgress::BuildProgress(TaskWindow *taskWindow)
m_taskWindow(taskWindow) m_taskWindow(taskWindow)
{ {
QVBoxLayout *layout = new QVBoxLayout; QVBoxLayout *layout = new QVBoxLayout;
layout->setContentsMargins(8, 2, 0, 2); layout->setContentsMargins(8, 4, 0, 4);
layout->setSpacing(2); layout->setSpacing(2);
setLayout(layout); setLayout(layout);
QHBoxLayout *errorLayout = new QHBoxLayout; QHBoxLayout *errorLayout = new QHBoxLayout;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment