Skip to content

Commit

Permalink
[QgsQuick] Styling of tab buttons in feature form
Browse files Browse the repository at this point in the history
Added properties for color background setting
  • Loading branch information
vsklencar authored and wonder-sk committed Apr 17, 2019
1 parent 1055a8a commit 6f20b5c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/quickgui/plugin/qgsquickfeatureform.qml
Expand Up @@ -215,6 +215,11 @@ Item {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}

background: Rectangle {
color: !tabButton.enabled ? form.style.tabs.disabledBackgroundColor : tabButton.down ||
tabButton.checked ? form.style.tabs.activeBackgroundColor : form.style.tabs.normalBackgroundColor
}
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion src/quickgui/plugin/qgsquickfeatureformstyling.qml
Expand Up @@ -37,7 +37,10 @@ QtObject {
property QtObject tabs: QtObject {
property color normalColor: "#4CAF50"
property color activeColor: "#1B5E20"
property color disabledColor: "#999999"
property color disabledColor: "#FFFFFF"
property color normalBackgroundColor: "#FFFFFF"
property color activeBackgroundColor: "#4CAF50"
property color disabledBackgroundColor: "#999999"
property real height: 48 * QgsQuick.Utils.dp
}

Expand Down

0 comments on commit 6f20b5c

Please sign in to comment.