Skip to content

Commit fc9a05a

Browse files
committed
qml: allow to resize PeersIndicator component
1 parent 4f6468e commit fc9a05a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/qml/components/PeersIndicator.qml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,25 @@
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

55
import QtQuick 2.15
6-
import QtQuick.Layouts 1.15
76
import "../controls"
87

9-
RowLayout {
8+
Row {
109
id: root
1110
required property int numOutboundPeers
1211
required property int maxNumOutboundPeers
1312
required property bool paused
1413
property int size: 5
14+
property real indicatorDimensions: 3
15+
property real indicatorSpacing: 5
1516

16-
spacing: 5
17+
height: root.indicatorDimensions
18+
19+
spacing: root.indicatorSpacing
1720
Repeater {
1821
model: 5
1922
Rectangle {
20-
width: 3
21-
height: 3
23+
width: root.indicatorDimensions
24+
height: root.indicatorDimensions
2225
radius: width / 2
2326
color: Theme.color.neutral9
2427
opacity: (index === 0 && root.numOutboundPeers > 0) || (index + 1 <= root.size * root.numOutboundPeers / root.maxNumOutboundPeers) ? 0.95 : 0.45

0 commit comments

Comments
 (0)