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
|
||||
height: selectedLibrary == libraryType ? 50 : 0
|
||||
text: title
|
||||
|
||||
Controls.Label {
|
||||
anchors.top: parent.verticalCenter
|
||||
anchors.topMargin: Kirigami.Units.gridUnit / 2
|
||||
id: itemTitle
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Kirigami.Units.smallSpacing
|
||||
anchors.left: parent.left
|
||||
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
|
||||
text: {
|
||||
if (libraryType == "song")
|
||||
|
@ -267,28 +296,29 @@ ColumnLayout {
|
|||
"file is missing";
|
||||
}
|
||||
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.width: Kirigami.Units.gridUnit
|
||||
icon.height: Kirigami.Units.gridUnit
|
||||
/* 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 {
|
||||
NumberAnimation {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue