|
|
@ -3,10 +3,9 @@ |
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later |
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later |
|
|
|
|
|
|
|
|
|
|
|
import ".." |
|
|
|
import ".." |
|
|
|
import QtQuick 2.15 |
|
|
|
import QtQuick |
|
|
|
import QtQuick.Controls 2.15 |
|
|
|
import QtQuick.Layouts |
|
|
|
import QtQuick.Layouts 1.15 |
|
|
|
import im.nheko |
|
|
|
import im.nheko 1.0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
Rectangle { |
|
|
|
id: tile |
|
|
|
id: tile |
|
|
@ -36,13 +35,14 @@ Rectangle { |
|
|
|
when: hovered.hovered && !(index == selectedIndex) |
|
|
|
when: hovered.hovered && !(index == selectedIndex) |
|
|
|
|
|
|
|
|
|
|
|
PropertyChanges { |
|
|
|
PropertyChanges { |
|
|
|
target: tile |
|
|
|
tile { |
|
|
|
background: palette.dark |
|
|
|
background: palette.dark |
|
|
|
importantText: palette.brightText |
|
|
|
importantText: palette.brightText |
|
|
|
unimportantText: palette.brightText |
|
|
|
unimportantText: palette.brightText |
|
|
|
bubbleBackground: palette.highlight |
|
|
|
bubbleBackground: palette.highlight |
|
|
|
bubbleText: palette.highlightedText |
|
|
|
bubbleText: palette.highlightedText |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
State { |
|
|
|
State { |
|
|
@ -50,13 +50,14 @@ Rectangle { |
|
|
|
when: index == selectedIndex |
|
|
|
when: index == selectedIndex |
|
|
|
|
|
|
|
|
|
|
|
PropertyChanges { |
|
|
|
PropertyChanges { |
|
|
|
target: tile |
|
|
|
tile { |
|
|
|
background: palette.highlight |
|
|
|
background: palette.highlight |
|
|
|
importantText: palette.highlightedText |
|
|
|
importantText: palette.highlightedText |
|
|
|
unimportantText: palette.highlightedText |
|
|
|
unimportantText: palette.highlightedText |
|
|
|
bubbleBackground: palette.highlightedText |
|
|
|
bubbleBackground: palette.highlightedText |
|
|
|
bubbleText: palette.highlight |
|
|
|
bubbleText: palette.highlight |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
] |
|
|
@ -75,8 +76,8 @@ Rectangle { |
|
|
|
|
|
|
|
|
|
|
|
enabled: false |
|
|
|
enabled: false |
|
|
|
Layout.alignment: Qt.AlignVCenter |
|
|
|
Layout.alignment: Qt.AlignVCenter |
|
|
|
height: avatarSize |
|
|
|
implicitHeight: avatarSize |
|
|
|
width: avatarSize |
|
|
|
implicitWidth: avatarSize |
|
|
|
url: tile.avatarUrl.replace("mxc://", "image://MxcImage/") |
|
|
|
url: tile.avatarUrl.replace("mxc://", "image://MxcImage/") |
|
|
|
displayName: title |
|
|
|
displayName: title |
|
|
|
crop: tile.crop |
|
|
|
crop: tile.crop |
|
|
@ -88,7 +89,6 @@ Rectangle { |
|
|
|
Layout.alignment: Qt.AlignLeft |
|
|
|
Layout.alignment: Qt.AlignLeft |
|
|
|
Layout.fillWidth: true |
|
|
|
Layout.fillWidth: true |
|
|
|
Layout.minimumWidth: 100 |
|
|
|
Layout.minimumWidth: 100 |
|
|
|
width: parent.width - avatar.width |
|
|
|
|
|
|
|
Layout.preferredWidth: parent.width - avatar.width |
|
|
|
Layout.preferredWidth: parent.width - avatar.width |
|
|
|
spacing: Nheko.paddingSmall |
|
|
|
spacing: Nheko.paddingSmall |
|
|
|
|
|
|
|
|
|
|
|