Skip to content

Commit

Permalink
UI/UX Stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed Oct 9, 2024
1 parent 67b53db commit bd5548c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 22 deletions.
13 changes: 7 additions & 6 deletions src/app/GUI/Settings/generalsettingswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ GeneralSettingsWidget::GeneralSettingsWidget(QWidget *parent)
, mToolBarActionOpen(nullptr)
, mToolBarActionImport(nullptr)
, mToolBarActionSave(nullptr)
, mToolBarActionScene(nullptr)
//, mToolBarActionScene(nullptr)
, mToolBarActionRender(nullptr)
, mToolBarActionPreview(nullptr)
, mToolBarActionExport(nullptr)
Expand Down Expand Up @@ -181,7 +181,7 @@ void GeneralSettingsWidget::applySettings()
mSett.fToolBarActionOpen = mToolBarActionOpen->isChecked();
mSett.fToolBarActionImport = mToolBarActionImport->isChecked();
mSett.fToolBarActionSave = mToolBarActionSave->isChecked();
mSett.fToolBarActionScene = mToolBarActionScene->isChecked();
//mSett.fToolBarActionScene = mToolBarActionScene->isChecked();
mSett.fToolBarActionRender = mToolBarActionRender->isChecked();
mSett.fToolBarActionPreview = mToolBarActionPreview->isChecked();
mSett.fToolBarActionExport = mToolBarActionExport->isChecked();
Expand Down Expand Up @@ -212,7 +212,7 @@ void GeneralSettingsWidget::updateSettings(bool restore)
mToolBarActionOpen->setChecked(mSett.fToolBarActionOpen);
mToolBarActionImport->setChecked(mSett.fToolBarActionImport);
mToolBarActionSave->setChecked(mSett.fToolBarActionSave);
mToolBarActionScene->setChecked(mSett.fToolBarActionScene);
//mToolBarActionScene->setChecked(mSett.fToolBarActionScene);
mToolBarActionRender->setChecked(mSett.fToolBarActionRender);
mToolBarActionPreview->setChecked(mSett.fToolBarActionPreview);
mToolBarActionExport->setChecked(mSett.fToolBarActionExport);
Expand Down Expand Up @@ -255,15 +255,16 @@ void GeneralSettingsWidget::setupToolBarWidgets(QVBoxLayout *lay)
mToolBarActionOpen = new QCheckBox(tr("Open"), this);
mToolBarActionImport = new QCheckBox(tr("Import"), this);
mToolBarActionSave = new QCheckBox(tr("Save"), this);
mToolBarActionScene = new QCheckBox(tr("Scene"), this);
//mToolBarActionScene = new QCheckBox(tr("Scene"), this);
mToolBarActionRender = new QCheckBox(tr("Render"), this);
mToolBarActionPreview = new QCheckBox(tr("Preview SVG"), this);
mToolBarActionExport = new QCheckBox(tr("Export SVG"), this);

containerInnerLayout->addPair(mToolBarActionNew, mToolBarActionOpen);
containerInnerLayout->addPair(mToolBarActionImport, mToolBarActionSave);
containerInnerLayout->addPair(mToolBarActionScene, mToolBarActionRender);
containerInnerLayout->addPair(mToolBarActionPreview, mToolBarActionExport);
containerInnerLayout->addPair(mToolBarActionRender, mToolBarActionPreview);
containerInnerLayout->addWidgetToFirstColumn(mToolBarActionExport);
containerLayout->addStretch();

lay->addWidget(container);
}
2 changes: 1 addition & 1 deletion src/app/GUI/Settings/generalsettingswidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class GeneralSettingsWidget : public SettingsWidget
QCheckBox *mToolBarActionOpen;
QCheckBox *mToolBarActionImport;
QCheckBox *mToolBarActionSave;
QCheckBox *mToolBarActionScene;
//QCheckBox *mToolBarActionScene;
QCheckBox *mToolBarActionRender;
QCheckBox *mToolBarActionPreview;
QCheckBox *mToolBarActionExport;
Expand Down
29 changes: 15 additions & 14 deletions src/app/GUI/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ void MainWindow::setupMenuBar()

mFileMenu = mMenuBar->addMenu(tr("File", "MenuBar"));

