Making title and subtitle obey missing information colors
This commit is contained in:
parent
10d1440f5d
commit
8bc07e20ca
1 changed files with 50 additions and 20 deletions
|
@ -250,13 +250,42 @@ ColumnLayout {
|
||||||
|
|
||||||
implicitWidth: libraryList.width
|
implicitWidth: libraryList.width
|
||||||
height: selectedLibrary == libraryType ? 50 : 0
|
height: selectedLibrary == libraryType ? 50 : 0
|
||||||
text: title
|
|
||||||
|
|
||||||
Controls.Label {
|
Controls.Label {
|
||||||
anchors.top: parent.verticalCenter
|
id: itemTitle
|
||||||
anchors.topMargin: Kirigami.Units.gridUnit / 2
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: Kirigami.Units.smallSpacing
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: Kirigami.Units.gridUnit * 1.7
|
anchors.leftMargin: Kirigami.Units.gridUnit * 1.7
|
||||||
|
width: parent.width - Kirigami.Units.gridUnit * 3.5
|
||||||
|
|
||||||
|
text: title
|
||||||
|
elide: Text.ElideRight
|
||||||
|
|
||||||
|
color: {
|
||||||
|
if (selectedLibrary == "song")
|
||||||
|
Kirigami.Theme.textColor;
|
||||||
|
else if (fileValidation) {
|
||||||
|
Kirigami.Theme.textColor;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
"red"
|
||||||
|
}
|
||||||
|
|
||||||
|
Binding on color {
|
||||||
|
when: dragHandler.containsMouse ||
|
||||||
|
(selectionModel.hasSelection &&
|
||||||
|
selectionModel.isSelected(proxyModel.idx(index)))
|
||||||
|
value: Kirigami.Theme.highlightedTextColor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Controls.Label {
|
||||||
|
id: itemSubtitle
|
||||||
|
anchors.top: itemTitle.bottom
|
||||||
|
anchors.topMargin: Kirigami.Units.smallSpacing
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: Kirigami.Units.gridUnit * 1.7
|
||||||
|
width: parent.width - Kirigami.Units.gridUnit * 3.5
|
||||||
font.pointSize: 9
|
font.pointSize: 9
|
||||||
text: {
|
text: {
|
||||||
if (libraryType == "song")
|
if (libraryType == "song")
|
||||||
|
@ -267,28 +296,29 @@ ColumnLayout {
|
||||||
"file is missing";
|
"file is missing";
|
||||||
}
|
}
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
|
||||||
|
color: {
|
||||||
|
if (selectedLibrary == "song")
|
||||||
|
Kirigami.Theme.textColor;
|
||||||
|
else if (fileValidation) {
|
||||||
|
Kirigami.Theme.textColor;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
"red"
|
||||||
|
}
|
||||||
|
|
||||||
|
Binding on color {
|
||||||
|
when: dragHandler.containsMouse ||
|
||||||
|
(selectionModel.hasSelection &&
|
||||||
|
selectionModel.isSelected(proxyModel.idx(index)))
|
||||||
|
value: Kirigami.Theme.highlightedTextColor
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
icon.source: itemIcon
|
icon.source: itemIcon
|
||||||
icon.width: Kirigami.Units.gridUnit
|
icon.width: Kirigami.Units.gridUnit
|
||||||
icon.height: Kirigami.Units.gridUnit
|
icon.height: Kirigami.Units.gridUnit
|
||||||
/* supportsMouseEvents: false */
|
/* supportsMouseEvents: false */
|
||||||
/* textColor: { */
|
|
||||||
/* if (selectedLibrary == "song") */
|
|
||||||
/* Kirigami.Theme.textColor; */
|
|
||||||
/* else if (fileValidation) { */
|
|
||||||
/* Kirigami.Theme.textColor; */
|
|
||||||
/* } */
|
|
||||||
/* else */
|
|
||||||
/* "red" */
|
|
||||||
/* } */
|
|
||||||
|
|
||||||
/* Binding on textColor { */
|
|
||||||
/* when: dragHandler.containsMouse || */
|
|
||||||
/* (selectionModel.hasSelection && */
|
|
||||||
/* selectionModel.isSelected(proxyModel.idx(index))) */
|
|
||||||
/* value: Kirigami.Theme.highlightedTextColor */
|
|
||||||
/* } */
|
|
||||||
|
|
||||||
Behavior on height {
|
Behavior on height {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue