Skip to content

Commit

Permalink
UI/UX changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed Oct 14, 2024
1 parent 3c7a1b7 commit b158c05
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
12 changes: 4 additions & 8 deletions src/app/GUI/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1259,13 +1259,11 @@ void MainWindow::askInstallRenderPresets()
void MainWindow::openWelcomeDialog()
{
mStackWidget->setCurrentIndex(mStackIndexWelcome);
mActions.setMovePathMode();
}

void MainWindow::closeWelcomeDialog()
{
mStackWidget->setCurrentIndex(mStackIndexScene);
mActions.setMovePathMode();
}

void MainWindow::addCanvasToRenderQue()
Expand Down Expand Up @@ -1611,17 +1609,15 @@ void MainWindow::clearAll()
setFileChangedSinceSaving(false);
mObjectSettingsWidget->setMainTarget(nullptr);

//mTimeline->clearAll();
mRenderWidget->clearRenderQueue();
mFillStrokeSettings->clearAll();
mFontWidget->clearAll();
mDocument.clear();
mLayoutHandler->clear();
// for(ClipboardContainer *cont : mClipboardContainers) {
// delete cont;
// }
// mClipboardContainers.clear();
FilesHandler::sInstance->clear();
//mBoxListWidget->clearAll();

mActions.setMovePathMode();

openWelcomeDialog();
}

Expand Down
11 changes: 10 additions & 1 deletion src/ui/widgets/welcomedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "appsupport.h"
#include "themesupport.h"
#include "Private/esettings.h"
#include "GUI/global.h"

WelcomeDialog::WelcomeDialog(QMenu *recentMenu,
const std::function<void()> &newFunc,
Expand Down Expand Up @@ -89,7 +90,7 @@ WelcomeDialog::WelcomeDialog(QMenu *recentMenu,
connect(openButton, &QPushButton::released, openFunc);

mRecentButton = new QPushButton(QIcon::fromTheme("file_folder"),
tr("Recent"),
tr("Recent Files"),
this);
mRecentButton->setFocusPolicy(Qt::NoFocus);
mRecentButton->setSizePolicy(QSizePolicy::Preferred,
Expand All @@ -106,6 +107,14 @@ WelcomeDialog::WelcomeDialog(QMenu *recentMenu,
buttonLay->addWidget(newButton);
buttonLay->addWidget(openButton);
mainLay->addWidget(sceneWid);

eSizesUI::widget.add(newButton, [this,
newButton,
openButton](const int size) {
newButton->setIconSize({size, size});
openButton->setIconSize({size, size});
mRecentButton->setIconSize({size, size});
});
}

void WelcomeDialog::paintEvent(QPaintEvent *)
Expand Down

0 comments on commit b158c05

Please sign in to comment.