Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • videolan/vlc
  • chouquette/vlc
  • bakiewicz.marek122/vlc
  • devnexen/vlc
  • rohanrajpal/vlc
  • blurrrb/vlc
  • gsoc/gsoc2019/darkapex/vlc
  • b1ue/vlc
  • fkuehne/vlc
  • magsoft/vlc
  • chub/vlc
  • cramiro9/vlc
  • robUx4/vlc
  • rom1v/vlc
  • akshayaky/vlc
  • tmk907/vlc
  • akymaster/vlc
  • govind.sharma/vlc
  • psilokos/vlc
  • xjbeta/vlc
  • jahan/vlc
  • 1480c1/vlc
  • amanchande/vlc
  • aaqib/vlc
  • rist/vlc
  • apol/vlc
  • mindfreeze/vlc
  • alexandre-janniaux/vlc
  • sandsmark/vlc
  • jagannatharjun/vlc
  • gsoc/gsoc2020/matiaslgonzalez/vlc
  • gsoc/gsoc2020/jagannatharjun/vlc
  • mstorsjo/vlc
  • gsoc/gsoc2020/vedenta/vlc
  • gsoc/gsoc2020/arnav-ishaan/vlc
  • gsoc/gsoc2020/andreduong/vlc
  • fuzun/vlc
  • gsoc/gsoc2020/vatsin/vlc
  • gsoc/gsoc2020/sagid/vlc
  • yaron/vlc
  • Phoenix/vlc
  • Garf/vlc
  • ePiratWorkarounds/vlc
  • tguillem/vlc
  • jnqnfe/vlc
  • mdc/vlc
  • Vedaa/vlc
  • rasa/vlc
  • quink/vlc
  • yealo/vlc
  • aleksey_ak/vlc
  • ePirat/vlc
  • ilya.yanok/vlc
  • asenat/vlc
  • m/vlc
  • bunjee/vlc
  • BLumia/vlc
  • sagudev/vlc
  • hamedmonji30/vlc
  • nullgemm/vlc
  • DivyamAhuja/vlc
  • thesamesam/vlc
  • dag7/vlc
  • snehil101/vlc
  • haasn/vlc
  • jbk/vlc
  • ValZapod/vlc
  • mfkl/vlc
  • WangChuan/vlc
  • core1024/vlc
  • GhostVaibhav/vlc
  • dfuhrmann/vlc
  • davide.prade/vlc
  • tmatth/vlc
  • Courmisch/vlc
  • zouya/vlc
  • hpi/vlc
  • EwoutH/vlc
  • aleung27/vlc
  • hengwu0/vlc
  • saladin/vlc
  • ashuio/vlc
  • richselwood/vlc
  • verma16Ayush/vlc
  • chemicalflash/vlc
  • PoignardAzur/vlc
  • huangjieNT/vlc
  • Blake-Haydon/vlc
  • AnuthaDev/vlc
  • gsoc/gsoc2021/mpd/vlc
  • nicolas_lequec/vlc
  • sambassaly/vlc
  • thresh/vlc
  • bonniegong/vlc
  • myaashish/vlc
  • stavros.vagionitis/vlc
  • ileoo/vlc
  • louis-santucci/vlc
  • cchristiansen/vlc
  • sabyasachi07/vlc
  • AbduAmeen/vlc
  • ashishb0410/vlc
  • urbanhusky/vlc
  • davidepietrasanta/vlc
  • riksleutelstad/vlc
  • jeremyVignelles/vlc
  • komh/vlc
  • iamjithinjohn/vlc
  • JohannesKauffmann/vlc2
  • kunglao/vlc
  • natzberg/vlc
  • jill/vlc
  • cwendling/vlc
  • adufou/vlc
  • ErwanAirone/vlc
  • HasinduDilshan10/vlc
  • vagrantc/vlc
  • rafiv/macos-bigsur-icon
  • Aymeriic/vlc
  • saranshg20/vlc
  • metzlove24/vlc
  • linkfanel/vlc
  • Ds886/vlc
  • metehan-arslan/vlc
  • Skantes/vlc
  • kgsandundananjaya96/vlc
  • mitchcapper/vlc
  • advaitgupta/vlc
  • StefanBruens/vlc
  • ratajs/vlc
  • T.M.F.B.3761/vlc
  • m222059/vlc
  • casemerrick/vlc
  • joshuaword2alt/vlc
  • sjwaddy/vlc
  • dima/vlc
  • Ybalrid/vlc
  • umxprime/vlc
  • eschmidt/vlc
  • vannieuwenhuysenmichelle/vlc
  • badcf00d/vlc
  • wesinator/vlc
  • louis/vlc
  • xqq/vlc
  • EmperorYP7/vlc
  • NicoLiam/vlc
  • loveleen/vlc
  • rofferom/vlc
  • rbultje/vlc
  • TheUnamed/vlc
  • pratiksharma341/vlc
  • Saurab17/vlc
  • purist.coder/vlc
  • Shuicheng/vlc
  • mdrrubel292/vlc
  • silverbleu00/vlc
  • metif12/vlc
  • asher-m/vlc
  • jeffk/vlc
  • Brandonbr1/vlc
  • beautyyuyanli/vlc
  • rego21/vlc
  • muyangren907/vlc
  • collectionbylawrencejason/vlc
  • evelez/vlc
  • GSMgeeth/vlc
  • Oneric/vlc
  • TJ5/vlc
  • XuanTung95/vlc
  • darrenjenny21/vlc
  • Trenly/vlc
  • RockyTDR/vlc
  • mjakubowski/vlc
  • caprica/vlc
  • ForteFrankie/vlc
  • seannamiller19/vlc
  • junlon2006/vlc
  • kiwiren6666/vlc
  • iuseiphonexs/vlc
  • fenngtun/vlc
  • Rajdutt999/vlc
  • typx/vlc
  • leon.vitanos/vlc
  • robertogarci0938/vlc
  • gsoc/gsoc2022/luc65r/vlc-mpd
  • skeller/vlc
  • MCJack123/vlc
  • luc65r/vlc-mpd
  • popov895/vlc
  • claucambra/vlc
  • brad/vlc
  • matthewmurua88/vlc
  • Tomas8874/vlc
  • philenotfound/vlc
  • makita-do3/vlc
  • LZXCorp/vlc
  • mar0x/vlc
  • senojetkennedy0102/vlc
  • shaneb243/vlc
  • ahmadbader/vlc
  • rajduttcse26/vlc-audio-filters
  • Juniorzito8415/vlc
  • achernyakov/vlc
  • lucasjetgroup/vlc
  • pupdoggy666/vlc
  • gmde9363/vlc
  • alexnwayne/vlc
  • bahareebrahimi781/vlc
  • hamad633666/vlc
  • umghof3112/vlc
  • joe0199771874/vlc
  • Octocats66666666/vlc
  • jjm_223/vlc
  • btech10110.19/vlc
  • sunnykfc028/vlc-audio-filters
  • loic/vlc
  • nguyenminhducmx1/vlc
  • JanekKrueger/vlc
  • bstubbington2/vlc
  • rcombs/vlc
  • Ordissimo/vlc
  • king7532/vlc
  • noobsauce101/vlc
  • schong0525/vlc
  • myQwil/vlc
  • apisbg91/vlc
  • geeboy0101017/vlc
  • kim.faughey/vlc
  • nurupo/vlc
  • yyusea/vlc
  • 0711235879.khco/vlc
  • ialo/vlc
  • iloveyeye2/vlc
  • gdtdftdqtd/vlc
  • leandroconsiglio/vlc
  • AndyHTML2012/vlc
  • ncz/vlc
  • lucenticus/vlc
  • knr1931/vlc
  • kjoonlee/vlc
  • chandrakant100/vlc-qt
  • johge42/vlc
  • polter/vlc
  • hexchain/vlc
  • Tushwrld/vlc
  • mztea928/vlc
  • jbelloncastro/vlc
  • alvinhochun/vlc
  • ghostpiratecrow/vlc
  • ujjwaltwitx/vlc
  • alexsonarin06/vlc
  • adrianbon76/vlc
  • altsod/vlc
  • damien.lucas44/vlc
  • dmytrivtaisa/vlc
  • utk202/vlc
  • aaxhrj/vlc
  • thomas.hermes/vlc
  • structurenewworldorder/vlc
  • slomo/vlc
  • wantlamy/vlc
  • musc.o3cminc/vlc
  • thebarshablog/vlc
  • kerrick/vlc
  • kratos142518/vlc
  • leogps/vlc
  • vacantron/vlc
  • luna_koly/vlc
  • Ratio2/vlc
  • anuoshemohammad/vlc
  • apsun/vlc
  • aaa1115910/vlc
  • alimotmoyo/vlc
  • Ambossmann/vlc
  • Sam-LearnsToCode/vlc
  • Chilledheart/vlc
  • Labnann/vlc
  • ktcoooot1/vlc
  • mohit-marathe/vlc
  • johnddx/vlc
  • manstabuk/vlc
  • Omar-ahmed314/vlc
  • vineethkm/vlc
  • 9Enemi86/vlc
  • radoslav.m.panteleev/vlc
  • ashishami2002/vlc
  • Corbax/vlc
  • firnasahmed/vlc
  • pelayarmalam4/vlc
  • c0ff330k/vlc
  • shikhindahikar/vlc
  • l342723951/vlc
  • christianschwandner/vlc
  • douniwan5788/vlc
  • 7damian7/vlc
  • ferdnyc/vlc
  • f.ales1/vlc
  • pandagby/vlc
  • BaaBaa/vlc
  • jewe37/vlc
  • w00drow/vlc
  • russelltg/vlc
  • ironicallygod/vlc
  • soumyaDghosh/vlc
  • linzihao1999/vlc
  • deyayush6/vlc
  • mibi88/vlc
  • newabdallah10/vlc
  • jhorbincolombia/vlc
  • rimvihaqueshupto/vlc
  • andrewkhon98/vlc
  • fab78/vlc
  • lapaz17/vlc
  • amanna13/vlc
  • mdakram28/vlc
  • 07jw1980/vlc
  • sohamgupta/vlc
  • Eson-Jia1/vlc
  • Sumou/vlc
  • vikram-kangotra/vlc
  • chalice191/vlc
  • olivercalder/vlc
  • aaasg4001/vlc
  • zipdox/vlc
  • kwizart/vlc
  • Dragon-S/vlc
  • jdemeule/vlc
  • gabriel_lt/vlc
  • locutusofborg/vlc
  • sammirata/vlc-librist
  • another/vlc
  • Benjamin_Loison/vlc
  • ahmedmoselhi/vlc
  • petergaal/vlc
  • huynhsontung/vlc
  • dariusmihut/vlc
  • tvermaashutosh/vlc
  • buti/vlc
  • Niram7777/vlc
  • rohan-here/vlc
  • balaji-sivasakthi/vlc
  • rlindner81/vlc
  • Kakadus/vlc
  • djain/vlc
  • ABBurmeister/vlc
  • craighuggins/vlc
  • orbea/vlc
  • maxos/vlc
  • aakarshmj/vlc
  • kblaschke/vlc
  • ankitm/vlc
  • advait-0/vlc
  • mohak2003/vlc
  • yselkowitz/vlc
  • AZM999/vlc-azm
  • andrey.turkin/vlc
  • Disha-Baghel/vlc
  • nowrep/vlc
  • Apeng/vlc
  • Choucroute_melba/vlc
  • autra/vlc
  • eclipseo/vlc
  • fhuber/vlc
  • olafhering/vlc
  • sdasda7777/vlc
  • 1div0/vlc
  • skosnits/vlc-extended-playlist-support
  • dnicolson/vlc
  • Timshel/vlc
  • octopols/vlc
  • MangalK/vlc
  • nima64/vlc
  • misawai/vlc
  • Alexander-Wilms/vlc
  • Maxime2/vlc-fork-for-visualizer
  • ww/vlc
  • jeske/vlc
  • sgross-emlix/vlc
  • morenonatural/vlc
  • freakingLovesVLC/vlc
  • borisgolovnev/vlc
  • mpromonet/vlc
  • diogo.simao-marques/vlc
  • masstock/vlc
  • pratikpatel8982/vlc
  • hugok79/vlc
  • longervision/vlc
  • abhiudaysurya/vlc
  • rishabhgarg/vlc
  • tumic/vlc
  • cart/vlc
  • shubham442/vlc
  • Aditya692005/vlc
  • sammirata/vlc4
  • syrykh/vlc
  • Vvorcun/macos-new-icon
  • AyaanshC/vlc
  • nasso/vlc
  • Quark/vlc
  • sebastinas/vlc
  • rhstone/vlc
  • talregev/vlc
  • Managor/vlc