const auto newAct = mFileMenu->addAction(QIcon::fromTheme("file_blank"),
const auto newAct = mFileMenu->addAction(QIcon::fromTheme("file_new"),
tr("New", "MenuBar_File"),
this, &MainWindow::newFile,
Qt::CTRL + Qt::Key_N);
Expand All @@ -443,7 +443,7 @@ void MainWindow::setupMenuBar()
mLinkedAct->setData(tr("Link File"));
cmdAddAction(mLinkedAct);

mImportAct = mFileMenu->addAction(QIcon::fromTheme("file_blank"),
mImportAct = mFileMenu->addAction(QIcon::fromTheme("file_import"),
tr("Import", "MenuBar_File"),
this, qOverload<>(&MainWindow::importFile),
Qt::CTRL + Qt::Key_I);
Expand All @@ -457,7 +457,7 @@ void MainWindow::setupMenuBar()
cmdAddAction(mImportSeqAct);

if (eSettings::instance().fToolBarActionOpen) {
const auto loadToolBtn = new QToolButton(this);
/*const auto loadToolBtn = new QToolButton(this);
loadToolBtn->setPopupMode(QToolButton::MenuButtonPopup);
loadToolBtn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
loadToolBtn->setFocusPolicy(Qt::NoFocus);
Expand All @@ -470,11 +470,8 @@ void MainWindow::setupMenuBar()
loadToolMenu->addAction(mImportSeqAct);
loadToolMenu->addMenu(mRecentMenu);
mToolbar->addWidget(loadToolBtn);
}

if (eSettings::instance().fToolBarActionImport) {
mToolbar->addAction(mImportAct);
mToolbar->addWidget(loadToolBtn);*/
mToolbar->addAction(openAct);
}

mRevertAct = mFileMenu->addAction(QIcon::fromTheme("loop_back"),
Expand Down Expand Up @@ -520,7 +517,7 @@ void MainWindow::setupMenuBar()
mPreviewSVGAct->setData(mPreviewSVGAct->toolTip());
cmdAddAction(mPreviewSVGAct);

mExportSVGAct = mFileMenu->addAction(QIcon::fromTheme("seq_preview"),
mExportSVGAct = mFileMenu->addAction(QIcon::fromTheme("output"),
tr("Export SVG", "MenuBar_File"),
this, &MainWindow::exportSVG,
QKeySequence(AppSupport::getSettings("shortcuts",
Expand All @@ -532,7 +529,7 @@ void MainWindow::setupMenuBar()
cmdAddAction(mExportSVGAct);

if (eSettings::instance().fToolBarActionSave) {
const auto saveToolBtn = new QToolButton(this);
/*const auto saveToolBtn = new QToolButton(this);
saveToolBtn->setPopupMode(QToolButton::MenuButtonPopup);
saveToolBtn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
saveToolBtn->setFocusPolicy(Qt::NoFocus);
Expand All @@ -544,9 +541,13 @@ void MainWindow::setupMenuBar()
saveToolMenu->addAction(mSaveAsAct);
saveToolMenu->addAction(mSaveBackAct);
//saveToolMenu->addAction(exportSvgAct);
saveToolMenu->addSeparator();
saveToolMenu->addSeparator();*/

mToolbar->addWidget(saveToolBtn);
mToolbar->addAction(mSaveAct);
}

if (eSettings::instance().fToolBarActionImport) {
mToolbar->addAction(mImportAct);
}

mFileMenu->addSeparator();
Expand Down Expand Up @@ -937,7 +938,7 @@ void MainWindow::setupMenuBar()
mAddToQueAct->setEnabled(false);
cmdAddAction(mAddToQueAct);

if (eSettings::instance().fToolBarActionScene) {
/*if (eSettings::instance().fToolBarActionScene) {
const auto sceneToolBtn = new QToolButton(this);
sceneToolBtn->setText(tr("Scene"));
sceneToolBtn->setIcon(QIcon::fromTheme("sequence"));
Expand All @@ -958,7 +959,7 @@ void MainWindow::setupMenuBar()
this, [sceneToolBtn]() { sceneToolBtn->setText(tr("Scene")); });
mToolbar->addWidget(sceneToolBtn);
}
}*/

const auto zoomMenu = mViewMenu->addMenu(QIcon::fromTheme("zoom"), tr("Zoom","MenuBar_View"));

Expand Down

0 comments on commit bd5548c

Please sign in to comment.