Verified Commit af89aad3 authored by Jonah Brüchert's avatar Jonah Brüchert 🌳

Make sure the options are closed if they would be overlapped

parent 2191c385
......@@ -21,6 +21,7 @@
***************************************************************************/
import QtQuick 2.7
import QtGraphicalEffects 1.0
import org.kde.kirigami 2.5 as Kirigami
......@@ -29,6 +30,13 @@ ListView {
property string searchText
Behavior on height {
SmoothedAnimation {
duration: Kirigami.Units.shortDuration
easing.type: Easing.InOutQuad
}
}
Rectangle {
z: -1
anchors.fill: parent
......@@ -36,6 +44,15 @@ ListView {
color: Kirigami.Theme.backgroundColor
}
layer.enabled: completion.visible
layer.effect: DropShadow {
verticalOffset: - 1
color: Kirigami.Theme.disabledTextColor
samples: 10
spread: 0.1
cached: true // element is static
}
verticalLayoutDirection: ListView.BottomToTop
clip: true
......
......@@ -108,19 +108,6 @@ Item {
}
}
Controls.ToolButton {
id: reloadButton
Layout.preferredWidth: buttonSize
Layout.preferredHeight: buttonSize
visible: !Kirigami.Settings.isMobile
icon.name: currentWebView.loading ? "process-stop" : "view-refresh"
onClicked: currentWebView.loading ? currentWebView.stop() : currentWebView.reload()
}
Item {
Layout.preferredWidth: buttonSize
Layout.preferredHeight: buttonSize
......
......@@ -80,7 +80,10 @@ ColumnLayout {
iconSource: "edit-find"
Layout.fillWidth: true
Layout.preferredHeight: buttonSize
onClicked: findSheet.open()
onClicked: {
findSheet.open()
options.state = "hidden"
}
text: i18n("Find in page")
}
......@@ -104,6 +107,7 @@ ColumnLayout {
shareSheet.url = currentWebView.url
shareSheet.title = currentWebView.title
shareSheet.open()
options.state = "hidden"
}
}
......
......@@ -22,7 +22,6 @@
import QtQuick 2.1
import QtWebEngine 1.6
import QtQuick.Window 2.3
import QtGraphicalEffects 1.0
import org.kde.kirigami 2.4 as Kirigami
......@@ -68,7 +67,7 @@ Kirigami.ApplicationWindow {
property bool layerShown : pageStack.layers.depth > 1
pageStack.globalToolBar.style: layerShown ? Kirigami.ApplicationHeaderStyle.Auto : Kirigami.ApplicationHeaderStyle.None
pageStack.globalToolBar.style: layerShown ? Kirigami.ApplicationHeaderStyle.Titles : Kirigami.ApplicationHeaderStyle.None
pageStack.initialPage: Kirigami.Page {
leftPadding: 0
......@@ -227,17 +226,9 @@ Kirigami.ApplicationWindow {
visible: navigation.textFocus
searchText: navigation.text
anchors.bottom: navigation.top
onVisibleChanged: options.state = "hidden"
layer.enabled: completion.visible
layer.effect: DropShadow {
verticalOffset: - 1
color: Kirigami.Theme.disabledTextColor
samples: 10
//radius: 3
spread: 0.1
cached: true // element is static
}
anchors.bottom: navigation.top
}
// Thin line underneath navigation
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment