Adjust UI

pull/3/head
reionwong 4 years ago
parent 02157d495b
commit 72ac817c7e

@ -21,7 +21,10 @@ Item {
height: mainLayout.childrenRect.height + FishUI.Units.smallSpacing
enabled: opacity !== 0
visible: mpv.mouseY > rootWindow.height - footer.height && playList.state === "hidden"
// visible: mpv.mouseY > rootWindow.height - footer.height && playList.state === "hidden"
visible: rootWindow.isFullScreen() ? mpv.mouseY > rootWindow.height - rootWindow.header.height - 40
: true
ShaderEffectSource {
id: shaderEffect
@ -63,7 +66,7 @@ Item {
Item {
width: FishUI.Units.smallSpacing
height: 30
height: 40
}
Item {

@ -15,11 +15,11 @@ import mpv 1.0
Item {
id: control
height: mpv.height - FishUI.Units.largeSpacing * 6
height: mpv.height - FishUI.Units.largeSpacing * 2
width: FishUI.Units.gridUnit * 16
z: 9999
x: parent.width
y: rootWindow.header.height + FishUI.Units.largeSpacing
y: FishUI.Units.largeSpacing
state: "hidden"
property string position: "right"

@ -23,11 +23,11 @@ FishUI.Window {
minimumHeight: 450
color: FishUI.Theme.backgroundColor
header.visible: mpv.mouseY >= 0 && mpv.mouseY <= header.height
header.visible: !rootWindow.isFullScreen()
headerBackground.color: FishUI.Theme.secondBackgroundColor
headerBackground.opacity: 0.95
// headerBackground.opacity: 0.95
contentTopMargin: 0
contentTopMargin: header.visible ? header.height : 0
property int preFullScreenVisibility
@ -44,24 +44,25 @@ FishUI.Window {
anchors.top: parent.top
anchors.topMargin: FishUI.Units.smallSpacing * 1.5
anchors.leftMargin: FishUI.Units.largeSpacing
text: mpv.mediaTitle
color: "white"
text: mpv.mediaTitle ? mpv.mediaTitle : qsTr("Video Player")
// color: "white"
color: FishUI.Theme.textColor
z: 100
}
DropShadow {
anchors.fill: headerLabel
source: headerLabel
z: -1
horizontalOffset: 1
verticalOffset: 1
radius: Math.round(6 * FishUI.Units.devicePixelRatio)
samples: radius * 2 + 1
spread: 0.35
color: Qt.rgba(0, 0, 0, 0.5)
opacity: 0.4
visible: true
}
// DropShadow {
// anchors.fill: headerLabel
// source: headerLabel
// z: -1
// horizontalOffset: 1
// verticalOffset: 1
// radius: Math.round(6 * FishUI.Units.devicePixelRatio)
// samples: radius * 2 + 1
// spread: 0.35
// color: Qt.rgba(0, 0, 0, 0.5)
// opacity: 0.4
// visible: true
// }
}
Actions {
@ -70,7 +71,10 @@ FishUI.Window {
MpvVideo {
id: mpv
anchors.fill: parent
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: !rootWindow.isFullScreen() ? footer.top : parent.bottom
Image {
id: _logo
@ -92,6 +96,13 @@ FishUI.Window {
}
}
Footer {
id: footer
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
}
Platform.FileDialog {
id: fileDialog
@ -115,13 +126,6 @@ FishUI.Window {
id: playList
}
Footer {
id: footer
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: mpv.bottom
}
function openFile(path, startPlayback) {
mpv.playlistModel.addVideo(path)
// mpv.playlistModel.clear()

@ -28,6 +28,6 @@ void LockManager::setInhibitionOff()
void LockManager::setInhibitionOn()
{
m_cookie = m_iface->Inhibit(
QStringLiteral("Haruna Video Player"),
QStringLiteral("Cutefish Video Player"),
tr("Playing video."));
}

Loading…
Cancel
Save