@@ -13,17 +13,16 @@ Item {
13
13
14
14
function setMode (mode ) {
15
15
if (root .mode !== mode) {
16
- url_text_field .clear ()
16
+ url_text_field .clear ();
17
17
}
18
-
19
- root .mode = mode
18
+ root .mode = mode;
20
19
}
21
20
22
21
Connections {
23
22
target: AudioTool .editor
24
23
25
24
function onCurrentElementChanged () {
26
- root .setMode (0 )
25
+ root .setMode (0 );
27
26
}
28
27
}
29
28
54
53
55
54
CustomButton {
56
55
id: spotify_button
57
- visible: AudioTool .editor .currentElement
58
- && AudioTool .editor .currentElement .type === 0
56
+ visible: AudioTool .editor .currentElement && AudioTool .editor .currentElement .type === 0
59
57
60
58
iconText: FontAwesome .spotify
61
59
iconFont: FontAwesome .fontBrands
@@ -142,56 +140,55 @@ Item {
142
140
iconText: FontAwesome .plus
143
141
144
142
onClicked: {
145
- AudioTool .editor .addUrl (url_text_field .text , root .mode )
143
+ AudioTool .editor .addUrl (url_text_field .text , root .mode );
146
144
}
147
145
}
148
146
}
149
147
150
- // Rectangle {
151
- // id: youtube_adder
152
- // visible: root.mode > 1 && AudioTool.editor.currentElement
153
- // && AudioTool.editor.currentElement.type < 2
154
- // anchors.topMargin: 5
155
- // anchors.top: url_adder.bottom
156
- // anchors.right: parent.right
157
- // anchors.left: parent.left
158
-
159
- // height: Sizes.toolbarHeight
160
- // color: palette.alternateBase
161
-
162
- // CustomToolBarButton {
163
- // id: youtube_adder_icon
164
- // anchors.left: parent.left
165
- // anchors.leftMargin: 10
166
- // enabled: false
167
-
168
- // iconText: FontAwesome.youtube
169
- // iconFont: FontAwesome.fontBrands
170
- // }
171
-
172
- // TextField {
173
- // id: youtube_text_field
174
- // anchors.left: youtube_adder_icon.right
175
- // anchors.right: youtube_adder_button.left
176
- // anchors.top: parent.top
177
- // anchors.bottom: parent.bottom
178
- // anchors.leftMargin: 10
179
- // anchors.rightMargin: 10
180
-
181
- // selectByMouse: true
182
- // placeholderText: qsTr("YouTube URL")
183
- // }
184
-
185
- // CustomToolBarButton {
186
- // id: youtube_adder_button
187
- // anchors.right: parent.right
188
- // anchors.rightMargin: 10
189
-
190
- // iconText: FontAwesome.plus
191
-
192
- // onClicked: {
193
- // AudioTool.editor.addYtUrl(youtube_text_field.text)
194
- // }
195
- // }
196
- // }
148
+ Rectangle {
149
+ id: youtube_adder
150
+ visible: root .mode > 1 && AudioTool .editor .currentElement && AudioTool .editor .currentElement .type < 2
151
+ anchors .topMargin : 5
152
+ anchors .top : url_adder .bottom
153
+ anchors .right : parent .right
154
+ anchors .left : parent .left
155
+
156
+ height: Sizes .toolbarHeight
157
+ color: palette .alternateBase
158
+
159
+ CustomToolBarButton {
160
+ id: youtube_adder_icon
161
+ anchors .left : parent .left
162
+ anchors .leftMargin : 10
163
+ enabled: false
164
+
165
+ iconText: FontAwesome .youtube
166
+ iconFont: FontAwesome .fontBrands
167
+ }
168
+
169
+ TextField {
170
+ id: youtube_text_field
171
+ anchors .left : youtube_adder_icon .right
172
+ anchors .right : youtube_adder_button .left
173
+ anchors .top : parent .top
174
+ anchors .bottom : parent .bottom
175
+ anchors .leftMargin : 10
176
+ anchors .rightMargin : 10
177
+
178
+ selectByMouse: true
179
+ placeholderText: qsTr (" YouTube URL" )
180
+ }
181
+
182
+ CustomToolBarButton {
183
+ id: youtube_adder_button
184
+ anchors .right : parent .right
185
+ anchors .rightMargin : 10
186
+
187
+ iconText: FontAwesome .plus
188
+
189
+ onClicked: {
190
+ AudioTool .editor .addYtUrl (youtube_text_field .text );
191
+ }
192
+ }
193
+ }
197
194
}
0 commit comments