Skip to content

Commit 7792e2d

Browse files
committed
Making shape of port based on pin count
1 parent d5889aa commit 7792e2d

4 files changed

Lines changed: 17 additions & 16 deletions

File tree

qml/BBB_shape.png

10.1 KB
Loading

qml/BBB_shape.svg

Lines changed: 11 additions & 8 deletions
Loading

qml/BBIOConfig.qml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,9 @@ Rectangle {
202202
id: port9
203203

204204
anchors.top: parent.top
205-
anchors.bottom: parent.bottom
206205
anchors.left: parent.left
207206
width: parent.width * 0.054
208-
anchors.topMargin: parent.height * 0.265
209-
anchors.bottomMargin: parent.height * 0.18
207+
anchors.topMargin: parent.height * 0.275
210208
anchors.leftMargin: parent.width * 0.245
211209
currentColorMap: selector.currentColorMap
212210
loadedOverlays: overlaySelector.output
@@ -234,11 +232,9 @@ Rectangle {
234232
id: port8
235233

236234
anchors.top: parent.top
237-
anchors.bottom: parent.bottom
238235
anchors.right: parent.right
239236
width: parent.width * 0.054
240-
anchors.topMargin: parent.height * 0.265
241-
anchors.bottomMargin: parent.height * 0.18
237+
anchors.topMargin: parent.height * 0.275
242238
anchors.rightMargin: parent.width * 0.245
243239
currentColorMap: selector.currentColorMap
244240
loadedOverlays: overlaySelector.output

qml/Port.qml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Rectangle {
105105
id: main
106106

107107
width: 50
108-
height: 500
108+
height: grid.height + grid.spacing * 4
109109
color: "white"
110110
border.color: "black"
111111
border.width: main.width * 0.05
@@ -124,7 +124,9 @@ Rectangle {
124124
id: grid
125125
spacing: main.width * 0.06
126126
columns: main.pinRows
127-
anchors.centerIn: parent
127+
anchors.horizontalCenter: parent.horizontalCenter
128+
anchors.top: parent.top
129+
anchors.margins: spacing * 2
128130
}
129131
}
130132

0 commit comments

Comments
 (0)