Skip to content
Permalink
Browse files

[QgsQuick] Feature form group styling

Added margin to group title box - size and color properties have been added to group styling.
  • Loading branch information
vsklencar authored and wonder-sk committed Apr 10, 2019
1 parent 4a3bac8 commit 913dee2b9c3dcd6c4edea0f9a0da3a656141fe00
Showing with 27 additions and 10 deletions.
  1. +22 −10 src/quickgui/plugin/qgsquickfeatureform.qml
  2. +5 −0 src/quickgui/plugin/qgsquickfeatureformstyling.qml
@@ -257,18 +257,30 @@ Item {
section.property: "Group"
section.labelPositioning: ViewSection.CurrentLabelAtStart | ViewSection.InlineLabels
section.delegate: Component {
// section header: group box name
Rectangle {

// section header: group box name
Rectangle {
width: parent.width
height: section === "" ? 0 : form.style.group.height
color: form.style.group.backgroundColor

Text {
anchors { horizontalCenter: parent.horizontalCenter; verticalCenter: parent.verticalCenter }
font.bold: true
font.pixelSize: form.style.group.fontPixelSize
text: section
color: form.style.group.fontColor
color: form.style.group.marginColor

Rectangle {
anchors.fill: parent
anchors {
leftMargin: form.style.group.leftMargin
rightMargin: form.style.group.rightMargin
topMargin: form.style.group.topMargin
bottomMargin: form.style.group.bottomMargin
}
color: form.style.group.backgroundColor

Text {
anchors { horizontalCenter: parent.horizontalCenter; verticalCenter: parent.verticalCenter }
font.bold: true
font.pixelSize: form.style.group.fontPixelSize
text: section
color: form.style.group.fontColor
}
}
}
}
@@ -23,6 +23,11 @@ QtObject {

property QtObject group: QtObject {
property color backgroundColor: "lightGray"
property color marginColor: "black"
property real leftMargin: 1 * QgsQuick.Utils.dp
property real rightMargin: 1 * QgsQuick.Utils.dp
property real topMargin: 1 * QgsQuick.Utils.dp
property real bottomMargin: 1 * QgsQuick.Utils.dp
property real height: 64 * QgsQuick.Utils.dp
property color fontColor: "black"
property int spacing: 10 * QgsQuick.Utils.dp

0 comments on commit 913dee2

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