403 results
Show changes
Commits on Source (13)
......@@ -22,6 +22,7 @@ import QtQuick.Templates 2.4 as T
import QtQuick.Layouts 1.11
import QtGraphicalEffects 1.0
import QtQml.Models 2.11
import QtQuick.Window 2.11
import org.videolan.vlc 0.1
import org.videolan.compat 0.1
......@@ -41,19 +42,20 @@ FocusScope {
property int selectedIndex: 0
property int subSelectedIndex: 0
signal itemClicked(int index)
property alias sortMenu: sortControl.menu
property alias sortModel: sortControl.model
property var contentModel
property alias isViewMultiView: list_grid_btn.visible
property alias model: pLBannerSources.model
signal toogleMenu()
property var extraLocalActions: undefined
property alias localMenuDelegate: localMenuGroup.sourceComponent
property bool _showCSD: MainCtx.clientSideDecoration && !(MainCtx.intfMainWindow.visibility === Window.FullScreen)
signal itemClicked(int index)
signal toogleMenu()
// Triggered when the toogleView button is selected
function toggleView () {
MainCtx.gridView = !MainCtx.gridView
......@@ -117,7 +119,7 @@ FocusScope {
//drag and dbl click the titlebar in CSD mode
Loader {
anchors.fill: parent
active: MainCtx.clientSideDecoration
active: root._showCSD
source: "qrc:///widgets/CSDTitlebarTapNDrapHandler.qml"
}
......@@ -207,7 +209,7 @@ FocusScope {
rightMargin: VLCStyle.applicationHorizontalMargin
}
height: VLCStyle.globalToolbar_height
active: MainCtx.clientSideDecoration
active: root._showCSD
source: "qrc:///widgets/CSDWindowButtonSet.qml"
}
}
......@@ -428,6 +430,7 @@ FocusScope {
Widgets.IconToolButton {
id: menu_selector
visible: !MainCtx.hasToolbarMenu
size: VLCStyle.banner_icon_size
iconText: VLCIcons.ellipsis
text: I18n.qtr("Menu")
......
......@@ -35,6 +35,9 @@ Item {
property color textColor: VLCStyle.colors.text
property color highlightedBgColor: VLCStyle.colors.bgHover
property color highlightedTextColor: VLCStyle.colors.bgHoverText
property bool hovered: _countHovered !== 0
property bool menuOpened: _menuIndex !== -1
Action{ id: mediaMenu; text: I18n.qtr("&Media") ; onTriggered: menubar.popupMediaMenu(source); }
Action{ id: playbackMenu; text: I18n.qtr("&Playback") ; onTriggered: menubar.popupPlaybackMenu(source);}
......@@ -57,6 +60,8 @@ Item {
]
property int _menuIndex: -1
property int _countHovered: 0
function openMenu(obj, cb, index) {
cb.trigger(obj)
......@@ -64,6 +69,8 @@ Item {
}
function updateHover(obj, cb, index, hovered ) {
root._countHovered += hovered ? 1 : -1
if (hovered && menubar.openMenuOnHover) {
cb.trigger(obj)
root._menuIndex = index
......
......@@ -39,7 +39,7 @@ FocusScope {
&& Player.hasVideoOutput
&& playlistpopup.state !== "visible"
property bool pinVideoControls: rootPlayer.hasEmbededVideo && MainCtx.pinVideoControls && ((MainCtx.intfMainWindow.visibility !== Window.FullScreen))
property bool pinVideoControls: MainCtx.pinVideoControls && (MainCtx.intfMainWindow.visibility !== Window.FullScreen)
property bool hasEmbededVideo: MainCtx.hasEmbededVideo
readonly property int positionSliderY: controlBarView.y + controlBarView.sliderY
readonly property string coverSource: {
......@@ -53,7 +53,7 @@ FocusScope {
}
// NOTE: We force the night theme when playing a video.
readonly property VLCColors colors: (MainCtx.hasEmbededVideo) ? VLCStyle.nightColors
readonly property VLCColors colors: (MainCtx.hasEmbededVideo && !MainCtx.pinVideoControls) ? VLCStyle.nightColors
: VLCStyle.colors
property bool _keyPressed: false
......@@ -388,7 +388,11 @@ FocusScope {
visible: !resumeDialog.visible
title: mainPlaylistController.currentItem.title
colors: rootPlayer.colors
groupAlignment: rootPlayer.pinVideoControls ? TopBar.GroupAlignment.Horizontal : TopBar.GroupAlignment.Vertical
pinControls: rootPlayer.pinVideoControls
showCSD: MainCtx.clientSideDecoration && (MainCtx.intfMainWindow.visibility !== Window.FullScreen)
showToolbar: MainCtx.hasToolbarMenu && (MainCtx.intfMainWindow.visibility !== Window.FullScreen)
Navigation.parentItem: rootPlayer
Navigation.downItem: playlistpopup.showPlaylist ? playlistpopup : (audioControls.visible ? audioControls : controlBarView)
......@@ -397,6 +401,13 @@ FocusScope {
onRequestLockUnlockAutoHide: {
rootPlayer.lockUnlockAutoHide(lock, source)
}
onBackRequested: {
if (MainCtx.hasEmbededVideo && !MainCtx.canShowVideoPIP) {
mainPlaylistController.stop()
}
History.previous()
}
}
ResumeDialog {
......
......@@ -20,6 +20,7 @@ import QtQuick 2.11
import QtQuick.Controls 2.4
import QtQuick.Templates 2.4 as T
import QtQuick.Layouts 1.11
import QtQuick.Window 2.11
import org.videolan.vlc 0.1
......@@ -28,111 +29,151 @@ import "qrc:///widgets/" as Widgets
import "qrc:///menus/" as Menus
FocusScope{
id: topFocusScope
enum GroupAlignment {
Horizontal,
Vertical
}
id: root
/* required */ property int textWidth
property string title
property VLCColors colors: VLCStyle.nightColors
property int groupAlignment: TopBar.GroupAlignment.Vertical
property Item _currentTitleText: null
property alias reservedHeight: rightColumn.height
property bool showCSD: false
property bool showToolbar: false
property bool pinControls: false
property int reservedHeight: 0
signal togglePlaylistVisibility()
signal requestLockUnlockAutoHide(bool lock, var source)
signal backRequested()
implicitHeight: topcontrollerMouseArea.implicitHeight
Component.onCompleted: root._layout()
Component.onCompleted: {
// if groupAlignment == Horizontal, then onGroupAlignment isn't called when Component is created
if (groupAlignment === TopBar.GroupAlignment.Horizontal)
_layout()
}
onShowCSDChanged: root._layout()
onPinControlsChanged: root._layout()
onShowToolbarChanged: root._layout()
onGroupAlignmentChanged: _layout()
function _layoutLine(c1, c2, offset)
{
var lineHeight = Math.max(c1 !== undefined ? c1.implicitHeight : 0, c2 !== undefined ? c2.implicitHeight : 0)
function _layout() {
if (topFocusScope._currentTitleText)
topFocusScope._currentTitleText.destroy()
switch (groupAlignment) {
case TopBar.GroupAlignment.Horizontal:
leftColumn.children = [menubar, logoGroup]
_currentTitleText = centerTitleTextComponent.createObject(topcontrollerMouseArea)
var rightRow = Qt.createQmlObject("import QtQuick 2.11; Row {}", rightColumn, "TopBar")
rightRow.children = [playlistGroup, csdDecorations]
playlistGroup.anchors.verticalCenter = rightRow.verticalCenter
break;
case TopBar.GroupAlignment.Vertical:
_currentTitleText = leftTitleTextComponent.createObject()
leftColumn.children = [menubar, logoGroup, _currentTitleText]
playlistGroup.anchors.verticalCenter = undefined
rightColumn.children = [csdDecorations, playlistGroup]
playlistGroup.Layout.alignment = Qt.AlignRight
if (c1) {
c1.height = lineHeight
c1.anchors.leftMargin = 0
c1.anchors.topMargin = offset
}
if (c2) {
c2.height = lineHeight
c2.anchors.topMargin = offset
c2.anchors.rightMargin = 0
}
return lineHeight
}
// Main Content Container
MouseArea {
id: topcontrollerMouseArea
function _layout() {
var offset = 0
hoverEnabled: true
anchors.fill: parent
implicitHeight: rowLayout.implicitHeight
if (root.pinControls && !root.showToolbar && root.showCSD) {
//place everything on one line
var lineHeight = Math.max(logoGroup.implicitHeight, playlistGroup.implicitHeight, csdDecorations.implicitHeight)
onContainsMouseChanged: topFocusScope.requestLockUnlockAutoHide(containsMouse, topFocusScope)
centerTitleText.y = 0
centerTitleText.height = lineHeight
//drag and dbl click the titlebar in CSD mode
Loader {
anchors.fill: parent
active: MainCtx.clientSideDecoration
source: "qrc:///widgets/CSDTitlebarTapNDrapHandler.qml"
}
csdDecorations.height = lineHeight
logoGroup.height = lineHeight
playlistGroup.height = lineHeight
playlistGroup.anchors.topMargin = 0
playlistGroup.anchors.right = csdDecorations.left
playlistGroup.anchors.rightMargin = VLCStyle.margin_xsmall
root.implicitHeight = lineHeight
offset += lineHeight
} else {
playlistGroup.anchors.right = root.right
playlistGroup.anchors.rightMargin = VLCStyle.margin_xsmall
RowLayout {
id: rowLayout
var left = undefined
var right = undefined
var logoPlaced = false
anchors.fill: parent
if (root.showToolbar) {
left = menubar
}
if (root.showCSD) {
right = csdDecorations
if (!left) {
left = logoGroup
logoPlaced = true
}
}
ColumnLayout {
id: leftColumn
if (!!left || !!right) {
offset += root._layoutLine(left, right, offset)
if (root.showCSD) {
tapNDrag.height = offset
}
}
spacing: 0
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
Layout.leftMargin: VLCStyle.margin_xxsmall
Layout.topMargin: VLCStyle.margin_xxsmall
Layout.bottomMargin: VLCStyle.margin_xxsmall
if (!logoPlaced) {
left = logoGroup
} else {
left = undefined
}
ColumnLayout {
id: rightColumn
right = playlistGroup
spacing: 0
Layout.alignment: Qt.AlignTop | Qt.AlignRight
// this column may contain CSD, don't apply margins directly
var secondLineOffset = offset
var secondLineHeight = root._layoutLine(left, right, offset)
offset += secondLineHeight
if (root.pinControls) {
centerTitleText.y = secondLineOffset
centerTitleText.height = secondLineHeight
}
}
root.implicitHeight = offset
reservedHeight = offset
}
//drag and dbl click the titlebar in CSD mode
Loader {
id: tapNDrag
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
active: root.showCSD
source: "qrc:///widgets/CSDTitlebarTapNDrapHandler.qml"
}
// Components -
Menus.Menubar {
id: menubar
anchors.top: parent.top
anchors.left: parent.left
anchors.leftMargin: VLCStyle.margin_small
width: implicitWidth
height: VLCStyle.icon_normal
visible: MainCtx.hasToolbarMenu
textColor: topFocusScope.colors.text
highlightedBgColor: topFocusScope.colors.bgHover
highlightedTextColor: topFocusScope.colors.bgHoverText
visible: root.showToolbar
textColor: root.colors.text
highlightedBgColor: root.colors.bgHover
highlightedTextColor: root.colors.bgHoverText
onHoveredChanged: root.requestLockUnlockAutoHide(hovered, root)
onMenuOpenedChanged: root.requestLockUnlockAutoHide(menuOpened, root)
}
RowLayout {
......@@ -140,6 +181,10 @@ FocusScope{
spacing: VLCStyle.margin_xxsmall
anchors.left: parent.left
anchors.top: parent.top
anchors.leftMargin: VLCStyle.margin_small
Widgets.IconControlButton {
id: backBtn
......@@ -150,22 +195,20 @@ FocusScope{
iconText: VLCIcons.topbar_previous
text: I18n.qtr("Back")
focus: true
colors: topFocusScope.colors
colors: root.colors
Navigation.parentItem: topFocusScope
Navigation.parentItem: root
Navigation.rightItem: menuSelector
onClicked: {
if (MainCtx.hasEmbededVideo && !MainCtx.canShowVideoPIP) {
mainPlaylistController.stop()
}
History.previous()
}
onClicked: root.backRequested()
onHoveredChanged: root.requestLockUnlockAutoHide(hovered, root)
}
Image {
id: logo
Layout.alignment: Qt.AlignVCenter
sourceSize.width: VLCStyle.icon_small
sourceSize.height: VLCStyle.icon_small
source: "qrc:///logo/cone.svg"
......@@ -173,74 +216,88 @@ FocusScope{
}
}
Component {
id: centerTitleTextComponent
T.Label {
id: centerTitleText
readonly property int _availableWidth: rightColumn.x - (leftColumn.x + leftColumn.width)
readonly property int _centerX: ((topcontrollerMouseArea.width - centerTitleText.implicitWidth) / 2)
readonly property bool _alignHCenter: _centerX > leftColumn.x + leftColumn.width
&& _centerX + centerTitleText.implicitWidth < rightColumn.x
y: leftColumn.y
topPadding: VLCStyle.margin_xxsmall
leftPadding: VLCStyle.margin_small
rightPadding: VLCStyle.margin_small
text: topFocusScope.title
color: topFocusScope.colors.playerFg
font.pixelSize: VLCStyle.dp(13, VLCStyle.scale)
font.weight: Font.DemiBold
elide: Text.ElideRight
width: Math.min(centerTitleText._availableWidth, centerTitleText.implicitWidth)
on_AlignHCenterChanged: _layout()
Component.onCompleted: _layout()
function _layout() {
if (_alignHCenter) {
centerTitleText.x = 0
centerTitleText.anchors.horizontalCenter = topcontrollerMouseArea.horizontalCenter
} else {
centerTitleText.anchors.horizontalCenter = undefined
centerTitleText.x = Qt.binding(function() { return leftColumn.x + leftColumn.width; })
}
//FIXME use the the right class
T.Label {
id: centerTitleText
readonly property int _leftLimit: logoGroup.x + logoGroup.width
readonly property int _rightLimit: playlistGroup.x
readonly property int _availableWidth: _rightLimit - _leftLimit
readonly property int _centerX: ((topcontrollerMouseArea.width - centerTitleText.implicitWidth) / 2)
readonly property bool _alignHCenter: _centerX > _leftLimit
&& _centerX + centerTitleText.implicitWidth < _rightLimit
visible: root.pinControls
width: Math.min(centerTitleText._availableWidth, centerTitleText.implicitWidth)
leftPadding: VLCStyle.margin_small
rightPadding: VLCStyle.margin_small
text: root.title
color: root.colors.playerFg
font.pixelSize: VLCStyle.dp(13, VLCStyle.scale)
font.weight: Font.DemiBold
elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
on_AlignHCenterChanged: _layout()
Component.onCompleted: _layout()
function _layout() {
if (_alignHCenter) {
centerTitleText.x = 0
centerTitleText.anchors.horizontalCenter = topcontrollerMouseArea.horizontalCenter
} else {
centerTitleText.anchors.horizontalCenter = undefined
centerTitleText.x = Qt.binding(function() { return centerTitleText._leftLimit })
}
}
}
Component {
id: leftTitleTextComponent
//FIXME use the the right class
T.Label {
Layout.fillWidth: true
Layout.maximumWidth: topFocusScope.textWidth - VLCStyle.margin_normal
text: topFocusScope.title
horizontalAlignment: Text.AlignLeft
topPadding: VLCStyle.margin_large
leftPadding: logo.x
color: topFocusScope.colors.playerFg
font.weight: Font.DemiBold
font.pixelSize: VLCStyle.dp(18, VLCStyle.scale)
elide: Text.ElideRight
}
//FIXME use the the right class
T.Label {
id: leftTitleText
anchors.left: parent.left
anchors.top: logoGroup.bottom
width: root.textWidth - VLCStyle.margin_normal
visible: !root.pinControls
topPadding: VLCStyle.margin_large
leftPadding: logo.x
text: root.title
horizontalAlignment: Text.AlignLeft
color: root.colors.playerFg
font.weight: Font.DemiBold
font.pixelSize: VLCStyle.dp(18, VLCStyle.scale)
elide: Text.ElideRight
}
Loader {
id: csdDecorations
anchors.top: parent.top
anchors.right: parent.right
focus: false
height: VLCStyle.icon_normal
active: MainCtx.clientSideDecoration
enabled: MainCtx.clientSideDecoration
visible: MainCtx.clientSideDecoration
active: root.showCSD
enabled: root.showCSD
visible: root.showCSD
source: "qrc:///widgets/CSDWindowButtonSet.qml"
onLoaded: {
item.color = Qt.binding(function() { return topFocusScope.colors.playerFg })
item.hoverColor = Qt.binding(function() { return topFocusScope.colors.windowCSDButtonDarkBg })
item.color = Qt.binding(function() { return root.colors.playerFg })
item.hoverColor = Qt.binding(function() { return root.colors.windowCSDButtonDarkBg })
}
Connections {
target: csdDecorations.item
enabled: csdDecorations.loaded
onHoveredChanged: root.requestLockUnlockAutoHide(csdDecorations.item.hovered, root)
}
}
......@@ -252,28 +309,38 @@ FocusScope{
topPadding: VLCStyle.margin_xxsmall
rightPadding: VLCStyle.margin_xxsmall
anchors.top: parent.top
Widgets.IconControlButton {
id: menuSelector
focus: true
visible: !root.showToolbar
enabled: visible
focus: visible
size: VLCStyle.banner_icon_size
width: VLCStyle.bannerButton_width
height: VLCStyle.bannerButton_height
iconText: VLCIcons.ellipsis
text: I18n.qtr("Menu")
colors: topFocusScope.colors
colors: root.colors
Navigation.parentItem: topFocusScope
Navigation.parentItem: root
Navigation.leftItem: backBtn
Navigation.rightItem: playlistButton
onClicked: contextMenu.popup(this.mapToGlobal(0, height))
onHoveredChanged: root.requestLockUnlockAutoHide(hovered, root)
QmlGlobalMenu {
id: contextMenu
ctx: MainCtx
onAboutToShow: topFocusScope.requestLockUnlockAutoHide(true, contextMenu)
onAboutToHide: topFocusScope.requestLockUnlockAutoHide(false, contextMenu)
onAboutToShow: root.requestLockUnlockAutoHide(true, contextMenu)
onAboutToHide: root.requestLockUnlockAutoHide(false, contextMenu)
}
}
......@@ -284,12 +351,17 @@ FocusScope{
size: VLCStyle.banner_icon_size
iconText: VLCIcons.playlist
text: I18n.qtr("Playlist")
colors: topFocusScope.colors
focus: false
colors: root.colors
focus: root.showToolbar
width: VLCStyle.bannerButton_width
height: VLCStyle.bannerButton_height
Navigation.parentItem: topFocusScope
Navigation.leftItem: menuSelector
Navigation.parentItem: root
Navigation.leftItem: menuSelector.visible ? menuSelector : backBtn
onClicked: togglePlaylistVisibility()
onHoveredChanged: root.requestLockUnlockAutoHide(hovered, root)
}
}
}
......@@ -23,7 +23,7 @@ import QtQuick.Layouts 1.11
import "qrc:///style/"
T.TabButton {
T.Button {
id: control
property color color: VLCStyle.colors.text
......@@ -34,6 +34,7 @@ T.TabButton {
width: VLCStyle.dp(40, VLCStyle.scale)
implicitWidth: contentItem.implicitWidth
implicitHeight: contentItem.implicitHeight
focusPolicy: Qt.NoFocus
background: Rectangle {
height: control.height
......
......@@ -31,7 +31,10 @@ Row {
property color color: VLCStyle.colors.text
property color hoverColor: VLCStyle.colors.windowCSDButtonBg
property bool hovered: minimizeButton.hovered || maximizeButton.hovered || closeButton.hovered
CSDWindowButton {
id: minimizeButton
iconTxt: VLCIcons.window_minimize
onClicked: MainCtx.requestInterfaceMinimized()
height: windowButtonGroup.height
......@@ -40,6 +43,7 @@ Row {
}
CSDWindowButton {
id: maximizeButton
iconTxt: (MainCtx.intfMainWindow.visibility === Window.Maximized) ? VLCIcons.window_restore :VLCIcons.window_maximize
onClicked: {
if (MainCtx.intfMainWindow.visibility === Window.Maximized) {
......
......@@ -23,8 +23,6 @@ import "qrc:///style/"
FocusScope {
id: root
property Component component: Item {}
enum Edges {
Top,
Bottom,
......@@ -33,24 +31,26 @@ FocusScope {
}
property int edge: DrawerExt.Edges.Bottom
property bool expandHorizontally: edge === DrawerExt.Edges.Left || edge === DrawerExt.Edges.Right
property alias contentItem: content.item
property alias component: content.sourceComponent
width: (root.expandHorizontally) ? root._size : undefined
height: (!root.expandHorizontally) ? root._size : undefined
property bool _expandHorizontally: edge === DrawerExt.Edges.Left || edge === DrawerExt.Edges.Right
property int _size: _expandHorizontally ? content.item.width : content.item.height
property string _toChange: _expandHorizontally ? "x" : "y"
property int _size: (root.expandHorizontally) ? content.item.width : content.item.height
property string toChange: expandHorizontally ? "contentX" : "contentY"
width: _expandHorizontally ? root._size : undefined
height: !_expandHorizontally ? root._size : undefined
Flickable {
id: container
anchors.fill: parent
Loader {
focus: true
id: content
sourceComponent: root.component
}
Loader {
id: content
anchors.left: !_expandHorizontally ? parent.left : undefined
anchors.right: !_expandHorizontally ? parent.right : undefined
anchors.top: _expandHorizontally ? parent.top : undefined
anchors.bottom: _expandHorizontally ? parent.bottom : undefined
focus: true
}
state: "hidden"
......@@ -58,36 +58,43 @@ FocusScope {
State {
name: "visible"
PropertyChanges {
target: container
contentY: 0
contentX: 0
target: content
y: 0
x: 0
visible: true
}
},
State {
name: "hidden"
PropertyChanges {
target: container
contentY: edgeToOffset(edge)
contentX: edgeToOffset(edge)
visible:false
target: content
y: root.edgeToOffset(root.edge)
x: root.edgeToOffset(root.edge)
visible: false
}
}
]
function edgeToOffset(edge){
if(expandHorizontally)
switch(edge){
case DrawerExt.Edges.Left: return _size
case DrawerExt.Edges.Right: return -_size
default: return 0
if (root._expandHorizontally) {
switch (edge) {
case DrawerExt.Edges.Left:
return -root._size
case DrawerExt.Edges.Right:
return root._size
default:
return 0
}
else
switch(edge){
case DrawerExt.Edges.Top: return _size
case DrawerExt.Edges.Bottom: return -_size
default: return 0
} else {
switch (edge) {
case DrawerExt.Edges.Top:
return -root._size
case DrawerExt.Edges.Bottom:
return root._size
default:
return 0
}
}
}
transitions: [
......@@ -95,23 +102,33 @@ FocusScope {
to: "hidden"
SequentialAnimation {
NumberAnimation {
target: container; property: toChange
target: content
property: root._toChange
duration: VLCStyle.duration_short; easing.type: Easing.InSine
duration: VLCStyle.duration_short
easing.type: Easing.InSine
}
PropertyAction{ target: container; property: "visible" }
PropertyAction{
target: content
property: "visible"
}
}
},
Transition {
to: "visible"
SequentialAnimation {
PropertyAction { target: container; property: "visible" }
PropertyAction {
target: content
property: "visible"
}
NumberAnimation {
target: container; property: toChange
target: content
property: root._toChange
duration: VLCStyle.duration_short; easing.type: Easing.OutSine
duration: VLCStyle.duration_short
easing.type: Easing.OutSine
}
}
}
......