Skip to content

Commit 6f20b5c

Browse files
vsklencarwonder-sk
vsklencar
authored andcommittedApr 17, 2019
[QgsQuick] Styling of tab buttons in feature form
Added properties for color background setting
1 parent 1055a8a commit 6f20b5c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed
 

‎src/quickgui/plugin/qgsquickfeatureform.qml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,11 @@ Item {
215215
horizontalAlignment: Text.AlignHCenter
216216
verticalAlignment: Text.AlignVCenter
217217
}
218+
219+
background: Rectangle {
220+
color: !tabButton.enabled ? form.style.tabs.disabledBackgroundColor : tabButton.down ||
221+
tabButton.checked ? form.style.tabs.activeBackgroundColor : form.style.tabs.normalBackgroundColor
222+
}
218223
}
219224
}
220225
}

‎src/quickgui/plugin/qgsquickfeatureformstyling.qml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ QtObject {
3737
property QtObject tabs: QtObject {
3838
property color normalColor: "#4CAF50"
3939
property color activeColor: "#1B5E20"
40-
property color disabledColor: "#999999"
40+
property color disabledColor: "#FFFFFF"
41+
property color normalBackgroundColor: "#FFFFFF"
42+
property color activeBackgroundColor: "#4CAF50"
43+
property color disabledBackgroundColor: "#999999"
4144
property real height: 48 * QgsQuick.Utils.dp
4245
}
4346

0 commit comments

Comments
 (0)