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 )"
|
||||
pushd $SOURCE_DIR
|
||||
find . -name "*.qml" -exec qmlfmt -w {} \;
|
||||
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) {
|
||||
console.error("Error loading component: " + component.errorString())
|
||||
}
|
||||
component.createObject(controlsBar, {
|
||||
|
||||
})
|
||||
component.createObject(controlsBar, {})
|
||||
}
|
||||
|
||||
Item {
|
||||
|
@ -137,7 +135,6 @@ Item {
|
|||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottomMargin: 0
|
||||
bottomPadding: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,5 @@ Menu {
|
|||
color: getAppearanceValueForTheme(appearance.themeName,
|
||||
"mainBackground")
|
||||
}
|
||||
delegate: CustomMenuItem {
|
||||
}
|
||||
delegate: CustomMenuItem {}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ Dialog {
|
|||
var component = Qt.createComponent("ThumbnailProcess.qml")
|
||||
var thumbnailerProcess = component.createObject(
|
||||
playlistDialog, {
|
||||
name: thumbnailJobs[0]
|
||||
"name": thumbnailJobs[0]
|
||||
})
|
||||
if (String(titleJobs[0]).indexOf("://") !== -1) {
|
||||
|
||||
|
@ -85,7 +85,7 @@ Dialog {
|
|||
}
|
||||
var component = Qt.createComponent("TitleProcess.qml")
|
||||
var titleProcess = component.createObject(playlistDialog, {
|
||||
name: titleJobs[0]
|
||||
"name": titleJobs[0]
|
||||
})
|
||||
titleProcess.start("youtube-dl",
|
||||
["--get-title", titleJobs[0]])
|
||||
|
@ -107,10 +107,10 @@ Dialog {
|
|||
for (var thing in playlist) {
|
||||
var item = playlist[thing]
|
||||
playlistModel.append({
|
||||
playlistItemTitle: item["title"],
|
||||
playlistItemFilename: item["filename"],
|
||||
current: item["current"],
|
||||
playlistPos: thing
|
||||
"playlistItemTitle": item["title"],
|
||||
"playlistItemFilename": item["filename"],
|
||||
"current": item["current"],
|
||||
"playlistPos": thing
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -212,8 +212,7 @@ Dialog {
|
|||
id: playlistModel
|
||||
}
|
||||
delegate: playlistDelegate
|
||||
highlight: Item {
|
||||
}
|
||||
highlight: Item {}
|
||||
snapMode: ListView.SnapToItem
|
||||
flickableDirection: Flickable.VerticalFlick
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
|
|
|
@ -51,31 +51,31 @@ MenuBar {
|
|||
var component = Qt.createComponent("TrackItem.qml")
|
||||
if (trackType == "sub") {
|
||||
var action = component.createObject(subMenu, {
|
||||
text: trackLang,
|
||||
trackID: String(
|
||||
trackID),
|
||||
trackType: "sid",
|
||||
checked: track["selected"]
|
||||
"text": trackLang,
|
||||
"trackID": String(
|
||||
trackID),
|
||||
"trackType": "sid",
|
||||
"checked": track["selected"]
|
||||
})
|
||||
action.ActionGroup.group = subMenuGroup
|
||||
subMenu.addAction(action)
|
||||
} else if (trackType == "audio") {
|
||||
var action = component.createObject(audioMenu, {
|
||||
text: trackTitle + trackLang,
|
||||
trackID: String(
|
||||
trackID),
|
||||
trackType: "aid",
|
||||
checked: track["selected"]
|
||||
"text": trackTitle + trackLang,
|
||||
"trackID": String(
|
||||
trackID),
|
||||
"trackType": "aid",
|
||||
"checked": track["selected"]
|
||||
})
|
||||
action.ActionGroup.group = audioMenuGroup
|
||||
audioMenu.addAction(action)
|
||||
} else if (trackType == "video") {
|
||||
var action = component.createObject(videoMenu, {
|
||||
text: "Video " + trackID + trackTitle,
|
||||
trackID: String(
|
||||
trackID),
|
||||
trackType: "vid",
|
||||
checked: track["selected"]
|
||||
"text": "Video " + trackID + trackTitle,
|
||||
"trackID": String(
|
||||
trackID),
|
||||
"trackType": "vid",
|
||||
"checked": track["selected"]
|
||||
})
|
||||
action.ActionGroup.group = videoMenuGroup
|
||||
videoMenu.addAction(action)
|
||||
|
@ -337,8 +337,7 @@ MenuBar {
|
|||
shortcut: keybinds.mute
|
||||
}
|
||||
|
||||
MenuSeparator {
|
||||
}
|
||||
MenuSeparator {}
|
||||
|
||||
CustomMenu {
|
||||
title: translate.getTranslation("AUDIO_DEVICES", i18n.language)
|
||||
|
@ -359,9 +358,9 @@ MenuBar {
|
|||
var audioDevice = audioDevices[thing]
|
||||
var component = Qt.createComponent("AudioDeviceItem.qml")
|
||||
var action = component.createObject(audioDeviceMenu, {
|
||||
text: audioDevices[thing]["description"],
|
||||
deviceID: String(
|
||||
audioDevices[thing]["name"])
|
||||
"text": audioDevices[thing]["description"],
|
||||
"deviceID": String(
|
||||
audioDevices[thing]["name"])
|
||||
})
|
||||
action.ActionGroup.group = audioDeviceMenuGroup
|
||||
audioDeviceMenu.addAction(action)
|
||||
|
@ -373,8 +372,7 @@ MenuBar {
|
|||
}
|
||||
}
|
||||
|
||||
MenuSeparator {
|
||||
}
|
||||
MenuSeparator {}
|
||||
|
||||
CustomMenu {
|
||||
title: translate.getTranslation("AUDIO", i18n.language)
|
||||
|
@ -401,8 +399,7 @@ MenuBar {
|
|||
}
|
||||
shortcut: keybinds.cycleVideo
|
||||
}
|
||||
MenuSeparator {
|
||||
}
|
||||
MenuSeparator {}
|
||||
|
||||
CustomMenu {
|
||||
title: translate.getTranslation("VIDEO", i18n.language)
|
||||
|
@ -435,8 +432,7 @@ MenuBar {
|
|||
}
|
||||
shortcut: keybinds.cycleSubBackwards
|
||||
}
|
||||
MenuSeparator {
|
||||
}
|
||||
MenuSeparator {}
|
||||
|
||||
CustomMenu {
|
||||
title: translate.getTranslation("SUBTITLES", i18n.language)
|
||||
|
|
|
@ -48,11 +48,11 @@ Item {
|
|||
iconWidth: parent.height / 1.25
|
||||
hoverEnabled: true
|
||||
iconColor: hovered
|
||||
|| mouseAreaVolumeArea.containsMouse ? getAppearanceValueForTheme(
|
||||
appearance.themeName,
|
||||
"buttonHoverColor") : getAppearanceValueForTheme(
|
||||
appearance.themeName,
|
||||
"buttonColor")
|
||||
|| mouseAreaVolumeArea.containsMouse ? getAppearanceValueForTheme(
|
||||
appearance.themeName,
|
||||
"buttonHoverColor") : getAppearanceValueForTheme(
|
||||
appearance.themeName,
|
||||
"buttonColor")
|
||||
}
|
||||
|
||||
VerticalVolume {
|
||||
|
|
|
@ -13,9 +13,9 @@ SmoothButton {
|
|||
|
||||
hoverEnabled: true
|
||||
iconColor: hovered ? getAppearanceValueForTheme(
|
||||
appearance.themeName,
|
||||
"buttonHoverColor") : getAppearanceValueForTheme(
|
||||
appearance.themeName, "buttonColor")
|
||||
appearance.themeName,
|
||||
"buttonHoverColor") : getAppearanceValueForTheme(
|
||||
appearance.themeName, "buttonColor")
|
||||
onClicked: {
|
||||
player.playerCommand(Enums.Commands.Seek, "-10")
|
||||
}
|
||||
|
|
|
@ -5,12 +5,13 @@ import QtGraphicalEffects 1.0
|
|||
Image {
|
||||
id: root
|
||||
smooth: true
|
||||
|
||||
|
||||
property alias color: colorOverlay.color
|
||||
property int size: 24
|
||||
property int iconHeight: 24
|
||||
property int iconWidth: 24
|
||||
fillMode: Image.PreserveAspectFit
|
||||
sourceSize.width: size
|
||||
sourceSize.height: size
|
||||
sourceSize.height: iconHeight
|
||||
sourceSize.width: iconWidth
|
||||
|
||||
ColorOverlay {
|
||||
id: colorOverlay
|
||||
|
@ -18,4 +19,4 @@ Image {
|
|||
source: root
|
||||
color: "#000000"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,9 +12,9 @@ SmoothButton {
|
|||
iconSource: "icons/" + appearance.themeName + "/forward.svg"
|
||||
hoverEnabled: true
|
||||
iconColor: hovered ? getAppearanceValueForTheme(
|
||||
appearance.themeName,
|
||||
"buttonHoverColor") : getAppearanceValueForTheme(
|
||||
appearance.themeName, "buttonColor")
|
||||
appearance.themeName,
|
||||
"buttonHoverColor") : getAppearanceValueForTheme(
|
||||
appearance.themeName, "buttonColor")
|
||||
onClicked: {
|
||||
player.playerCommand(Enums.Commands.Seek, "10")
|
||||
}
|
||||
|
|
|
@ -12,9 +12,9 @@ SmoothButton {
|
|||
iconSource: "icons/" + appearance.themeName + "/fullscreen.svg"
|
||||
hoverEnabled: true
|
||||
iconColor: hovered ? getAppearanceValueForTheme(
|
||||
appearance.themeName,
|
||||
"buttonHoverColor") : getAppearanceValueForTheme(
|
||||
appearance.themeName, "buttonColor")
|
||||
appearance.themeName,
|
||||
"buttonHoverColor") : getAppearanceValueForTheme(
|
||||
appearance.themeName, "buttonColor")
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||
|
||||
onClicked: {
|
||||
|
|
|
@ -12,9 +12,9 @@ SmoothButton {
|
|||
iconSource: "icons/" + appearance.themeName + "/pause.svg"
|
||||
hoverEnabled: true
|
||||
iconColor: hovered ? getAppearanceValueForTheme(
|
||||
appearance.themeName,
|
||||
"buttonHoverColor") : getAppearanceValueForTheme(
|
||||
appearance.themeName, "buttonColor")
|
||||
appearance.themeName,
|
||||
"buttonHoverColor") : getAppearanceValueForTheme(
|
||||
appearance.themeName, "buttonColor")
|
||||
onClicked: {
|
||||
player.playerCommand(Enums.Commands.TogglePlayPause)
|
||||
}
|
||||
|
|
|
@ -13,9 +13,9 @@ SmoothButton {
|
|||
iconSource: "icons/" + appearance.themeName + "/next.svg"
|
||||
hoverEnabled: true
|
||||
iconColor: hovered ? getAppearanceValueForTheme(
|
||||
appearance.themeName,
|
||||
"buttonHoverColor") : getAppearanceValueForTheme(
|
||||
appearance.themeName, "buttonColor")
|
||||
appearance.themeName,
|
||||
"buttonHoverColor") : getAppearanceValueForTheme(
|
||||
appearance.themeName, "buttonColor")
|
||||
onClicked: {
|
||||
player.playerCommand(Enums.Commands.NextPlaylistItem)
|
||||
}
|
||||
|
|
|
@ -13,9 +13,9 @@ SmoothButton {
|
|||
iconSource: "icons/" + appearance.themeName + "/prev.svg"
|
||||
hoverEnabled: true
|
||||
iconColor: hovered ? getAppearanceValueForTheme(
|
||||
appearance.themeName,
|
||||
"buttonHoverColor") : getAppearanceValueForTheme(
|
||||
appearance.themeName, "buttonColor")
|
||||
appearance.themeName,
|
||||
"buttonHoverColor") : getAppearanceValueForTheme(
|
||||
appearance.themeName, "buttonColor")
|
||||
visible: appearance.themeName == "Youtube" ? false : true
|
||||
onClicked: {
|
||||
player.playerCommand(Enums.Commands.PreviousPlaylistItem)
|
||||
|
|
|
@ -12,9 +12,9 @@ SmoothButton {
|
|||
iconSource: "icons/" + appearance.themeName + "/settings.svg"
|
||||
hoverEnabled: true
|
||||
iconColor: hovered ? getAppearanceValueForTheme(
|
||||
appearance.themeName,
|
||||
"buttonHoverColor") : getAppearanceValueForTheme(
|
||||
appearance.themeName, "buttonColor")
|
||||
appearance.themeName,
|
||||
"buttonHoverColor") : getAppearanceValueForTheme(
|
||||
appearance.themeName, "buttonColor")
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||
onClicked: {
|
||||
var aptn = appearance.themeName
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.2
|
||||
import QtQuick.Layouts 1.2
|
||||
import QtQuick.Window 2.2
|
||||
import Qt.labs.settings 1.0
|
||||
|
||||
|
@ -11,18 +11,19 @@ Control {
|
|||
id: root
|
||||
property alias iconSource: icon.source
|
||||
property alias iconColor: icon.color
|
||||
property alias iconHeight: icon.size
|
||||
property alias iconWidth: icon.size
|
||||
property alias iconHeight: icon.iconHeight
|
||||
property alias iconWidth: icon.iconWidth
|
||||
|
||||
background: Item {}
|
||||
property bool iconRight: false
|
||||
|
||||
focusPolicy: Qt.NoFocus
|
||||
|
||||
|
||||
signal clicked();
|
||||
signal clicked
|
||||
//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
|
||||
|
||||
contentItem: ButtonImage {
|
||||
|
@ -34,6 +35,6 @@ Control {
|
|||
id: mouseArea
|
||||
anchors.fill: parent
|
||||
propagateComposedEvents: true
|
||||
onClicked: root.clicked()
|
||||
onClicked: root.clicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,9 +20,9 @@ Rectangle {
|
|||
|
||||
orientation: Qt.Vertical
|
||||
|
||||
implicitWidth: Math.max(background ? background.implicitWidth : 0,
|
||||
(handle ? handle.implicitWidth : 0)
|
||||
+ leftPadding + rightPadding)
|
||||
implicitWidth: Math.max(
|
||||
background ? background.implicitWidth : 0,
|
||||
(handle ? handle.implicitWidth : 0) + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(
|
||||
background.implicitHeight,
|
||||
handle.implicitHeight + topPadding + bottomPadding)
|
||||
|
|
|
@ -97,8 +97,7 @@ Slider {
|
|||
|
||||
ProgressBar {
|
||||
id: cachedLength
|
||||
background: Item {
|
||||
}
|
||||
background: Item {}
|
||||
contentItem: Item {
|
||||
Rectangle {
|
||||
width: cachedLength.visualPosition * parent.width
|
||||
|
@ -123,7 +122,7 @@ Slider {
|
|||
for (var i = 0, len = chapters.length; i < len; i++) {
|
||||
var component = Qt.createComponent("ChapterMarker.qml")
|
||||
var marker = component.createObject(chapterMarkers, {
|
||||
time: chapters[i]["time"]
|
||||
"time": chapters[i]["time"]
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,9 +13,9 @@ SmoothButton {
|
|||
iconSource: "icons/" + appearance.themeName + "/volume-up.svg"
|
||||
hoverEnabled: true
|
||||
iconColor: hovered ? getAppearanceValueForTheme(
|
||||
appearance.themeName,
|
||||
"buttonHoverColor") : getAppearanceValueForTheme(
|
||||
appearance.themeName, "buttonColor")
|
||||
appearance.themeName,
|
||||
"buttonHoverColor") : getAppearanceValueForTheme(
|
||||
appearance.themeName, "buttonColor")
|
||||
onClicked: {
|
||||
player.playerCommand(Enums.Commands.ToggleMute)
|
||||
}
|
||||
|
|
|
@ -14,12 +14,12 @@ Slider {
|
|||
palette.dark: "#f00"
|
||||
hoverEnabled: true
|
||||
|
||||
implicitWidth: Math.max(background ? background.implicitWidth : 0,
|
||||
(handle ? handle.implicitWidth : 0)
|
||||
+ leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(background ? background.implicitHeight : 0,
|
||||
(handle ? handle.implicitHeight : 0)
|
||||
+ topPadding + bottomPadding)
|
||||
implicitWidth: Math.max(
|
||||
background ? background.implicitWidth : 0,
|
||||
(handle ? handle.implicitWidth : 0) + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(
|
||||
background ? background.implicitHeight : 0,
|
||||
(handle ? handle.implicitHeight : 0) + topPadding + bottomPadding)
|
||||
onMoved: {
|
||||
player.playerCommand(Enums.Commands.SetVolume,
|
||||
Math.round(volumeBar.value).toString())
|
||||
|
|
|
@ -29,6 +29,7 @@ Item {
|
|||
anchors.bottom: parent.bottom
|
||||
iconHeight: parent.height / 1.25
|
||||
iconWidth: parent.height / 1.25
|
||||
leftPadding: 14
|
||||
}
|
||||
PlaylistNextButton {
|
||||
id: playlistNextButton
|
||||
|
|
|
@ -439,12 +439,14 @@ Window {
|
|||
anchors.top: parent.top
|
||||
font.family: appearance.fontName
|
||||
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
|
||||
opacity: 1
|
||||
visible: controlsOverlay.controlsShowing
|
||||
&& ((!appearance.titleOnlyOnFullscreen)
|
||||
|| (mainWindow.visibility == Window.FullScreen || mainWindow.visibility == Window.Maximized))
|
||||
|| (mainWindow.visibility == Window.FullScreen
|
||||
|| mainWindow.visibility == Window.Maximized))
|
||||
Connections {
|
||||
target: player
|
||||
onTitleChanged: function (title) {
|
||||
|
|
Loading…
Reference in a new issue