Skip to content

Commit 63d30e6

Browse files
committed
Fix GitHub Issue #36: Loss of icons
- Switch to PNG icons in order to avoid SVG lib dependency issues
1 parent 69bec1f commit 63d30e6

45 files changed

Lines changed: 44 additions & 35 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ New features:
1313

1414
Bug fixes:
1515

16+
* Fix GitHub Issue #36: Loss of icons
17+
1618
Other:
1719

1820
1.6.0

src/CMakeLists.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -276,25 +276,25 @@ set(QML_SOURCE_FILES
276276
${QML_BASE_DIR}/ToolBar/ToolBarButtonBase.qml
277277
${QML_BASE_DIR}/UiService.qml
278278
)
279-
set(SVG_SOURCE_FILES
280-
${QML_BASE_DIR}/Graphics/add_box.svg
281-
${QML_BASE_DIR}/Graphics/del_box.svg
282-
${QML_BASE_DIR}/Graphics/delete.svg
283-
${QML_BASE_DIR}/Graphics/icon.svg
284-
${QML_BASE_DIR}/Graphics/mute.svg
285-
${QML_BASE_DIR}/Graphics/play.svg
286-
${QML_BASE_DIR}/Graphics/prev.svg
287-
${QML_BASE_DIR}/Graphics/replay.svg
288-
${QML_BASE_DIR}/Graphics/record.svg
289-
${QML_BASE_DIR}/Graphics/settings.svg
290-
${QML_BASE_DIR}/Graphics/solo.svg
291-
${QML_BASE_DIR}/Graphics/stop.svg
279+
set(PNG_SOURCE_FILES
280+
${QML_BASE_DIR}/Graphics/add_box.png
281+
${QML_BASE_DIR}/Graphics/del_box.png
282+
${QML_BASE_DIR}/Graphics/delete.png
283+
${QML_BASE_DIR}/Graphics/icon.png
284+
${QML_BASE_DIR}/Graphics/mute.png
285+
${QML_BASE_DIR}/Graphics/play.png
286+
${QML_BASE_DIR}/Graphics/prev.png
287+
${QML_BASE_DIR}/Graphics/replay.png
288+
${QML_BASE_DIR}/Graphics/record.png
289+
${QML_BASE_DIR}/Graphics/settings.png
290+
${QML_BASE_DIR}/Graphics/solo.png
291+
${QML_BASE_DIR}/Graphics/stop.png
292292
)
293293
qt_add_qml_module(${BINARY_NAME}
294294
VERSION 1.0
295295
URI ${URI}
296296
QML_FILES ${QML_SOURCE_FILES}
297-
RESOURCES ${SVG_SOURCE_FILES}
297+
RESOURCES ${PNG_SOURCE_FILES}
298298
)
299299

300300
target_include_directories(${BINARY_NAME} PRIVATE contrib/SimpleLogger/src)

src/view/qml/Dialogs/AboutDialog.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Dialog {
1717
width: 256
1818
sourceSize: Qt.size(height, width)
1919
fillMode: Image.PreserveAspectFit
20-
source: "../Graphics/icon.svg"
20+
source: "../Graphics/icon.png"
2121
}
2222
ColumnLayout {
2323
Label {

src/view/qml/Dialogs/EditMidiCcAutomationsDelegate.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ GroupBox {
303303
ToolTip.text: qsTr("Delete")
304304
Image {
305305
id: backgroundImage
306-
source: "../Graphics/delete.svg"
306+
source: "../Graphics/delete.png"
307307
sourceSize: Qt.size(parent.width, parent.height)
308308
width: parent.width
309309
height: parent.height

src/view/qml/Dialogs/EditPitchBendAutomationsDelegate.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ GroupBox {
124124
ToolTip.text: qsTr("Delete")
125125
Image {
126126
id: backgroundImage
127-
source: "../Graphics/delete.svg"
127+
source: "../Graphics/delete.png"
128128
sourceSize: Qt.size(parent.width, parent.height)
129129
width: parent.width
130130
height: parent.height

src/view/qml/Editor/AudioWaveView.qml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,17 @@ Rectangle {
136136

137137
contentItem: Item {
138138
Image {
139-
anchors.centerIn: parent
140-
source: "../Graphics/record.svg"
141-
width: Math.min(parent.width, parent.height) * 0.6
139+
source: "../Graphics/record.png"
140+
width: {
141+
const s = Math.min(parent.width, parent.height) * 0.6;
142+
return Math.max(2, Math.floor(s / 2) * 2);
143+
}
142144
height: width
145+
sourceSize.width: width
146+
sourceSize.height: height
143147
fillMode: Image.PreserveAspectFit
148+
x: Math.floor((parent.width - width) / 2)
149+
y: Math.floor((parent.height - height) / 2)
144150
}
145151
}
146152
}

src/view/qml/Editor/MuteSoloButtons.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Item {
4747
ToolTip.text: qsTr("Mute")
4848
Component.onCompleted: {
4949
setScale(0.9);
50-
setImageSource("../Graphics/mute.svg");
50+
setImageSource("../Graphics/mute.png");
5151
setToggleColor("#ff0000");
5252
}
5353
}
@@ -80,7 +80,7 @@ Item {
8080
ToolTip.text: qsTr("Solo")
8181
Component.onCompleted: {
8282
setScale(0.9);
83-
setImageSource("../Graphics/solo.svg");
83+
setImageSource("../Graphics/solo.png");
8484
setToggleColor("#00ff00");
8585
}
8686
}

src/view/qml/Editor/NoteColumnHeader.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Rectangle {
7272
ToolTip.text: qsTr("Open column settings")
7373
Component.onCompleted: {
7474
setScale(0.8);
75-
setImageSource("../Graphics/settings.svg");
75+
setImageSource("../Graphics/settings.png");
7676
}
7777
}
7878
TextField {

src/view/qml/Editor/SongView.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ Rectangle {
8080
Image {
8181
id: addPatternIcon
8282
anchors.fill: parent
83-
source: "../Graphics/add_box.svg"
83+
sourceSize: Qt.size(width, height)
84+
source: "../Graphics/add_box.png"
8485
fillMode: Image.PreserveAspectFit
8586
opacity: addPatternMouseArea.containsMouse ? 1.0 : 0.7
8687
}

src/view/qml/Editor/TrackHeader.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Rectangle {
7474
ToolTip.text: qsTr("Open track settings")
7575
Component.onCompleted: {
7676
setScale(0.8);
77-
setImageSource("../Graphics/settings.svg");
77+
setImageSource("../Graphics/settings.png");
7878
}
7979
}
8080
TextField {

0 commit comments

Comments
 (0)