Skip to content
Permalink
Browse files

Media player search input field update

  • Loading branch information
martonborzak committed Nov 23, 2019
1 parent bad0b15 commit b32f0f5259f0a900073cc72706bc7fd65558999f
@@ -391,6 +391,8 @@ Rectangle {
}
}

property alias closeButtonMouseArea: closeButtonMouseArea

Text {
id: closeButton
color: colorText
@@ -408,6 +410,7 @@ Rectangle {
anchors.topMargin: 20

MouseArea {
id: closeButtonMouseArea
width: parent.width + 20
height: parent.height + 20
anchors.centerIn: parent
@@ -42,6 +42,10 @@ Comp.ButtonBase {
visible: mediaplayerButton.state == "closed" ? true : false
}

closeButtonMouseArea.onClicked: {
inputPanel.active = false
}

// album art
property string m_image: obj.mediaImage
onM_imageChanged: {
@@ -150,6 +150,8 @@ Rectangle {
cardRepeater.model = features;
}

signal looseFocus()


SwipeView {
id: cardSwipeView
@@ -158,6 +160,11 @@ Rectangle {
anchors.centerIn: parent
currentIndex: 0

onCurrentIndexChanged: {
if (cardSwipeView.currentIndex != features.indexOf("SEARCH"))
looseFocus();
}

Item {
CardHome {}
}
@@ -7,6 +7,14 @@ Item {
width: parent.width
height: parent.height

Connections {
target: card

onLooseFocus: {
searchTextField.focus = false;
}
}

Rectangle {
width: parent.width - 60
height: 80
@@ -29,6 +37,16 @@ Item {
anchors.left: parent.left
anchors.leftMargin: 10
anchors.verticalCenter: parent.verticalCenter

MouseArea {
anchors.fill: parent

onClicked: {
haptic.playEffect("click");
obj.search(searchTextField.text);
searchTextField.focus = false;
}
}
}

TextField {
@@ -53,6 +71,13 @@ Item {
onAccepted: {
obj.search(searchTextField.text)
}

onFocusChanged: {
if (focus)
inputPanel.active = true
else
inputPanel.active = false
}
}
}
}

0 comments on commit b32f0f5

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