Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Modules/Keystone/Hub/HubContent.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ Item {
property var screen: null
property int currentIndex: 0
readonly property var dashboardGlassItems: dashboardContent.holeGlassItems
// Hub media tab shows its own lyrics view; when it is open the surface is
// a read-only display and must not claim exclusive keyboard focus.
readonly property bool mediaLyricsActive:
currentIndex === 1 && mediaContent.showLyrics

signal closeRequested()
signal avatarEditRequested()
Expand Down Expand Up @@ -177,6 +181,8 @@ Item {
}

Media {
id: mediaContent

player: root.player
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
Expand Down
55 changes: 38 additions & 17 deletions Modules/Keystone/LyricsContent/HorizontalLyricsLayout.qml
Original file line number Diff line number Diff line change
Expand Up @@ -52,34 +52,55 @@ Item {
readonly property bool isCurrent: index === root.currentLineIndex

width: ListView.view.width
height: 42
height: modelData.translation ? 52 : 42
onIsCurrentChanged: {
if (isCurrent)
root.currentTextWidth = Math.max(root.defaultTextWidth, Math.min(lyricText.implicitWidth, 800));

}

Text {
id: lyricText

Column {
anchors.centerIn: parent
text: parent.modelData.text
color: Appearance.m3colors.darkmode ? "white" : "black"
font.family: Fonts.ui
font.pixelSize: 15
font.weight: Font.Bold
elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter

Behavior on color {
ColorAnimation {
duration: Appearance.animation.expressiveFastEffects.duration
easing.type: Appearance.animation.expressiveFastEffects.type
easing.bezierCurve: Appearance.animation.expressiveFastEffects.bezierCurve
anchors.verticalCenterOffset: modelData.translation ? -4 : 0
width: parent.width
spacing: 1

Text {
id: lyricText

anchors.horizontalCenter: parent.horizontalCenter
width: parent.width
text: modelData.text
color: Appearance.m3colors.darkmode ? "white" : "black"
font.family: Fonts.ui
font.pixelSize: 15
font.weight: Font.Bold
elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter

Behavior on color {
ColorAnimation {
duration: Appearance.animation.expressiveFastEffects.duration
easing.type: Appearance.animation.expressiveFastEffects.type
easing.bezierCurve: Appearance.animation.expressiveFastEffects.bezierCurve
}

}

}

Text {
visible: modelData.translation !== undefined && modelData.translation !== ""
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width
text: modelData.translation || ""
color: Appearance.applyAlpha(Appearance.m3colors.darkmode ? "white" : "black", 0.6)
font.family: Fonts.ui
font.pixelSize: 12
font.weight: Font.Normal
elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter
}
}

}
Expand Down
69 changes: 50 additions & 19 deletions Modules/Keystone/Media/Media.qml
Original file line number Diff line number Diff line change
Expand Up @@ -357,28 +357,59 @@ Item {
}
}

Text {
id: lyricText
Column {
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
text: modelData.text || ""
color: !root.synchronizedLyrics
? "#ddffffff"
: (lyricDelegate.activeLine
? "white"
: (lyricDelegate.hovered ? "#ddffffff" : "#99ffffff"))
font.family: Fonts.ui
font.pixelSize: 18
font.bold: true
horizontalAlignment: Text.AlignLeft
wrapMode: Text.WordWrap

Behavior on color {
ColorAnimation {
duration: Appearance.animation.expressiveFastEffects.duration
easing.type: Appearance.animation.expressiveFastEffects.type
easing.bezierCurve: Appearance.animation.expressiveFastEffects.bezierCurve
spacing: 2

Text {
id: lyricText
anchors.left: parent.left
anchors.right: parent.right
text: modelData.text || ""
color: !root.synchronizedLyrics
? "#ddffffff"
: (lyricDelegate.activeLine
? "white"
: (lyricDelegate.hovered ? "#ddffffff" : "#99ffffff"))
font.family: Fonts.ui
font.pixelSize: 18
font.bold: true
horizontalAlignment: Text.AlignLeft
wrapMode: Text.WordWrap

Behavior on color {
ColorAnimation {
duration: Appearance.animation.expressiveFastEffects.duration
easing.type: Appearance.animation.expressiveFastEffects.type
easing.bezierCurve: Appearance.animation.expressiveFastEffects.bezierCurve
}
}
}

Text {
anchors.left: parent.left
anchors.right: parent.right
visible: modelData.translation !== undefined && modelData.translation !== ""
text: modelData.translation || ""
color: !root.synchronizedLyrics
? "#99ffffff"
: (lyricDelegate.activeLine ? "#ddffffff" : "#77ffffff")
font.family: Fonts.ui
font.pixelSize: 13
font.bold: false
horizontalAlignment: Text.AlignLeft
wrapMode: Text.WordWrap
elide: Text.ElideRight
maximumLineCount: 2

Behavior on color {
ColorAnimation {
duration: Appearance.animation.expressiveFastEffects.duration
easing.type: Appearance.animation.expressiveFastEffects.type
easing.bezierCurve: Appearance.animation.expressiveFastEffects.bezierCurve
}
}
}
}
Expand Down
13 changes: 10 additions & 3 deletions Modules/Keystone/Styles/Shared/KeystoneSurface.qml
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,10 @@ Variants {
property bool isNotifMode: !contentPresentationActive && NotificationManager.hasNotifs && !expanded && !showVolume && !isHubMode && !isToolsMode && !isLyricsMode
property bool isCollapsedMode: !contentPresentationActive && !expanded && !isNotifMode && !isVolumeMode && !isLyricsMode && !isHubMode && !isToolsMode
property bool isCollapsedHovered: isCollapsedMode && (keystoneMouseArea.containsMouse || collapsedInputArea.containsMouse)
property bool hasClosablePopup: !contentPresentationActive && (expanded || isLyricsMode || isHubMode || isToolsMode)
readonly property bool hubLyricsActive: isHubMode && hub.mediaLyricsActive
property bool hasClosablePopup: !contentPresentationActive
&& !root.hubLyricsActive
&& (expanded || isHubMode || isToolsMode)
readonly property bool dashboardTabActive: isHubMode && hubTabIndex === 0
readonly property bool showDashboardHole: dashboardTabActive
property real pillMorphProgress: 0
Expand Down Expand Up @@ -1133,8 +1136,12 @@ Variants {
root.expanded = false;

} else {
if (root.isLyricsMode || root.isHubMode || root.isToolsMode)
return ;
if (root.isLyricsMode) {
root.showLyrics = false;
return;
}
if (root.isHubMode || root.isToolsMode)
return;

root.expanded = !root.expanded;
}
Expand Down
Loading