Mercurial > minori
diff src/gui/window.cpp @ 73:f1fc8b04bc63
...: merge heads
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Tue, 03 Oct 2023 05:00:08 -0400 |
parents | 27a19dd6cba1 |
children | 6f7385bd334c |
line wrap: on
line diff
--- a/src/gui/window.cpp Tue Oct 03 04:58:38 2023 -0400 +++ b/src/gui/window.cpp Tue Oct 03 05:00:08 2023 -0400 @@ -20,15 +20,16 @@ #include <QApplication> #include <QDebug> #include <QFile> +#include <QHBoxLayout> #include <QMainWindow> #include <QMenuBar> -#include <QToolBar> #include <QMessageBox> #include <QPlainTextEdit> #include <QStackedWidget> #include <QTextStream> #include <QTimer> -#include <QHBoxLayout> +#include <QToolBar> +#include <QToolButton> #if MACOSX # include "sys/osx/dark_theme.h" #elif defined(WIN32) @@ -203,7 +204,29 @@ reinterpret_cast<AnimeListPage*>(stack->widget(static_cast<int>(Pages::ANIME_LIST)))->Refresh(); }); toolbar->addSeparator(); - toolbar->addAction(QIcon(":/icons/24x24/gear.png"), tr("S&ettings"), [this]{ + + QToolButton* button = new QToolButton(toolbar); + + menu = new QMenu(button); + action = menu->addAction(tr("Add new folder...")); + + button->setMenu(menu); + button->setIcon(QIcon(":/icons/24x24/folder-open.png")); + button->setPopupMode(QToolButton::InstantPopup); + toolbar->addWidget(button); + + button = new QToolButton(toolbar); + + menu = new QMenu(button); + action = menu->addAction(tr("Placeholder")); + + button->setMenu(menu); + button->setIcon(QIcon(":/icons/24x24/application-export.png")); + button->setPopupMode(QToolButton::InstantPopup); + toolbar->addWidget(button); + + toolbar->addSeparator(); + toolbar->addAction(QIcon(":/icons/24x24/gear.png"), tr("S&ettings"), [this] { SettingsDialog dialog(this); dialog.exec(); }); @@ -225,7 +248,7 @@ page->SetDefault(); return; } - + page->SetPlaying(id); }); timer->start(5000);