Format Code, Fix progress bar overlap on background.
This commit is contained in:
parent
7e04c5c05e
commit
8fbc30e17e
|
@ -1,5 +1,6 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
||||||
pushd $SOURCE_DIR
|
pushd $SOURCE_DIR
|
||||||
find . -name "*.qml" -exec qmlfmt -w {} \;
|
find . -name "*.qml" -exec qmlfmt -w {} \;
|
||||||
find . -name "*.cpp" -o -name "*.hpp" -o -name "*.c" -o -name "*.h" -exec clang-format90 -style mozilla -i {} \;
|
find . -name "*.cpp" -o -name "*.hpp" -o -name "*.c" -o -name "*.h" -exec clang-format90 -style mozilla -i {} \;
|
||||||
popdi i
|
popd
|
||||||
|
|
1
spdlog
1
spdlog
|
@ -1 +0,0 @@
|
||||||
Subproject commit 2b326e90b82f74492229b8d2b27d66d088386e74
|
|
|
@ -38,9 +38,7 @@ Item {
|
||||||
if (component.status == Component.Error) {
|
if (component.status == Component.Error) {
|
||||||
console.error("Error loading component: " + component.errorString())
|
console.error("Error loading component: " + component.errorString())
|
||||||
}
|
}
|
||||||
component.createObject(controlsBar, {
|
component.createObject(controlsBar, {})
|
||||||
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
@ -137,7 +135,6 @@ Item {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottomMargin: 0
|
anchors.bottomMargin: 0
|
||||||
bottomPadding: 0
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,5 @@ Menu {
|
||||||
color: getAppearanceValueForTheme(appearance.themeName,
|
color: getAppearanceValueForTheme(appearance.themeName,
|
||||||
"mainBackground")
|
"mainBackground")
|
||||||
}
|
}
|
||||||
delegate: CustomMenuItem {
|
delegate: CustomMenuItem {}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ Dialog {
|
||||||
var component = Qt.createComponent("ThumbnailProcess.qml")
|
var component = Qt.createComponent("ThumbnailProcess.qml")
|
||||||
var thumbnailerProcess = component.createObject(
|
var thumbnailerProcess = component.createObject(
|
||||||
playlistDialog, {
|
playlistDialog, {
|
||||||
name: thumbnailJobs[0]
|
"name": thumbnailJobs[0]
|
||||||
})
|
})
|
||||||
if (String(titleJobs[0]).indexOf("://") !== -1) {
|
if (String(titleJobs[0]).indexOf("://") !== -1) {
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ Dialog {
|
||||||
}
|
}
|
||||||
var component = Qt.createComponent("TitleProcess.qml")
|
var component = Qt.createComponent("TitleProcess.qml")
|
||||||
var titleProcess = component.createObject(playlistDialog, {
|
var titleProcess = component.createObject(playlistDialog, {
|
||||||
name: titleJobs[0]
|
"name": titleJobs[0]
|
||||||
})
|
})
|
||||||
titleProcess.start("youtube-dl",
|
titleProcess.start("youtube-dl",
|
||||||
["--get-title", titleJobs[0]])
|
["--get-title", titleJobs[0]])
|
||||||
|
@ -107,10 +107,10 @@ Dialog {
|
||||||
for (var thing in playlist) {
|
for (var thing in playlist) {
|
||||||
var item = playlist[thing]
|
var item = playlist[thing]
|
||||||
playlistModel.append({
|
playlistModel.append({
|
||||||
playlistItemTitle: item["title"],
|
"playlistItemTitle": item["title"],
|
||||||
playlistItemFilename: item["filename"],
|
"playlistItemFilename": item["filename"],
|
||||||
current: item["current"],
|
"current": item["current"],
|
||||||
playlistPos: thing
|
"playlistPos": thing
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -212,8 +212,7 @@ Dialog {
|
||||||
id: playlistModel
|
id: playlistModel
|
||||||
}
|
}
|
||||||
delegate: playlistDelegate
|
delegate: playlistDelegate
|
||||||
highlight: Item {
|
highlight: Item {}
|
||||||
}
|
|
||||||
snapMode: ListView.SnapToItem
|
snapMode: ListView.SnapToItem
|
||||||
flickableDirection: Flickable.VerticalFlick
|
flickableDirection: Flickable.VerticalFlick
|
||||||
boundsBehavior: Flickable.StopAtBounds
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
|
|
|
@ -51,31 +51,31 @@ MenuBar {
|
||||||
var component = Qt.createComponent("TrackItem.qml")
|
var component = Qt.createComponent("TrackItem.qml")
|
||||||
if (trackType == "sub") {
|
if (trackType == "sub") {
|
||||||
var action = component.createObject(subMenu, {
|
var action = component.createObject(subMenu, {
|
||||||
text: trackLang,
|
"text": trackLang,
|
||||||
trackID: String(
|
"trackID": String(
|
||||||
trackID),
|
trackID),
|
||||||
trackType: "sid",
|
"trackType": "sid",
|
||||||
checked: track["selected"]
|
"checked": track["selected"]
|
||||||
})
|
})
|
||||||
action.ActionGroup.group = subMenuGroup
|
action.ActionGroup.group = subMenuGroup
|
||||||
subMenu.addAction(action)
|
subMenu.addAction(action)
|
||||||
} else if (trackType == "audio") {
|
} else if (trackType == "audio") {
|
||||||
var action = component.createObject(audioMenu, {
|
var action = component.createObject(audioMenu, {
|
||||||
text: trackTitle + trackLang,
|
"text": trackTitle + trackLang,
|
||||||
trackID: String(
|
"trackID": String(
|
||||||
trackID),
|
trackID),
|
||||||
trackType: "aid",
|
"trackType": "aid",
|
||||||
checked: track["selected"]
|
"checked": track["selected"]
|
||||||
})
|
})
|
||||||
action.ActionGroup.group = audioMenuGroup
|
action.ActionGroup.group = audioMenuGroup
|
||||||
audioMenu.addAction(action)
|
audioMenu.addAction(action)
|
||||||
} else if (trackType == "video") {
|
} else if (trackType == "video") {
|
||||||
var action = component.createObject(videoMenu, {
|
var action = component.createObject(videoMenu, {
|
||||||
text: "Video " + trackID + trackTitle,
|
"text": "Video " + trackID + trackTitle,
|
||||||
trackID: String(
|
"trackID": String(
|
||||||
trackID),
|
trackID),
|
||||||
trackType: "vid",
|
"trackType": "vid",
|
||||||
checked: track["selected"]
|
"checked": track["selected"]
|
||||||
})
|
})
|
||||||
action.ActionGroup.group = videoMenuGroup
|
action.ActionGroup.group = videoMenuGroup
|
||||||
videoMenu.addAction(action)
|
videoMenu.addAction(action)
|
||||||
|
@ -337,8 +337,7 @@ MenuBar {
|
||||||
shortcut: keybinds.mute
|
shortcut: keybinds.mute
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuSeparator {
|
MenuSeparator {}
|
||||||
}
|
|
||||||
|
|
||||||
CustomMenu {
|
CustomMenu {
|
||||||
title: translate.getTranslation("AUDIO_DEVICES", i18n.language)
|
title: translate.getTranslation("AUDIO_DEVICES", i18n.language)
|
||||||
|
@ -359,8 +358,8 @@ MenuBar {
|
||||||
var audioDevice = audioDevices[thing]
|
var audioDevice = audioDevices[thing]
|
||||||
var component = Qt.createComponent("AudioDeviceItem.qml")
|
var component = Qt.createComponent("AudioDeviceItem.qml")
|
||||||
var action = component.createObject(audioDeviceMenu, {
|
var action = component.createObject(audioDeviceMenu, {
|
||||||
text: audioDevices[thing]["description"],
|
"text": audioDevices[thing]["description"],
|
||||||
deviceID: String(
|
"deviceID": String(
|
||||||
audioDevices[thing]["name"])
|
audioDevices[thing]["name"])
|
||||||
})
|
})
|
||||||
action.ActionGroup.group = audioDeviceMenuGroup
|
action.ActionGroup.group = audioDeviceMenuGroup
|
||||||
|
@ -373,8 +372,7 @@ MenuBar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuSeparator {
|
MenuSeparator {}
|
||||||
}
|
|
||||||
|
|
||||||
CustomMenu {
|
CustomMenu {
|
||||||
title: translate.getTranslation("AUDIO", i18n.language)
|
title: translate.getTranslation("AUDIO", i18n.language)
|
||||||
|
@ -401,8 +399,7 @@ MenuBar {
|
||||||
}
|
}
|
||||||
shortcut: keybinds.cycleVideo
|
shortcut: keybinds.cycleVideo
|
||||||
}
|
}
|
||||||
MenuSeparator {
|
MenuSeparator {}
|
||||||
}
|
|
||||||
|
|
||||||
CustomMenu {
|
CustomMenu {
|
||||||
title: translate.getTranslation("VIDEO", i18n.language)
|
title: translate.getTranslation("VIDEO", i18n.language)
|
||||||
|
@ -435,8 +432,7 @@ MenuBar {
|
||||||
}
|
}
|
||||||
shortcut: keybinds.cycleSubBackwards
|
shortcut: keybinds.cycleSubBackwards
|
||||||
}
|
}
|
||||||
MenuSeparator {
|
MenuSeparator {}
|
||||||
}
|
|
||||||
|
|
||||||
CustomMenu {
|
CustomMenu {
|
||||||
title: translate.getTranslation("SUBTITLES", i18n.language)
|
title: translate.getTranslation("SUBTITLES", i18n.language)
|
||||||
|
|
|
@ -7,10 +7,11 @@ Image {
|
||||||
smooth: true
|
smooth: true
|
||||||
|
|
||||||
property alias color: colorOverlay.color
|
property alias color: colorOverlay.color
|
||||||
property int size: 24
|
property int iconHeight: 24
|
||||||
|
property int iconWidth: 24
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
sourceSize.width: size
|
sourceSize.height: iconHeight
|
||||||
sourceSize.height: size
|
sourceSize.width: iconWidth
|
||||||
|
|
||||||
ColorOverlay {
|
ColorOverlay {
|
||||||
id: colorOverlay
|
id: colorOverlay
|
||||||
|
|
|
@ -11,18 +11,19 @@ Control {
|
||||||
id: root
|
id: root
|
||||||
property alias iconSource: icon.source
|
property alias iconSource: icon.source
|
||||||
property alias iconColor: icon.color
|
property alias iconColor: icon.color
|
||||||
property alias iconHeight: icon.size
|
property alias iconHeight: icon.iconHeight
|
||||||
property alias iconWidth: icon.size
|
property alias iconWidth: icon.iconWidth
|
||||||
|
|
||||||
background: Item {}
|
background: Item {}
|
||||||
property bool iconRight: false
|
property bool iconRight: false
|
||||||
|
|
||||||
focusPolicy: Qt.NoFocus
|
focusPolicy: Qt.NoFocus
|
||||||
|
|
||||||
|
signal clicked
|
||||||
signal clicked();
|
|
||||||
//onClicked: print('buttonClick')
|
//onClicked: print('buttonClick')
|
||||||
leftPadding: appearance.themeName == "YouTube" ? iconWidth / 12 : appearance.themeName == "RoosterTeeth" ? iconWidth / 12 : iconWidth / 2.5
|
leftPadding: appearance.themeName
|
||||||
|
== "YouTube" ? iconWidth / 12 : appearance.themeName
|
||||||
|
== "RoosterTeeth" ? iconWidth / 12 : iconWidth / 2.5
|
||||||
rightPadding: root.leftPadding
|
rightPadding: root.leftPadding
|
||||||
|
|
||||||
contentItem: ButtonImage {
|
contentItem: ButtonImage {
|
||||||
|
|
|
@ -20,9 +20,9 @@ Rectangle {
|
||||||
|
|
||||||
orientation: Qt.Vertical
|
orientation: Qt.Vertical
|
||||||
|
|
||||||
implicitWidth: Math.max(background ? background.implicitWidth : 0,
|
implicitWidth: Math.max(
|
||||||
(handle ? handle.implicitWidth : 0)
|
background ? background.implicitWidth : 0,
|
||||||
+ leftPadding + rightPadding)
|
(handle ? handle.implicitWidth : 0) + leftPadding + rightPadding)
|
||||||
implicitHeight: Math.max(
|
implicitHeight: Math.max(
|
||||||
background.implicitHeight,
|
background.implicitHeight,
|
||||||
handle.implicitHeight + topPadding + bottomPadding)
|
handle.implicitHeight + topPadding + bottomPadding)
|
||||||
|
|
|
@ -97,8 +97,7 @@ Slider {
|
||||||
|
|
||||||
ProgressBar {
|
ProgressBar {
|
||||||
id: cachedLength
|
id: cachedLength
|
||||||
background: Item {
|
background: Item {}
|
||||||
}
|
|
||||||
contentItem: Item {
|
contentItem: Item {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: cachedLength.visualPosition * parent.width
|
width: cachedLength.visualPosition * parent.width
|
||||||
|
@ -123,7 +122,7 @@ Slider {
|
||||||
for (var i = 0, len = chapters.length; i < len; i++) {
|
for (var i = 0, len = chapters.length; i < len; i++) {
|
||||||
var component = Qt.createComponent("ChapterMarker.qml")
|
var component = Qt.createComponent("ChapterMarker.qml")
|
||||||
var marker = component.createObject(chapterMarkers, {
|
var marker = component.createObject(chapterMarkers, {
|
||||||
time: chapters[i]["time"]
|
"time": chapters[i]["time"]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,12 +14,12 @@ Slider {
|
||||||
palette.dark: "#f00"
|
palette.dark: "#f00"
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
|
||||||
implicitWidth: Math.max(background ? background.implicitWidth : 0,
|
implicitWidth: Math.max(
|
||||||
(handle ? handle.implicitWidth : 0)
|
background ? background.implicitWidth : 0,
|
||||||
+ leftPadding + rightPadding)
|
(handle ? handle.implicitWidth : 0) + leftPadding + rightPadding)
|
||||||
implicitHeight: Math.max(background ? background.implicitHeight : 0,
|
implicitHeight: Math.max(
|
||||||
(handle ? handle.implicitHeight : 0)
|
background ? background.implicitHeight : 0,
|
||||||
+ topPadding + bottomPadding)
|
(handle ? handle.implicitHeight : 0) + topPadding + bottomPadding)
|
||||||
onMoved: {
|
onMoved: {
|
||||||
player.playerCommand(Enums.Commands.SetVolume,
|
player.playerCommand(Enums.Commands.SetVolume,
|
||||||
Math.round(volumeBar.value).toString())
|
Math.round(volumeBar.value).toString())
|
||||||
|
|
|
@ -29,6 +29,7 @@ Item {
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
iconHeight: parent.height / 1.25
|
iconHeight: parent.height / 1.25
|
||||||
iconWidth: parent.height / 1.25
|
iconWidth: parent.height / 1.25
|
||||||
|
leftPadding: 14
|
||||||
}
|
}
|
||||||
PlaylistNextButton {
|
PlaylistNextButton {
|
||||||
id: playlistNextButton
|
id: playlistNextButton
|
||||||
|
|
|
@ -439,12 +439,14 @@ Window {
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
font.family: appearance.fontName
|
font.family: appearance.fontName
|
||||||
fontSizeMode: Text.VerticalFit
|
fontSizeMode: Text.VerticalFit
|
||||||
font.pixelSize: appearance.scaleFactor*(height-anchors.topMargin-anchors.bottomMargin-2)
|
font.pixelSize: appearance.scaleFactor
|
||||||
|
* (height - anchors.topMargin - anchors.bottomMargin - 2)
|
||||||
font.bold: true
|
font.bold: true
|
||||||
opacity: 1
|
opacity: 1
|
||||||
visible: controlsOverlay.controlsShowing
|
visible: controlsOverlay.controlsShowing
|
||||||
&& ((!appearance.titleOnlyOnFullscreen)
|
&& ((!appearance.titleOnlyOnFullscreen)
|
||||||
|| (mainWindow.visibility == Window.FullScreen || mainWindow.visibility == Window.Maximized))
|
|| (mainWindow.visibility == Window.FullScreen
|
||||||
|
|| mainWindow.visibility == Window.Maximized))
|
||||||
Connections {
|
Connections {
|
||||||
target: player
|
target: player
|
||||||
onTitleChanged: function (title) {
|
onTitleChanged: function (title) {
|
||||||
|
|
Loading…
Reference in a new issue