diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index ad6443ad4..067698320 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -59,6 +59,15 @@ if(USE_QSCINTILLA) endif() endif() +find_program(JQ_EXISTS "jq") +if(JQ_EXISTS) + execute_process(COMMAND jq -r "[.contributors[].login] | @tsv" "${CMAKE_CURRENT_LIST_DIR}/../../.all-contributorsrc" OUTPUT_VARIABLE CONTRIBUTORS) + string(STRIP "${CONTRIBUTORS}" CONTRIBUTORS) +else() + message(WARNING "No contributors list passed and 'jq' not found") +endif() +add_definitions(-DCONTRIBUTORS="${CONTRIBUTORS}") + # Input file(GLOB SOURCES "src/main/main.cpp" diff --git a/src/gui/src/about-window.cpp b/src/gui/src/about-window.cpp index 56dc04582..f846a3d52 100644 --- a/src/gui/src/about-window.cpp +++ b/src/gui/src/about-window.cpp @@ -22,7 +22,12 @@ AboutWindow::AboutWindow(const QString &version, QWidget *parent) ui->labelCurrent->setText(labelVersion); ui->labelCreator->setText(ui->labelCreator->text().replace("{website}", PROJECT_WEBSITE_URL)); - setFixedSize(400, 228); + + // List contributors + const QString contributors = QString(CONTRIBUTORS).replace('\t', ", "); + ui->labelContributors->setText(ui->labelContributors->text().replace("{contributors}", contributors)); + + setFixedSize(600, heightForWidth(600)); connect(&m_updater, &ProgramUpdater::finished, this, &AboutWindow::finished); m_updater.checkForUpdates(); @@ -37,4 +42,6 @@ void AboutWindow::finished(const QString &newVersion, bool available) { const QString msg = available ? tr("A new version is available: %1").arg(newVersion) : tr("Grabber is up to date"); ui->labelMessage->setText("

" + msg + "

"); + + setFixedSize(600, heightForWidth(600)); } diff --git a/src/gui/src/about-window.ui b/src/gui/src/about-window.ui index 8721b3c34..309857d3a 100644 --- a/src/gui/src/about-window.ui +++ b/src/gui/src/about-window.ui @@ -6,8 +6,8 @@ 0 0 - 400 - 272 + 600 + 295 @@ -74,7 +74,7 @@ - + Special thanks to all contributors for their help improving the program over the years, be it by providing to the code, translations, or reporting issues and suggesting new features. @@ -83,6 +83,16 @@ + + + + <u>Contributors:</u> {contributors} + + + true + + +