Skip to content

Commit 81a7345

Browse files
committed
[MaterialIcons] MaterialToolLabel: Add new accessors to the item's elements
1 parent f495520 commit 81a7345

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

meshroom/ui/qml/GraphEditor/Edge.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Item {
118118
anchors.centerIn: parent
119119

120120
iconText: MaterialIcons.loop
121-
label: (root.iteration + 1) + "/" + root.loopSize + " "
121+
label.text: (root.iteration + 1) + "/" + root.loopSize + " "
122122

123123
labelIconColor: palette.base
124124
ToolTip.text: "Foreach Loop"

meshroom/ui/qml/MaterialIcons/MaterialToolLabel.qml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,19 @@ import QtQuick.Layouts
99

1010
Item {
1111
id: control
12+
property alias icon: iconItem
1213
property alias iconText: iconItem.text
1314
property alias iconSize: iconItem.font.pointSize
14-
property alias label: labelItem.text
15+
property alias label: labelItem
16+
property alias labelIconRow: contentRow
1517
property var labelIconColor: palette.text
18+
property alias labelIconMouseArea: mouseArea
1619
implicitWidth: childrenRect.width
1720
implicitHeight: childrenRect.height
1821
anchors.rightMargin: 5
1922

2023
RowLayout {
24+
id: contentRow
2125
Label {
2226
id: iconItem
2327
font.family: MaterialIcons.fontFamily

meshroom/ui/qml/Viewer3D/Inspector3D.qml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ FloatingPane {
241241

242242
MaterialToolLabel {
243243
iconText: MaterialIcons.stop
244-
label: {
244+
label.text: {
245245
var id = undefined
246246
// Ensure there are entries in resectionGroups and a valid resectionId before accessing anything
247247
if (Viewer3DSettings.resectionId !== undefined && Viewer3DSettings.resectionGroups &&
@@ -259,7 +259,7 @@ FloatingPane {
259259

260260
MaterialToolLabel {
261261
iconText: MaterialIcons.auto_awesome_motion
262-
label: {
262+
label.text: {
263263
let currentCameras = 0
264264
if (Viewer3DSettings.resectionGroups) {
265265
for (let i = 0; i <= Viewer3DSettings.resectionIdCount; i++) {
@@ -277,7 +277,7 @@ FloatingPane {
277277

278278
MaterialToolLabel {
279279
iconText: MaterialIcons.videocam
280-
label: {
280+
label.text: {
281281
let totalCameras = 0
282282
if (Viewer3DSettings.resectionGroups) {
283283
for (let i = 0; i <= Viewer3DSettings.resectionIdCount; i++) {

0 commit comments

Comments
 (0)