Commit 2c10388b authored by Waqar Ahmed's avatar Waqar Ahmed Committed by Christoph Cullmann
Browse files

Use KColorScheme shades for changed lines color


(cherry picked from commit 231f95a6)
parent d3d96068
......@@ -7,6 +7,7 @@
#include "kateprojectpluginview.h"
#include "kateprojectworker.h"
#include <KColorScheme>
#include <QPainter>
#include <QProcess>
#include <QStyledItemDelegate>
......@@ -56,7 +57,7 @@ public:
// don't draw over icon
r.setX(r.x() + option.decorationSize.width() + 5);
auto &fm = options.fontMetrics;
const QFontMetrics &fm = options.fontMetrics;
// adds width
int aw = fm.horizontalAdvance(adds);
......@@ -72,8 +73,9 @@ public:
painter->drawText(r, Qt::AlignVCenter, filename);
static constexpr auto red = QColor(237, 21, 21); // Breeze Danger Red
static constexpr auto green = QColor(17, 209, 27); // Breeze Verdant Green
KColorScheme c;
const auto red = c.shade(c.foreground(KColorScheme::NegativeText).color(), KColorScheme::MidlightShade, 1);
const auto green = c.shade(c.foreground(KColorScheme::PositiveText).color(), KColorScheme::MidlightShade, 1);
r.setX(r.x() + totalw);
painter->setPen(green);
......
......@@ -15,6 +15,7 @@
#include "pushpulldialog.h"
#include "stashdialog.h"
#include <KColorScheme>
#include <QContextMenuEvent>
#include <QCoreApplication>
#include <QDebug>
......@@ -96,8 +97,9 @@ public:
int mw = r.width() - (ha + hs + hS);
r.setX(r.x() + mw);
static constexpr auto red = QColor(237, 21, 21); // Breeze Danger Red
static constexpr auto green = QColor(17, 209, 27); // Breeze Verdant Green
KColorScheme c;
const auto red = c.shade(c.foreground(KColorScheme::NegativeText).color(), KColorScheme::MidlightShade, 1);
const auto green = c.shade(c.foreground(KColorScheme::PositiveText).color(), KColorScheme::MidlightShade, 1);
painter->setPen(green);
painter->drawText(r, Qt::AlignVCenter, add);
......
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