Skip to content

Commit 249a969

Browse files
committed
Swap theme from the Adwaita to Fusion (#659)
1 parent e713a46 commit 249a969

33 files changed

+47
-2442
lines changed

.github/workflows/ccpp.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,6 @@ jobs:
2929
uses: jurplel/install-qt-action@v3
3030
with:
3131
version: ${{env.QT_VERSION}}
32-
- name: Install Adwaita-qt
33-
run: |
34-
git clone https://github.com/FedoraQt/adwaita-qt.git adwaita-qt
35-
cd adwaita-qt
36-
mkdir build
37-
cd build
38-
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DUSE_QT6=ON
39-
make -j2
40-
sudo make install
4132

4233
- name: Build
4334
run: |

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ endif()
3939

4040
find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED Core DBus Gui Network Svg Qml Quick QuickControls2 Widgets)
4141

42-
if (UNIX AND NOT APPLE)
43-
find_package(AdwaitaQt6 "1.4.2" REQUIRED)
44-
endif()
45-
4642
add_subdirectory(src)
4743

4844
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)

dist/fedora/mediawriter.spec

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ BuildRequires: gettext
1515
BuildRequires: cmake
1616
BuildRequires: make
1717
BuildRequires: libappstream-glib
18-
BuildRequires: libadwaita-qt6-devel
1918
BuildRequires: qt6-qtbase-devel
2019
BuildRequires: qt6-qtdeclarative-devel
2120
BuildRequires: xz-devel
@@ -43,9 +42,6 @@ like flash drives or memory cards.
4342
%prep
4443
%autosetup -p1 -n MediaWriter-%{version}
4544

46-
# Install the theme into correct prefix when building for /app
47-
sed -i 's@\${QT6_INSTALL_QML}@%{_qt6_qmldir}@' src/theme/CMakeLists.txt
48-
4945
%build
5046
%cmake
5147

@@ -71,9 +67,6 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/org.fedo
7167
%{_datadir}/icons/hicolor/128x128/apps/org.fedoraproject.MediaWriter.png
7268
%{_datadir}/icons/hicolor/256x256/apps/org.fedoraproject.MediaWriter.png
7369
%{_datadir}/icons/hicolor/512x512/apps/org.fedoraproject.MediaWriter.png
74-
%{_qt6_qmldir}/QtQuick/Controls/org/fedoraproject/AdwaitaTheme/
75-
%{_qt6_qmldir}/org/fedoraproject/AdwaitaTheme/libadwaitathemeplugin.so
76-
%{_qt6_qmldir}/org/fedoraproject/AdwaitaTheme/qmldir
7770

7871
%changelog
7972
* Mon May 09 06 2022 Jan Grulich <[email protected]> - 5.0.0-1

dist/flatpak/fmw-paths.patch

Lines changed: 0 additions & 14 deletions
This file was deleted.

dist/flatpak/org.fedoraproject.MediaWriter.json

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,6 @@
2121
"/lib/pkgconfig"
2222
],
2323
"modules": [
24-
{
25-
"name": "Adwaita-qt",
26-
"buildsystem": "cmake",
27-
"config-opts": ["-DUSE_QT6=ON"],
28-
"sources": [
29-
{
30-
"type": "git",
31-
"url": "https://github.com/FedoraQt/adwaita-qt.git",
32-
"tag": "1.4.2"
33-
},
34-
{
35-
"type": "shell",
36-
"commands": [
37-
"sed -i 's@add_subdirectory(style)@#add_subdirectory(style)@' src/CMakeLists.txt"
38-
]
39-
}
40-
]
41-
},
4224
{
4325
"name": "MediaWriter",
4426
"buildsystem": "cmake",
@@ -47,10 +29,6 @@
4729
"type": "git",
4830
"url": "https://github.com/FedoraQt/MediaWriter.git",
4931
"branch": "main"
50-
},
51-
{
52-
"type": "patch",
53-
"path": "fmw-paths.patch"
5432
}
5533
]
5634
}

src/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
add_subdirectory(helper)
22
add_subdirectory(app)
33
add_subdirectory(lib)
4-
if (UNIX AND NOT APPLE)
5-
add_subdirectory(theme)
6-
endif()

src/app/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11

