Skip to content

Commit

Permalink
Merge pull request #62 from kambala-decapitator/macos-improvements
Browse files Browse the repository at this point in the history
a couple of fixes
  • Loading branch information
chewitt authored Feb 25, 2024
2 parents 583ef6b + de4bdb0 commit 7b7c06a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ if(WIN32)
endif()

# dependencies
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core)
set(qtComponents Gui Network Widgets LinguistTools)
if(LINUX)
list(APPEND qtComponents DBus)
endif()
find_package(QT NAMES Qt6 REQUIRED COMPONENTS ${qtComponents})
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS ${qtComponents})

if(MSVC_TOOLSET_VERSION EQUAL 142)
Expand Down
8 changes: 7 additions & 1 deletion creator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <QProcess>
#include <QVersionNumber>
#include <QSignalBlocker>
#include <QApplication>

#if defined(Q_OS_WIN)
#include "diskwriter_windows.h"
Expand Down Expand Up @@ -74,6 +75,12 @@ Creator::Creator(Privileges &privilegesArg, QWidget *parent) :

ui->setupUi(this);

#ifdef Q_OS_MACOS
auto fontAbout = ui->labelAbout->font();
fontAbout.setPointSize(fontAbout.pointSize() + 2);
ui->labelAbout->setFont(fontAbout);
#endif

#if defined(Q_OS_WIN)
diskWriter = new DiskWriter_windows();
devEnumerator = new DeviceEnumerator_windows();
Expand Down Expand Up @@ -305,7 +312,6 @@ void Creator::retranslateUi()
// retranslate dynamic texts
ui->labelVersion->setText(tr("Version: %1\nBuild date: %2").arg(QLatin1String{BUILD_VERSION}, QLatin1String{BUILD_DATE}));

ui->labelAbout->setTextFormat(Qt::RichText);
ui->labelAbout->setText(QString("<html><head/><body><p align=\"center\"><span style=\" font-size:16pt; font-weight:600;\"><h2>&copy; LibreELEC %8</h2></span></p><p align=\"center\">%1<br/>%2</p><p align=\"center\">%3<br/><a href=\"https://github.com/LibreELEC/usb-sd-creator\"><span style=\" text-decoration: underline; color:#0000ff;\">https://github.com/LibreELEC/usb-sd-creator</span></a><br/></p><p align=\"center\">%4<br/>%5</p><p align=\"center\">%6<br/>%7 <br/><br/><a href=\"https://opencollective.com/libreelec/donate\"><img src=\":/icons/opencollective.png\"></a></p></body></html>") \
.arg(tr("This software was created with love and released"))
.arg(tr("under GPLv2, using earlier work from RasPlex."))
Expand Down
3 changes: 3 additions & 0 deletions creator.ui
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,9 @@
<pointsize>10</pointsize>
</font>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
Expand Down
2 changes: 2 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ void noMessageOutput(QtMsgType type, const QMessageLogContext &context, const QS

int main(int argc, char *argv[])
{
#ifdef Q_OS_WINDOWS
qputenv("QT_QPA_PLATFORM", "windows:darkmode=0");
#endif
QApplication app(argc, argv);

const auto cmdArgs = app.arguments();
Expand Down

0 comments on commit 7b7c06a

Please sign in to comment.