Skip to content

Commit

Permalink
Revert changes to image drawer and showing buttons by default
Browse files Browse the repository at this point in the history
  • Loading branch information
walokra committed Dec 18, 2020
1 parent 0bc2acf commit 8e5c08c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
26 changes: 24 additions & 2 deletions qml/pages/GalleryContentDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,45 @@ Item {
internal.activateLoader();
}

MouseArea {
enabled: drawer.open;
anchors.fill: galleryContainer;
onClicked: {
drawer.open = false;
}
}

Column {
id: galleryContainer;
anchors.left: parent.left; anchors.right: parent.right;
height: childrenRect.height;

Drawer {
id: drawer;
anchors.left: parent.left; anchors.right: parent.right;
dock: page.isPortrait ? Dock.Left : Dock.Bottom;
height: imageColumn.height;
backgroundSize: parent.width / 5;

background: Item { }
// background: Item { }
background: Item {
id: drawerContextMenu;
anchors.left: parent.left; anchors.right: parent.right;
height: childrenRect.height;

ImageButtons {
id: imageButtons;
}
}

foreground: Column {
id: imageColumn;
anchors { left: parent.left; right: parent.right; verticalCenter: parent.verticalCenter; }
height: imageTitleText.height + ((imageLoader.active) ? imageLoader.height : videoLoader.height);
spacing: constant.paddingSmall;

enabled: !drawer.opened;

Label {
id: imageTitleText;
anchors.leftMargin: constant.paddingSmall;
Expand Down Expand Up @@ -108,7 +130,7 @@ Item {
}
} // Drawer

ImageButtons { }
// ImageButtons { }

Label {
id: imageDescText;
Expand Down
8 changes: 4 additions & 4 deletions qml/pages/ImageComponent.qml
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ Component {
internal.clickPlay();
}

// onPressAndHold: {
// imageColumn.height = (imageColumn.height < drawerContextMenu.height) ? drawerContextMenu.height : imageColumn.height;
// drawer.open = true;
// }
onPressAndHold: {
imageColumn.height = (imageColumn.height < drawerContextMenu.height) ? drawerContextMenu.height : imageColumn.height;
drawer.open = true;
}

onPressed: {
start_x = mouseX;
Expand Down

0 comments on commit 8e5c08c

Please sign in to comment.