diff --git a/LibREDasm b/LibREDasm index 70692184..5c120b39 160000 --- a/LibREDasm +++ b/LibREDasm @@ -1 +1 @@ -Subproject commit 70692184aeb581f8b3b9fc4464e13143b6505e20 +Subproject commit 5c120b395f0811c566535ed40a88a96ae074eabf diff --git a/artwork/logo_20190204.png b/artwork/logo_20190204.png deleted file mode 100644 index 69d3cc68..00000000 Binary files a/artwork/logo_20190204.png and /dev/null differ diff --git a/dialogs/aboutdialog/aboutdialog.cpp b/dialogs/aboutdialog/aboutdialog.cpp index 1779adf7..44d07f09 100644 --- a/dialogs/aboutdialog/aboutdialog.cpp +++ b/dialogs/aboutdialog/aboutdialog.cpp @@ -1,21 +1,28 @@ #include "aboutdialog.h" #include "ui_aboutdialog.h" +#include "../../redasmsettings.h" #include "../../themeprovider.h" +#include #include #include #include +#include AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDialog) { ui->setupUi(this); - ui->lblHeader->setText(QString(ui->lblHeader->text()).arg(REDASM_VERSION, QT_VERSION_STR)); + ui->lblVersion->setText(REDASM_VERSION); + ui->lblQtVersion->setText(QT_VERSION_STR); + ui->lblLibREDasmVersion->setText(LIBREDASM_VERSION); + ui->lblRDApiLevel->setText(QString::number(RDAPI_LEVEL)); - this->setStyleSheet("QTextEdit {" - "background: transparent;" - "border: 0;" - "}"); + ui->tbDependencies->setStyleSheet("QTextEdit {" + "background: transparent;" + "border: 0;" + "}"); this->initDependencies(); + this->initSearchPaths(); if(ThemeProvider::isDarkTheme()) ui->lblLogo->setPixmap(QPixmap(":/res/logo_dark.png")); else ui->lblLogo->setPixmap(QPixmap(":/res/logo.png")); @@ -34,11 +41,30 @@ void AboutDialog::initDependencies() }; QTextCursor cursor(ui->tbDependencies->document()); - cursor.insertHtml("Thanks to:
"); + QTextListFormat lf; + lf.setStyle(QTextListFormat::ListDisc); + cursor.insertList(lf); for(const auto& [name, url] : DEPENDENCIES) { - cursor.insertHtml(QString("- %2").arg(url, name)); + QTextCharFormat cf; + cf.setAnchor(true); + cf.setAnchorHref(url); + cf.setForeground(qApp->palette().brush(QPalette::Highlight)); + cursor.insertText(" " + name, cf); if(name != DEPENDENCIES.back().first) cursor.insertText("\n"); } } + +void AboutDialog::initSearchPaths() +{ + RDConfig_GetPluginPaths([](const char* path, void* userdata) { + auto* thethis = reinterpret_cast(userdata); + thethis->addItem(path); + }, ui->lwPluginPaths); + + RDConfig_GetDatabasePaths([](const char* path, void* userdata) { + auto* thethis = reinterpret_cast(userdata); + thethis->addItem(path); + }, ui->lwDatabasePaths); +} diff --git a/dialogs/aboutdialog/aboutdialog.h b/dialogs/aboutdialog/aboutdialog.h index ef3adb43..dd282258 100644 --- a/dialogs/aboutdialog/aboutdialog.h +++ b/dialogs/aboutdialog/aboutdialog.h @@ -16,6 +16,7 @@ class AboutDialog : public QDialog private: void initDependencies(); + void initSearchPaths(); private: Ui::AboutDialog *ui; diff --git a/dialogs/aboutdialog/aboutdialog.ui b/dialogs/aboutdialog/aboutdialog.ui index 27aced1b..843cf530 100644 --- a/dialogs/aboutdialog/aboutdialog.ui +++ b/dialogs/aboutdialog/aboutdialog.ui @@ -9,8 +9,8 @@ 0 0 - 682 - 323 + 800 + 500 @@ -21,8 +21,14 @@ - 0 - 0 + 800 + 500 + + + + + 800 + 500 @@ -31,109 +37,337 @@ true - - - 14 - - - 14 - - - 14 - - - 14 - + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 0 + 0 + + + + + 256 + 256 + + + + + 256 + 256 + + + + + 0 + 0 + + + + + + + Qt::AlignCenter + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + - - - 16 - + - + + + 0 + + + 6 + + + 12 + - - - - 0 - 0 - - - - - 256 - 256 - - - - - 256 - 256 - - - - - 0 - 0 - + + + + Monospace + 24 + 75 + true + - + <html><head/><body><p><span style=" color:#c03131;">REDasm</span></p></body></html> - Qt::AlignCenter + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - Qt::Vertical + + + + Monospace + 14 + - - - 20 - 40 - + + <html><head/><body><p><span style=" color:#2b2b2b;">The OpenSource Disassembler</span></p></body></html> + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - + - - - + + + 8 + + + + + + 75 + true + + - <html><head/><body><p align="center"><span style=" font-size:18pt; font-weight:600;">REDasm: The OpenSource Disassembler</span></p><p><span style=" font-size:12pt; font-weight:600;">Version</span><span style=" font-size:12pt;">: %1<br/></span><span style=" font-size:12pt; font-weight:600;">Qt Version</span><span style=" font-size:12pt;">: %2</span></p></body></html> + Version: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - false + + + + <version> - - QTextEdit::NoWrap + + + + + + + 75 + true + - - true + + LibREDasm Version: - - Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - true + + + + + + <libredasmversion> + + + + + + + + 75 + true + + + + QtVersion: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + <qtversion> + + + + + + + + 75 + true + + + + RDAPI Level: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + <rdapilevel> - - - - + + + + QTabWidget::South + + + 0 + + + + Thanks To + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + false + + + QTextEdit::NoWrap + + + true + + + Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse + + + true + + + + + + + + Plugin Paths + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + true + + + + + + + + Database Paths + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + true + + + + + + + diff --git a/redasmsettings.cpp b/redasmsettings.cpp index 89c0d881..480e1664 100644 --- a/redasmsettings.cpp +++ b/redasmsettings.cpp @@ -71,7 +71,7 @@ QFont REDasmSettings::font() REDasmSettings settings; QFont f = settings.currentFont(); - if(!(f.styleHint() & QFont::Monospace)) + if(f.styleHint() == QFont::Monospace) { f.setFamily("Monospace"); // Force Monospaced font f.setStyleHint(QFont::TypeWriter);