Skip to content

Commit

Permalink
HiDPI: try to fix issues on Windows (part redux)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed Aug 11, 2024
1 parent 31e2f13 commit 28ed0ce
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions src/app/GUI/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ MainWindow::MainWindow(Document& document,

mDocument.setPath("");

int sideBarMin = 320;
//int sideBarMin = 320;

mFillStrokeSettings = new FillStrokeSettingsWidget(mDocument, this);
mFillStrokeSettings->setMinimumWidth(sideBarMin);
//mFillStrokeSettings->setMinimumWidth(sideBarMin);

mFontWidget = new FontsWidget(this);
mFontWidget->setDisabled(true);
Expand Down Expand Up @@ -311,7 +311,7 @@ MainWindow::MainWindow(Document& document,
mTabColorText->setObjectName("TabWidgetWide");
mTabColorText->tabBar()->setFocusPolicy(Qt::NoFocus);
mTabColorText->setContentsMargins(frictionMargins);
mTabColorText->setMinimumWidth(sideBarMin);
//mTabColorText->setMinimumWidth(sideBarMin);
mTabColorText->setTabPosition(QTabWidget::South);
eSizesUI::widget.add(mTabColorText, [this](const int size) {
//if (eSettings::instance().fCurrentInterfaceDPI != 1.) {
Expand All @@ -331,7 +331,7 @@ MainWindow::MainWindow(Document& document,
mTabProperties->setObjectName("TabWidgetWide");
mTabProperties->tabBar()->setFocusPolicy(Qt::NoFocus);
mTabProperties->setContentsMargins(frictionMargins);
mTabProperties->setMinimumWidth(sideBarMin);
//mTabProperties->setMinimumWidth(sideBarMin);
mTabProperties->setTabPosition(QTabWidget::South);
eSizesUI::widget.add(mTabProperties, [this](const int size) {
//if (eSettings::instance().fCurrentInterfaceDPI != 1.) {
Expand Down Expand Up @@ -1280,9 +1280,9 @@ void MainWindow::setupMenuBar()
const auto frictionButton = new QToolButton(this);
frictionButton->setObjectName(QString::fromUtf8("ToolButton"));
frictionButton->setPopupMode(QToolButton::InstantPopup);
if (eSettings::instance().fCurrentInterfaceDPI != 1.) {
/*if (eSettings::instance().fCurrentInterfaceDPI != 1.) {
frictionButton->setIconSize(QSize(eSizesUI::widget, eSizesUI::widget));
}
}*/
frictionButton->setIcon(QIcon::fromTheme(AppSupport::getAppID()));
frictionButton->setDefaultAction(aboutAct);
frictionButton->setToolTip(QString());
Expand Down 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) {
/*eSizesUI::widget.add(mToolbar, [this](const int size) {
if (eSettings::instance().fCurrentInterfaceDPI != 1.) {
mToolbar->setIconSize(QSize(size, size));
}
});
});*/
addToolBar(mToolbar);


Expand Down
4 changes: 2 additions & 2 deletions src/app/GUI/toolbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ void MainWindow::setupToolBox()
setupToolBoxNodes();
setupToolBoxDraw();

eSizesUI::widget.add(mToolBoxMain, [this](const int size) {
/*eSizesUI::widget.add(mToolBoxMain, [this](const int size) {
if (eSettings::instance().fCurrentInterfaceDPI != 1.) {
mToolBoxMain->setIconSize(QSize(size, size));
mToolBoxNodes->setIconSize(QSize(size, size));
mToolBoxDraw->setIconSize(QSize(size, size));
}
});
});*/

mToolBoxMainIndex = mToolBoxStack->addWidget(mToolBoxMain);
mToolBoxNodesIndex = mToolBoxExtraStack->addWidget(mToolBoxNodes);
Expand Down

0 comments on commit 28ed0ce

Please sign in to comment.