From 54b2ab71905b973be21f98f719ceb51ed37924b6 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig <jbache@trolltech.com> Date: Thu, 18 Feb 2010 11:41:58 +0100 Subject: [PATCH] Color tweaks --- src/libs/utils/stylehelper.h | 3 +++ src/plugins/coreplugin/fancyactionbar.cpp | 4 ++-- src/plugins/coreplugin/fancytabwidget.cpp | 8 ++++---- src/plugins/coreplugin/manhattanstyle.cpp | 2 +- src/plugins/coreplugin/progressmanager/progresspie.cpp | 4 ++-- src/plugins/projectexplorer/buildprogress.cpp | 2 +- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/libs/utils/stylehelper.h b/src/libs/utils/stylehelper.h index 10b47c9cf9e..bb52a940b1c 100644 --- a/src/libs/utils/stylehelper.h +++ b/src/libs/utils/stylehelper.h @@ -61,6 +61,9 @@ public: static QColor buttonTextColor() { return QColor(0x4c4c4c); } 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 static void setBaseColor(const QColor &color); diff --git a/src/plugins/coreplugin/fancyactionbar.cpp b/src/plugins/coreplugin/fancyactionbar.cpp index c62e695d88d..498773e9d58 100644 --- a/src/plugins/coreplugin/fancyactionbar.cpp +++ b/src/plugins/coreplugin/fancyactionbar.cpp @@ -198,8 +198,8 @@ void FancyActionBar::paintEvent(QPaintEvent *event) { QPainter painter(this); Q_UNUSED(event) - QColor light = QColor(255, 255, 255, 40); - QColor dark = QColor(0, 0, 0, 60); + QColor light = Utils::StyleHelper::sidebarHighlight(); + QColor dark = Utils::StyleHelper::sidebarShadow(); painter.setPen(dark); painter.drawLine(rect().topLeft(), rect().topRight()); painter.setPen(light); diff --git a/src/plugins/coreplugin/fancytabwidget.cpp b/src/plugins/coreplugin/fancytabwidget.cpp index e63dd9e1ed1..0d73ad604ba 100644 --- a/src/plugins/coreplugin/fancytabwidget.cpp +++ b/src/plugins/coreplugin/fancytabwidget.cpp @@ -57,8 +57,8 @@ void FancyTab::fadeIn() { QPropertyAnimation *animation; animation = new QPropertyAnimation(this, "fader"); - animation->setDuration(160); - animation->setEndValue(25); + animation->setDuration(90); + animation->setEndValue(50); animation->start(QAbstractAnimation::DeleteWhenStopped); } @@ -66,7 +66,7 @@ void FancyTab::fadeOut() { QPropertyAnimation *animation; animation = new QPropertyAnimation(this, "fader"); - animation->setDuration(225); + animation->setDuration(185); animation->setEndValue(0); animation->start(QAbstractAnimation::DeleteWhenStopped); } @@ -451,7 +451,7 @@ void FancyTabWidget::paintEvent(QPaintEvent *event) painter.setPen(Utils::StyleHelper::borderColor()); painter.drawLine(rect.topRight(), rect.bottomRight()); - QColor light = QColor(255, 255, 255, 40); + QColor light = Utils::StyleHelper::sidebarHighlight(); painter.setPen(light); painter.drawLine(rect.bottomLeft(), rect.bottomRight()); setContentsMargins(0, 0, 0, 1); diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp index 95f0a4cdb8d..67ba51ade45 100644 --- a/src/plugins/coreplugin/manhattanstyle.cpp +++ b/src/plugins/coreplugin/manhattanstyle.cpp @@ -836,7 +836,7 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt // Note: This is a hack to determine if the // toolbar should draw the top or bottom outline // (needed for the find toolbar for instance) - QColor lighter(255, 255, 255, 40); + QColor lighter(Utils::StyleHelper::sidebarHighlight()); if (widget && widget->property("topBorder").toBool()) { painter->drawLine(rect.topLeft(), rect.topRight()); painter->setPen(lighter); diff --git a/src/plugins/coreplugin/progressmanager/progresspie.cpp b/src/plugins/coreplugin/progressmanager/progresspie.cpp index 59929d437fe..45aa71eac84 100644 --- a/src/plugins/coreplugin/progressmanager/progresspie.cpp +++ b/src/plugins/coreplugin/progressmanager/progresspie.cpp @@ -146,10 +146,10 @@ void ProgressBar::paintEvent(QPaintEvent *) // Draw separator int h = fm.height(); - p.setPen(QColor(0, 0, 0, 70)); + p.setPen(Utils::StyleHelper::sidebarShadow()); 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); QRect textRect = rect().adjusted(0, 0, -1, 0); diff --git a/src/plugins/projectexplorer/buildprogress.cpp b/src/plugins/projectexplorer/buildprogress.cpp index 865fad58c15..9b38cb89f22 100644 --- a/src/plugins/projectexplorer/buildprogress.cpp +++ b/src/plugins/projectexplorer/buildprogress.cpp @@ -48,7 +48,7 @@ BuildProgress::BuildProgress(TaskWindow *taskWindow) m_taskWindow(taskWindow) { QVBoxLayout *layout = new QVBoxLayout; - layout->setContentsMargins(8, 2, 0, 2); + layout->setContentsMargins(8, 4, 0, 4); layout->setSpacing(2); setLayout(layout); QHBoxLayout *errorLayout = new QHBoxLayout; -- GitLab