Skip to content

Commit

Permalink
[QgsQuick] Date time widget - adjusted for small screens
Browse files Browse the repository at this point in the history
  • Loading branch information
vsklencar authored and wonder-sk committed Sep 11, 2020
1 parent 4e6acb6 commit 3fc61a4
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/quickgui/plugin/editor/qgsquickdatetime.qml
Expand Up @@ -18,6 +18,7 @@ import QtQuick.Controls 2.2
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.4 as Controls1
import QtGraphicalEffects 1.0
import QtQuick.Window 2.0
import QgsQuick 0.1 as QgsQuick

/**
Expand Down Expand Up @@ -167,11 +168,16 @@ Item {
parent: ApplicationWindow.overlay
anchors.centerIn: parent

ColumnLayout {
Rectangle {
ScrollView {
clip: true
width: parent.width
height: parent.height

ColumnLayout {
Rectangle {
id: calendarOverlay
color: "transparent"
implicitWidth: ApplicationWindow.window.width * 0.8
implicitWidth: Math.min(Screen.width, Screen.height) * 0.8
implicitHeight: implicitWidth
visible: main.typeFromFieldFormat === "Date" || main.typeFromFieldFormat === "Date Time"

Expand All @@ -185,7 +191,6 @@ Item {
id: calendarGrid
anchors.left: parent.left
anchors.right: parent.right
//Layout.alignment: Qt.AlignHCenter
columns: 1
implicitWidth: calendarOverlay.width
implicitHeight: calendarOverlay.height
Expand Down Expand Up @@ -302,7 +307,8 @@ Item {
popup.close()
}
}
}
}
}
}
}

Expand Down

0 comments on commit 3fc61a4

Please sign in to comment.