Adjust UI

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

@ -21,7 +21,10 @@ Item {
height: mainLayout.childrenRect.height + FishUI.Units.smallSpacing height: mainLayout.childrenRect.height + FishUI.Units.smallSpacing
enabled: opacity !== 0 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 { ShaderEffectSource {
id: shaderEffect id: shaderEffect
@ -63,7 +66,7 @@ Item {
Item { Item {
width: FishUI.Units.smallSpacing width: FishUI.Units.smallSpacing
height: 30 height: 40
} }
Item { Item {

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

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

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

Loading…
Cancel
Save