From 26ff05b4bda5b44e49ff32bf3eb72ed480617407 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sun, 20 May 2012 20:42:09 +0200 Subject: [PATCH] Export highlight color as context property to decoration list Ensures that decoration list uses the defined highlight color instead of hardcoded value. --- kcmkwin/kwindecoration/kwindecoration.cpp | 1 + kcmkwin/kwindecoration/qml/main.qml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/kcmkwin/kwindecoration/kwindecoration.cpp b/kcmkwin/kwindecoration/kwindecoration.cpp index 286e51b3f0..3445ea7d87 100644 --- a/kcmkwin/kwindecoration/kwindecoration.cpp +++ b/kcmkwin/kwindecoration/kwindecoration.cpp @@ -98,6 +98,7 @@ KWinDecorationModule::KWinDecorationModule(QWidget* parent, const QVariantList & } m_ui->decorationList->rootContext()->setContextProperty("decorationModel", m_proxyModel); m_ui->decorationList->rootContext()->setContextProperty("options", m_decorationButtons); + m_ui->decorationList->rootContext()->setContextProperty("highlightColor", m_ui->decorationList->palette().color(QPalette::Highlight)); m_ui->decorationList->rootContext()->setContextProperty("auroraeSource", KStandardDirs::locate("data", "kwin/aurorae/aurorae.qml")); m_ui->decorationList->setSource(KStandardDirs::locate("data", "kwin/kcm_kwindecoration/main.qml")); diff --git a/kcmkwin/kwindecoration/qml/main.qml b/kcmkwin/kwindecoration/qml/main.qml index 9112b688cf..3aa4330826 100644 --- a/kcmkwin/kwindecoration/qml/main.qml +++ b/kcmkwin/kwindecoration/qml/main.qml @@ -43,7 +43,7 @@ BorderImage { highlight: Rectangle { width: listView.width height: 150 - color: "lightsteelblue" + color: highlightColor opacity: 0.5 } delegate: Item {