gui: use relative geometry for state indicator
Size and margins scale with row height: - height: 30% of row height - width: same as height (circular) - left margin: 15% of row height - right margin: 25% of row height
This commit is contained in:
parent
8c207a0f3a
commit
af772e5e8b
|
|
@ -295,12 +295,12 @@ Item {
|
|||
// Agent state indicator (agent rows only)
|
||||
Rectangle {
|
||||
id: stateIndicator
|
||||
Layout.preferredWidth: 8
|
||||
Layout.preferredHeight: 8
|
||||
Layout.preferredWidth: height
|
||||
Layout.preferredHeight: parent.height * 0.3
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.leftMargin: 4
|
||||
Layout.rightMargin: 6
|
||||
radius: 4
|
||||
Layout.leftMargin: parent.height * 0.15
|
||||
Layout.rightMargin: parent.height * 0.25
|
||||
radius: height / 2
|
||||
visible: type === "agent"
|
||||
color: {
|
||||
var state = ollie.agentState(parentId || "", agentId || "")
|
||||
|
|
|
|||
Loading…
Reference in New Issue