Commit 9c810407 authored by Matthieu Gallien's avatar Matthieu Gallien 🎵
Browse files

remove a lot of hardcoded color and use SystemPalette

parent 143ba9c6
......@@ -6,7 +6,7 @@
* Author: Aurélien Gâteau
* License: BSD
*/
import QtQuick 2.0
import QtQuick 2.5
Item {
id: root
......@@ -35,6 +35,11 @@ Item {
contentItem.parent = contentItemWrapper;
}
SystemPalette {
id: myPalette
colorGroup: SystemPalette.Active
}
Rectangle {
id: topPlaceholder
anchors {
......@@ -43,7 +48,7 @@ Item {
top: parent.top
}
height: 0
color: "lightgrey"
color: myPalette.light
}
Item {
......@@ -88,7 +93,7 @@ Item {
top: wrapperParent.bottom
}
height: 0
color: "lightgrey"
color: myPalette.mid
}
SmoothedAnimation {
......
......@@ -23,12 +23,17 @@ Item {
sourceSize.width: parent.width
//sourceSize.height: parent.height
SystemPalette {
id: myPalette
colorGroup: SystemPalette.Active
}
Label {
anchors.bottom: parent.bottom
anchors.right: parent.right
text: i18nc("Copyright text shown for an image", "by Edward Betts (Own work) [CC BY-SA 3.0]")
color: 'white'
color: myPalette.highlightedText
opacity: 0.4
}
......@@ -97,7 +102,7 @@ Item {
Layout.fillWidth: true
Layout.alignment: Qt.AlignLeft
elide: "ElideRight"
color: 'white'
color: myPalette.highlightedText
}
Item {
......@@ -110,7 +115,7 @@ Item {
Layout.fillWidth: true
Layout.alignment: Qt.AlignLeft
elide: "ElideRight"
color: 'white'
color: myPalette.highlightedText
}
Item {
......@@ -123,7 +128,7 @@ Item {
Layout.fillWidth: true
Layout.alignment: Qt.AlignLeft
elide: "ElideRight"
color: 'white'
color: myPalette.highlightedText
}
Item {
......@@ -154,7 +159,7 @@ Item {
Layout.alignment: Qt.AlignRight | Qt.AlignBottom
elide: "ElideRight"
visible: tracksCount > 0
color: 'white'
color: myPalette.highlightedText
}
Item {
......
......@@ -40,6 +40,11 @@ Item {
width: stackView.width
height: stackView.height
SystemPalette {
id: myPalette
colorGroup: SystemPalette.Active
}
Component {
id: rowDelegate
......@@ -47,7 +52,7 @@ Item {
id: rowDelegateContent
height: Screen.pixelDensity * 15.
Rectangle {
color: "#FFFFFF"
color: myPalette.base
anchors.fill: parent
}
}
......@@ -85,8 +90,8 @@ Item {
Rectangle {
border.width: 1
border.color: "#DDDDDD"
color: "#DDDDDD"
border.color: myPalette.mid
color: myPalette.mid
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
......
......@@ -35,6 +35,11 @@ Item {
id: topItem
SystemPalette {
id: myPalette
colorGroup: SystemPalette.Active
}
Component {
id: rowDelegate
......@@ -111,8 +116,8 @@ Item {
Rectangle {
border.width: 1
border.color: "#DDDDDD"
color: "#DDDDDD"
border.color: myPalette.mid
color: myPalette.mid
Layout.fillWidth: true
Layout.preferredHeight: 1
......
......@@ -44,8 +44,13 @@ Item {
id: musicWidget
SystemPalette {
id: myPalette
colorGroup: SystemPalette.Active
}
Rectangle {
color: '#C5CBD1'
color: myPalette.mid
width: parent.width
height: parent.height
......
......@@ -43,6 +43,11 @@ ApplicationWindow {
title: 'Elisa'
SystemPalette {
id: myPalette
colorGroup: SystemPalette.Active
}
Settings {
id: persistentSettings
......@@ -243,7 +248,7 @@ ApplicationWindow {
}
Rectangle {
color: "white"
color: myPalette.base
anchors.fill: parent
ColumnLayout {
......@@ -300,7 +305,7 @@ ApplicationWindow {
spacing: 0
Rectangle {
color: '#EFF0F1'
color: myPalette.window
Layout.fillHeight: true
Layout.preferredWidth: Screen.pixelDensity * 50.
......@@ -319,7 +324,7 @@ ApplicationWindow {
z: 2
rowDelegate: Rectangle {
color: '#EFF0F1'
color: myPalette.window
height: Screen.pixelDensity * 8.
width: viewModeView.width
......@@ -340,10 +345,7 @@ ApplicationWindow {
itemDelegate: Rectangle {
height: Screen.pixelDensity * 8.
width: viewModeView.width
color: if (styleData.selected)
'#3DAEE9'
else
'#EFF0F1'
color: (styleData.selected ? myPalette.highlight : myPalette.window)
Label {
id: nameLabel
anchors.verticalCenter: parent.verticalCenter
......@@ -355,10 +357,7 @@ ApplicationWindow {
text: model.name
color: if (styleData.selected)
'white'
else
'black'
color: (styleData.selected ? myPalette.highlightedText : myPalette.text)
}
}
......@@ -428,8 +427,8 @@ ApplicationWindow {
id: firstViewSeparatorItem
border.width: 1
border.color: "#DDDDDD"
color: "#DDDDDD"
border.color: myPalette.mid
color: myPalette.mid
visible: true
Layout.bottomMargin: Screen.pixelDensity * 0.5
......@@ -471,8 +470,8 @@ ApplicationWindow {
id: viewSeparatorItem
border.width: 1
border.color: "#DDDDDD"
color: "#DDDDDD"
border.color: myPalette.mid
color: myPalette.mid
visible: Layout.minimumWidth != 0
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
......
......@@ -37,6 +37,11 @@ Item {
id: rootElement
SystemPalette {
id: myPalette
colorGroup: SystemPalette.Active
}
AlbumFilterProxyModel {
id: filterProxyModel
......@@ -52,7 +57,7 @@ Item {
delegate: Rectangle {
id: mediaServerEntry
color: 'white'
color: myPalette.base
width: contentDirectoryView.cellWidth
height: contentDirectoryView.cellHeight
......@@ -93,8 +98,8 @@ Item {
anchors.fill: parent
color: 'black'
opacity: 0.7
color: myPalette.dark
opacity: 0.85
BrightnessContrast {
anchors.fill: playAction
......@@ -254,7 +259,7 @@ Item {
}
Rectangle {
color: 'white'
color: myPalette.base
Layout.fillHeight: true
Layout.fillWidth: true
......
......@@ -17,16 +17,23 @@
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.4
import QtQuick 2.5
import QtQuick.Layouts 1.2
import QtQuick.Controls 1.2
import QtQuick.Window 2.2
import QtGraphicalEffects 1.0
import org.mgallien.QmlExtension 1.0
Item {
Rectangle {
id: viewAlbumDelegate
SystemPalette {
id: myPalette
colorGroup: SystemPalette.Active
}
color: myPalette.base
property string title
property string artist
property string album
......@@ -189,8 +196,8 @@ Item {
id: entrySeparatorItem
border.width: 0.5
border.color: "#DDDDDD"
color: "#DDDDDD"
border.color: myPalette.mid
color: myPalette.mid
visible: true
anchors.bottom: parent.bottom
......
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