Skip to content

Commit

Permalink
Theme icon fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed Aug 11, 2024
1 parent fd88cec commit b05b90a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/app/GUI/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1473,11 +1473,11 @@ void MainWindow::setupToolBar()
mToolbar->setFocusPolicy(Qt::NoFocus);
mToolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
mToolbar->setMovable(false);
/*eSizesUI::widget.add(mToolbar, [this](const int size) {
if (eSettings::instance().fCurrentInterfaceDPI != 1.) {
eSizesUI::widget.add(mToolbar, [this](const int size) {
//if (eSettings::instance().fCurrentInterfaceDPI != 1.) {
mToolbar->setIconSize(QSize(size, size));
}
});*/
//}
});
addToolBar(mToolbar);


Expand Down
8 changes: 5 additions & 3 deletions src/ui/widgets/aboutwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include "aboutwidget.h"
#include "appsupport.h"
#include "themesupport.h"

#include <QHBoxLayout>
#include <QVBoxLayout>
Expand All @@ -42,12 +43,13 @@ AboutWidget::AboutWidget(QWidget *parent)
const auto mTopLabel = new QLabel(this);

QString label = QString::fromUtf8("<div style=\"margin: 0; padding: 0; text-align: center; font-weight: normal;\">"
"<img src=\":/icons/hicolor/%2x%2/apps/%4.png\" width=\"%2\" height=\"%2\">"
"<img src=\":/icons/hicolor/%5x%5/apps/%4.png\" width=\"%2\" height=\"%2\">"
"<h1 style=\"font-weight: normal; margin-top: 0; padding-top: 0;\">%3<br><span style=\"font-size: large;\">%1</span></h1>"
"</div>").arg(AppSupport::getAppVersion(),
QString::number(96),
QString::number(ThemeSupport::getIconSize(96).width()),
AppSupport::getAppDisplayName(),
AppSupport::getAppID());
AppSupport::getAppID(),
QString::number(ThemeSupport::getIconSize(96 * 2).width()));
const auto buildInfo = AppSupport::getAppBuildInfo(true);
if (!buildInfo.isEmpty()) {
label.append(buildInfo);
Expand Down
2 changes: 1 addition & 1 deletion src/ui/widgets/fakemenubar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ FakeMenuBar::FakeMenuBar(QWidget* const parent) :
mActsLayout = new QHBoxLayout();
mActsLayout->setAlignment(Qt::AlignLeft);
mActsLayout->setContentsMargins(0, 0, 0, 0);
mActsLayout->setSpacing(0);
mActsLayout->setSpacing(1);

mainLayout->addLayout(mActsLayout);

Expand Down
9 changes: 6 additions & 3 deletions src/ui/widgets/welcomedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#include <QLabel>

#include "appsupport.h"
#include "themesupport.h"
#include "Private/esettings.h"

WelcomeDialog::WelcomeDialog(QMenu *recentMenu,
const std::function<void()> &newFunc,
Expand All @@ -54,13 +56,14 @@ WelcomeDialog::WelcomeDialog(QMenu *recentMenu,
logoLabel->setMinimumWidth(logoSize*2);
logoLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
logoLabel->setText(QString::fromUtf8("<div style=\"margin: 0; padding: 0; text-align: center; font-weight: normal;\">"
"<p style=\"margin: 0; padding: 0;\"><img src=\":/icons/hicolor/%2x%2/apps/%4.png\" width=\"%2\" height=\"%2\"></p>"
"<p style=\"margin: 0; padding: 0;\"><img src=\":/icons/hicolor/%5x%5/apps/%4.png\" width=\"%2\" height=\"%2\"></p>"
"<h1 style=\"font-weight: normal; margin-top: 0; padding-top: 0;\">%3<br><span style=\"font-size: large;\">%1</span></h1>"
"</div>")
.arg(AppSupport::getAppVersion(),
QString::number(logoSize),
QString::number(ThemeSupport::getIconSize(logoSize).width()),
AppSupport::getAppDisplayName(),
AppSupport::getAppID()));
AppSupport::getAppID(),
QString::number(ThemeSupport::getIconSize(logoSize * 2).width())));

const auto buttonWid = new QWidget(this);
buttonWid->setContentsMargins(0, 0, 0, 0);
Expand Down

0 comments on commit b05b90a

Please sign in to comment.