Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[QgsQuick] Added styling properties to feature form tabs
  • Loading branch information
vsklencar authored and wonder-sk committed Apr 17, 2019
1 parent 6f20b5c commit 15af15e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/quickgui/plugin/qgsquickfeatureform.qml
Expand Up @@ -152,10 +152,11 @@ Item {
signal reset
}

Item {
Rectangle {
id: container

clip: true
color: form.style.tabs.backgroundColor

anchors {
top: toolbar.bottom
Expand All @@ -180,6 +181,12 @@ Item {
id: tabRow
visible: model.hasTabs
height: form.style.tabs.height
spacing: form.style.tabs.spacing

background: Rectangle {
anchors.fill: parent
color: form.style.tabs.backgroundColor
}

Connections {
target: master
Expand All @@ -199,9 +206,10 @@ Item {
text: Name
leftPadding: 8 * QgsQuick.Utils.dp
rightPadding: 8 * QgsQuick.Utils.dp
anchors.bottom: parent.bottom

width: contentItem.width + leftPadding + rightPadding
height: form.style.tabs.height
height: form.style.tabs.buttonHeight

contentItem: Text {
// Make sure the width is derived from the text so we can get wider
Expand Down
3 changes: 3 additions & 0 deletions src/quickgui/plugin/qgsquickfeatureformstyling.qml
Expand Up @@ -38,10 +38,13 @@ QtObject {
property color normalColor: "#4CAF50"
property color activeColor: "#1B5E20"
property color disabledColor: "#FFFFFF"
property color backgroundColor: "#999999"
property color normalBackgroundColor: "#FFFFFF"
property color activeBackgroundColor: "#4CAF50"
property color disabledBackgroundColor: "#999999"
property real height: 48 * QgsQuick.Utils.dp
property real buttonHeight: height * 0.8
property real spacing: 0
}

property QtObject constraint: QtObject {
Expand Down

0 comments on commit 15af15e

Please sign in to comment.