22
include_directories(
33
${CMAKE_SOURCE_DIR}/src/lib
4-
${CMAKE_SOURCE_DIR}/src/theme
5-
${ADWAITAQT_INCLUDE_DIRS}
64
)
75

86
set(MEDIAWRITER_SRCS
@@ -17,8 +15,6 @@ set(MEDIAWRITER_SRCS
1715
units.cpp
1816
utilities.cpp
1917
versionchecker.cpp
20-
# From theme
21-
${CMAKE_SOURCE_DIR}/src/theme/icon.cpp
2218
)
2319

2420
if (UNIX AND NOT APPLE)
@@ -81,7 +77,6 @@ target_link_libraries(mediawriter
8177
if (UNIX AND NOT APPLE)
8278
target_link_libraries(mediawriter
8379
Qt6::DBus
84-
${ADWAITAQT_LIBRARIES}
8580
)
8681
endif()
8782

src/app/main.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,11 @@
3131

3232
#include "crashhandler.h"
3333
#include "drivemanager.h"
34-
#include "icon.h"
3534
#include "portalfiledialog.h"
3635
#include "releasemanager.h"
3736
#include "units.h"
3837
#include "versionchecker.h"
3938

40-
#if (defined(__linux))
41-
#include <AdwaitaQt6/adwaitacolors.h>
42-
#endif
43-
4439
#ifdef QT_STATIC
4540
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
4641

@@ -74,10 +69,6 @@ int main(int argc, char **argv)
7469
QApplication::setOrganizationName("fedoraproject.org");
7570
QApplication::setApplicationName("MediaWriter");
7671

77-
#if (defined(__linux))
78-
QQuickStyle::setStyle("QtQuick.Controls.org.fedoraproject.AdwaitaTheme");
79-
#endif
80-
8172
QApplication app(argc, argv);
8273
options.parse(app.arguments());
8374

@@ -87,10 +78,6 @@ int main(int argc, char **argv)
8778
if (translator.load(QLocale(QLocale().language(), QLocale().country()), QLatin1String(), QLatin1String(), ":/translations"))
8879
app.installTranslator(&translator);
8980

90-
#if (defined(__linux))
91-
QPalette adwaitaPalette = Adwaita::Colors::palette();
92-
QGuiApplication::setPalette(adwaitaPalette);
93-
#endif
9481
QGuiApplication::setDesktopFileName("org.fedoraproject.MediaWriter.desktop");
9582

9683
mDebug() << "Injecting QML context properties";
@@ -109,8 +96,6 @@ int main(int argc, char **argv)
10996
engine.rootContext()->setContextProperty("platformSupportsDelayedWriting", false);
11097
#endif
11198

112-
qmlRegisterType<Icon>("MediaWriter", 1, 0, "Icon");
113-
11499
mDebug() << "Loading the QML source code";
115100

116101
engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml")));

src/app/qml/AboutDialog.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ ApplicationWindow {
9292
Button {
9393
id: closeButton
9494
onClicked: aboutDialog.close()
95-
text: qsTr("Close")
95+
text: qsTr("&Close")
9696
}
9797
}
9898
}

src/app/qml/CancelDialog.qml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ ApplicationWindow {
8585
Button {
8686
id: continueButton
8787
onClicked: cancelDialog.close()
88-
text: qsTr("Continue")
88+
text: qsTr("C&ontinue")
8989
}
9090

9191
Button {
@@ -108,13 +108,13 @@ ApplicationWindow {
108108
}
109109
text: {
110110
if (releases.variant.status == Units.DownloadStatus.Downloading || releases.variant.status === Units.DownloadStatus.Download_Verifying)
111-
qsTr("Cancel Download")
111+
qsTr("&Cancel Download")
112112
else if (releases.variant.status == Units.DownloadStatus.Writing)
113-
qsTr("Cancel Writing")
113+
qsTr("&Cancel Writing")
114114
else if (releases.variant.status == Units.DownloadStatus.Write_Verifying)
115-
qsTr("Cancel Verification")
115+
qsTr("&Cancel Verification")
116116
else
117-
qsTr("Cancel")
117+
qsTr("&Cancel")
118118
}
119119
}
120120
}

0 commit comments

Comments
 (0)