Skip to content

Commit b1d11aa

Browse files
committed
feat(ui): add project-aligned logo and integrate across app
1 parent a62f1ac commit b1d11aa

6 files changed

Lines changed: 96 additions & 15 deletions

File tree

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ set(APP_SOURCES
6161
# ─── QML Resources ────────────────────────────────────────────────────────────
6262
qt_add_executable(ro-control ${APP_SOURCES})
6363

64+
set_source_files_properties(src/qml/assets/ro-control-logo.svg PROPERTIES
65+
QT_RESOURCE_ALIAS "assets/ro-control-logo.svg"
66+
)
67+
6468
qt_add_qml_module(ro-control
6569
URI "rocontrol"
6670
VERSION 1.0
@@ -71,6 +75,8 @@ qt_add_qml_module(ro-control
7175
src/qml/pages/SettingsPage.qml
7276
src/qml/components/StatCard.qml
7377
src/qml/components/SidebarMenu.qml
78+
RESOURCES
79+
src/qml/assets/ro-control-logo.svg
7480
)
7581

7682
if(Qt6LinguistTools_FOUND)
Lines changed: 25 additions & 9 deletions
Loading

src/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ int main(int argc, char *argv[]) {
2323
app.setApplicationVersion("0.1.0");
2424
app.setOrganizationName("Acik-Kaynak-Gelistirme-Toplulugu");
2525
app.setOrganizationDomain("github.com/Acik-Kaynak-Gelistirme-Toplulugu");
26-
app.setWindowIcon(QIcon::fromTheme("ro-control"));
26+
app.setWindowIcon(
27+
QIcon::fromTheme("ro-control",
28+
QIcon(":/qt/qml/rocontrol/assets/ro-control-logo.svg")));
2729

2830
NvidiaDetector detector;
2931
NvidiaInstaller installer;

src/qml/Main.qml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,20 @@ ApplicationWindow {
2525
anchors.fill: parent
2626
anchors.margins: 8
2727

28+
Image {
29+
source: "qrc:/qt/qml/rocontrol/assets/ro-control-logo.svg"
30+
sourceSize.width: 30
31+
sourceSize.height: 30
32+
fillMode: Image.PreserveAspectFit
33+
Layout.preferredWidth: 30
34+
Layout.preferredHeight: 30
35+
}
36+
37+
Item {
38+
Layout.preferredWidth: 8
39+
Layout.preferredHeight: 1
40+
}
41+
2842
Label {
2943
text: "ro-Control"
3044
font.pixelSize: 20

src/qml/assets/ro-control-logo.svg

Lines changed: 29 additions & 0 deletions
Loading

src/qml/components/SidebarMenu.qml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,26 @@ Rectangle {
3030
width: parent.width
3131
height: 70
3232

33-
Label {
33+
Row {
3434
anchors.centerIn: parent
35-
text: "ro-Control"
36-
font.pixelSize: 22
37-
font.bold: true
38-
color: "#cdd6f4"
35+
spacing: 10
36+
37+
Image {
38+
source: "qrc:/qt/qml/rocontrol/assets/ro-control-logo.svg"
39+
sourceSize.width: 28
40+
sourceSize.height: 28
41+
width: 28
42+
height: 28
43+
fillMode: Image.PreserveAspectFit
44+
}
45+
46+
Label {
47+
text: "ro-Control"
48+
font.pixelSize: 22
49+
font.bold: true
50+
color: "#cdd6f4"
51+
anchors.verticalCenter: parent.verticalCenter
52+
}
3953
}
4054
}
4155

0 commit comments

Comments
 (0)