Skip to content
Permalink
Browse files

WallVideo: Add the 'seeking' mouse areas

  • Loading branch information...
3unjee committed Jul 15, 2019
1 parent e23b0ad commit 899510376afb9f2d949d04cb4f7bd1397ea8f4c2
@@ -87,6 +87,8 @@

- ButtonCheck: Update implementation.

- WallVideo: Add the 'seeking' mouse areas.

- WallVideo: Update the 'z' on the 'player' item.

- WallVideo: Update the 'pauseTimeout' to 10 minutes.
@@ -386,7 +386,7 @@ class SK_GUI_EXPORT WWindow : public WDeclarativeMouseArea
void antialiasChanged();
void vsyncChanged ();

void hoverEnabledChanged ();
void hoverEnabledChanged();

void fadeEnabledChanged ();
void fadeDurationChanged();
@@ -335,56 +335,6 @@ MouseArea
onClicked: play()
}

/*RectangleShadow
{
anchors.left : areaBackward.left
anchors.right : areaBackward.right
anchors.top : parent.top
anchors.bottom: parent.bottom
anchors.rightMargin: Math.round(areaBackward.width / 3)
opacity: (areaBackward.containsMouse || pBackward) ? st.playerBrowser_opacity : 0.0
direction: Sk.Right
filter: st.playerBrowser_filterShadow
Behavior on opacity
{
PropertyAnimation
{
duration: st.duration_fast
easing.type: st.easing
}
}
}
RectangleShadow
{
anchors.left : areaForward.left
anchors.right : areaForward.right
anchors.top : parent.top
anchors.bottom: parent.bottom
anchors.leftMargin: Math.round(areaForward.width / 3)
opacity: (areaForward.containsMouse || pForward) ? st.playerBrowser_opacity : 0.0
filter: st.playerBrowser_filterShadow
Behavior on opacity
{
PropertyAnimation
{
duration: st.duration_fast
easing.type: st.easing
}
}
}*/

ButtonPushOverlay
{
id: buttonPrevious
@@ -1079,11 +1079,24 @@ Item
//---------------------------------------------------------------------------------------------
// WallVideo

property int wallVideo_interval: 10000

property int wallVideo_overlayWidth : componentWallBookmarkTrack_iconWidth
property int wallVideo_overlayHeight: itemWall_iconHeight

property color wallVideo_colorPlayer: "black"

property color wallVideo_colorShadow: "#008cdc"

property alias wallVideo_filterShadow: wallVideo_filterShadow

ImageColorFilter
{
id: wallVideo_filterShadow

color: wallVideo_colorShadow
}

//---------------------------------------------------------------------------------------------
// PlayerBrowser

@@ -1096,17 +1109,6 @@ Item
property color playerBrowser_colorText : "#dcdcdc"
property color playerBrowser_colorTextHover: text2_color

property color playerBrowser_colorShadow: "#008cdc"

property alias playerBrowser_filterShadow: playerBrowser_filterShadow

ImageColorFilter
{
id: playerBrowser_filterShadow

color: playerBrowser_colorShadow
}

//---------------------------------------------------------------------------------------------
// ItemList

@@ -48,6 +48,8 @@ WallBookmarkTrack

property int pWidthRight: width - pWidthHalf - st.border_size

property int pWidthArea: player.width / 4

property int pMargin: 0

property variant pCurrentTab : null
@@ -202,6 +204,14 @@ WallBookmarkTrack
else expose ();
}

//---------------------------------------------------------------------------------------------

function getOpacity(area)
{
if (area.pressed) return 1.0;
else return 0.5;
}

//---------------------------------------------------------------------------------------------
// WallBookmarkTrack reimplementation

@@ -660,6 +670,96 @@ WallBookmarkTrack
}
}

MouseArea
{
id: areaBackward

anchors.left : player.left
anchors.top : player.top
anchors.bottom: player.bottom

width: pWidthArea

z: player.z

visible: player.visible

hoverEnabled: true

cursor: Qt.PointingHandCursor

onPressed: player.seek(player.currentTime - st.wallVideo_interval)

RectangleShadow
{
id: rectangleBackward

anchors.fill: parent

visible: (opacity != 0.0)

opacity: (areaBackward.containsMouse) ? getOpacity(areaBackward) : 0.0

direction: Sk.Right

filter: st.wallVideo_filterShadow

Behavior on opacity
{
PropertyAnimation
{
duration: st.duration_normal

easing.type: st.easing
}
}
}
}

MouseArea
{
id: areaForward

anchors.right : player.right
anchors.top : player.top
anchors.bottom: player.bottom

width: pWidthArea

z: player.z

visible: player.visible

hoverEnabled: true

cursor: Qt.PointingHandCursor

onPressed: player.seek(player.currentTime + st.wallVideo_interval)

RectangleShadow
{
id: rectangleForward

anchors.fill: parent

visible: (opacity != 0.0)

opacity: (areaForward.containsMouse) ? getOpacity(areaForward) : 0.0

filter: st.wallVideo_filterShadow

Behavior on opacity
{
PropertyAnimation
{
duration: st.duration_normal

easing.type: st.easing
}
}
}
}

TextSubtitle
{
id: itemText

0 comments on commit 8995103

Please sign in to comment.
You can’t perform that action at this time.