# HG changeset patch
# User Paper
# Date 1707343446 18000
# Node ID fe702c8f161f9e5e53c4cf8f217e9922c002f7ee
# Parent d14f8e0e40c30211ba8b6ea454602dd774664271
*: whatever
diff -r d14f8e0e40c3 -r fe702c8f161f Makefile.am
--- a/Makefile.am Wed Feb 07 07:57:37 2024 -0500
+++ b/Makefile.am Wed Feb 07 17:04:06 2024 -0500
@@ -27,6 +27,9 @@
minori_icons_png = \
$(top_srcdir)/rc/icons/16x16/arrow-circle-315.png \
$(top_srcdir)/rc/icons/16x16/calendar.png \
+ $(top_srcdir)/rc/icons/16x16/calendar-previous.png \
+ $(top_srcdir)/rc/icons/16x16/calendar-next.png \
+ $(top_srcdir)/rc/icons/16x16/category.png \
$(top_srcdir)/rc/icons/16x16/chart.png \
$(top_srcdir)/rc/icons/16x16/clock-history-frame.png \
$(top_srcdir)/rc/icons/16x16/cross-button.png \
@@ -37,6 +40,8 @@
$(top_srcdir)/rc/icons/16x16/magnifier.png \
$(top_srcdir)/rc/icons/16x16/navigation-270-button.png \
$(top_srcdir)/rc/icons/16x16/plus-button.png \
+ $(top_srcdir)/rc/icons/16x16/sort-quantity-descending.png \
+ $(top_srcdir)/rc/icons/16x16/ui-scroll-pane-detail.png \
$(top_srcdir)/rc/icons/24x24/application-export.png \
$(top_srcdir)/rc/icons/24x24/application-sidebar-list.png \
$(top_srcdir)/rc/icons/24x24/arrow-circle-double-135.png \
diff -r d14f8e0e40c3 -r fe702c8f161f include/gui/pages/seasons.h
--- a/include/gui/pages/seasons.h Wed Feb 07 07:57:37 2024 -0500
+++ b/include/gui/pages/seasons.h Wed Feb 07 17:04:06 2024 -0500
@@ -7,13 +7,13 @@
class QResizeEvent;
class SeasonsPage final : public QWidget {
- Q_OBJECT
+ Q_OBJECT
- public:
- SeasonsPage(QWidget* parent = nullptr);
+public:
+ SeasonsPage(QWidget* parent = nullptr);
- protected:
- QListWidget* buttons = nullptr;
+protected:
+ QListWidget* buttons = nullptr;
};
#endif // __gui__pages__seasons_h
diff -r d14f8e0e40c3 -r fe702c8f161f rc/icons/icons.qrc
--- a/rc/icons/icons.qrc Wed Feb 07 07:57:37 2024 -0500
+++ b/rc/icons/icons.qrc Wed Feb 07 17:04:06 2024 -0500
@@ -2,7 +2,10 @@
favicon.png
16x16/arrow-circle-315.png
+ 16x16/category.png
16x16/calendar.png
+ 16x16/calendar-next.png
+ 16x16/calendar-previous.png
16x16/chart.png
16x16/clock-history-frame.png
16x16/cross-button.png
@@ -13,6 +16,8 @@
16x16/magnifier.png
16x16/navigation-270-button.png
16x16/plus-button.png
+ 16x16/sort-quantity-descending.png
+ 16x16/ui-scroll-pane-detail.png
24x24/application-export.png
24x24/application-sidebar-list.png
24x24/arrow-circle-double-135.png
diff -r d14f8e0e40c3 -r fe702c8f161f src/gui/dialog/about.cc
--- a/src/gui/dialog/about.cc Wed Feb 07 07:57:37 2024 -0500
+++ b/src/gui/dialog/about.cc Wed Feb 07 17:04:06 2024 -0500
@@ -20,16 +20,9 @@
return N;
}
-/* Ahhh, my dumb little hack to get this to be constexpr :) */
-static constexpr const char pugixml_version[] = {
- PUGIXML_VERSION / 1000 % 10 + '0', /* Major */
- '.',
- PUGIXML_VERSION / 100 % 10 + '0', /* Minor */
- PUGIXML_VERSION / 10 % 10 + '0',
- '.',
- PUGIXML_VERSION % 10 + '0', /* Patch */
- '\0'
-};
+static constexpr semver::version pugixml_version{PUGIXML_VERSION / 1000 % 10, PUGIXML_VERSION / 10 % 100, PUGIXML_VERSION % 10};
+static constexpr semver::version json_version{NLOHMANN_JSON_VERSION_MAJOR, NLOHMANN_JSON_VERSION_MINOR, NLOHMANN_JSON_VERSION_PATCH};
+static constexpr semver::version semver_version{SEMVER_VERSION_MAJOR, SEMVER_VERSION_MINOR, SEMVER_VERSION_PATCH};
const char* get_curl_version() {
const curl_version_info_data* data = curl_version_info(CURLVERSION_NOW);
@@ -60,13 +53,13 @@
", "
"Anitomy"
", "
- "JSON for Modern C++ v" + QString::number(NLOHMANN_JSON_VERSION_MAJOR) + "." +
- QString::number(NLOHMANN_JSON_VERSION_MINOR) + "." +
- QString::number(NLOHMANN_JSON_VERSION_PATCH) + ""
+ "JSON for Modern C++ v" + Strings::ToQString(json_version.to_string()) + ""
", "
- "pugixml v" + pugixml_version + ""
+ "pugixml v" + Strings::ToQString(pugixml_version.to_string()) + ""
", "
"mINI v0.9.14"
+ ", "
+ "semver v" + Strings::ToQString(semver_version.to_string()) + ""
"
"
""
"" + tr("Special thanks:") + ""
diff -r d14f8e0e40c3 -r fe702c8f161f src/gui/pages/seasons.cc
--- a/src/gui/pages/seasons.cc Wed Feb 07 07:57:37 2024 -0500
+++ b/src/gui/pages/seasons.cc Wed Feb 07 17:04:06 2024 -0500
@@ -9,6 +9,8 @@
#include
#include
#include
+#include
+#include
SeasonsPage::SeasonsPage(QWidget* parent) : QWidget(parent) {
QVBoxLayout* full_layout = new QVBoxLayout(this);
@@ -21,25 +23,87 @@
toolbar->setMovable(false);
{
- /* this needs to be stored somewhere to replicate Taiga's
- "timer" feature */
- toolbar->addAction("Aids");
+ {
+ QAction* action = new QAction(toolbar);
+ action->setIcon(QIcon(":/icons/16x16/calendar-previous.png"));
+ action->setToolTip(tr("Previous season"));
+ toolbar->addAction(action);
+ }
+
+ {
+ QAction* action = new QAction(toolbar);
+ action->setIcon(QIcon(":/icons/16x16/calendar-next.png"));
+ action->setToolTip(tr("Next season"));
+ toolbar->addAction(action);
+ }
+
+ toolbar->addAction(QIcon(":/icons/16x16/calendar.png"), "Fall 2024"); // this must be named the name of the season
+ }
+
+ toolbar->addSeparator();
+
+ {
+ toolbar->addAction(QIcon(":/icons/16x16/arrow-circle-315.png"), tr("Refresh data"));
}
toolbar->addSeparator();
{
- toolbar->addAction(QIcon(":/icons/16x16/navigation-270-button.png"), tr("Download &marked torrents"));
+ QToolButton* button = new QToolButton(toolbar);
+
+ {
+ /* links */
+ QMenu* menu = new QMenu(button);
+ menu->addAction("Airing status");
+ menu->addAction("List status");
+ menu->addAction("Type");
+ button->setMenu(menu);
+ }
+
+ button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
+ button->setIcon(QIcon(":/icons/16x16/category.png"));
+ button->setText("Group by:");
+ button->setPopupMode(QToolButton::InstantPopup);
+ toolbar->addWidget(button);
}
{
- toolbar->addAction(QIcon(":/icons/16x16/cross-button.png"), tr("&Discard all"));
+ QToolButton* button = new QToolButton(toolbar);
+
+ {
+ /* links */
+ QMenu* menu = new QMenu(button);
+ menu->addAction("Airing date");
+ menu->addAction("Episodes");
+ menu->addAction("Popularity");
+ menu->addAction("Score");
+ menu->addAction("Title");
+ button->setMenu(menu);
+ }
+
+ button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
+ button->setIcon(QIcon(":/icons/16x16/sort-quantity-descending.png"));
+ button->setText("Sort by:");
+ button->setPopupMode(QToolButton::InstantPopup);
+ toolbar->addWidget(button);
}
- toolbar->addSeparator();
+ {
+ QToolButton* button = new QToolButton(toolbar);
- {
- toolbar->addAction(QIcon(":/icons/16x16/gear.png"), tr("&Settings"));
+ {
+ /* links */
+ QMenu* menu = new QMenu(button);
+ menu->addAction("Images");
+ menu->addAction("Details");
+ button->setMenu(menu);
+ }
+
+ button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
+ button->setIcon(QIcon(":/icons/16x16/ui-scroll-pane-detail.png"));
+ button->setText("View:");
+ button->setPopupMode(QToolButton::InstantPopup);
+ toolbar->addWidget(button);
}
full_layout->addWidget(toolbar);
diff -r d14f8e0e40c3 -r fe702c8f161f src/gui/widgets/anime_button.cc
--- a/src/gui/widgets/anime_button.cc Wed Feb 07 07:57:37 2024 -0500
+++ b/src/gui/widgets/anime_button.cc Wed Feb 07 17:04:06 2024 -0500
@@ -46,7 +46,7 @@
_title = new QLabel("", misc_section);
_title->setAutoFillBackground(true);
_title->setContentsMargins(4, 4, 4, 4);
- _title->setStyleSheet("background-color: rgba(0, 245, 25, 25);");
+ _title->setStyleSheet("background-color: rgba(0, 245, 25, 50);");
{
QFont fnt(_title->font());
fnt.setWeight(QFont::Bold);
@@ -54,8 +54,7 @@
}
misc_layout->addWidget(_title);
- /* need to make a separate "labelled paragraph" for this */
- _info = new TextWidgets::LabelledParagraph(tr("Aired:\nEpisodes:\nGenres:\nProducers:\nScore:\nPopularity:"), "\n\n\n\n", misc_section);
+ _info = new TextWidgets::LabelledParagraph(tr("Aired:\nEpisodes:\nGenres:\nProducers:\nScore:\nPopularity:"), "\n\n\n\n\n", misc_section);
{
QFont fnt(_info->GetLabels()->font());
fnt.setWeight(QFont::Bold);
diff -r d14f8e0e40c3 -r fe702c8f161f src/gui/widgets/poster.cc
--- a/src/gui/widgets/poster.cc Wed Feb 07 07:57:37 2024 -0500
+++ b/src/gui/widgets/poster.cc Wed Feb 07 17:04:06 2024 -0500
@@ -35,6 +35,7 @@
}
void Poster::SetAnime(const Anime::Anime& anime) {
+ /* todo: only download on showEvent() */
{
HTTP::GetThread* thread = new HTTP::GetThread(anime.GetPosterUrl(), {}, this);
diff -r d14f8e0e40c3 -r fe702c8f161f src/gui/window.cc
--- a/src/gui/window.cc Wed Feb 07 07:57:37 2024 -0500
+++ b/src/gui/window.cc Wed Feb 07 17:04:06 2024 -0500
@@ -388,7 +388,8 @@
}
}
/* QMainWindow will delete the old one for us,
- according to the docs */
+ * according to the docs
+ */
setMenuBar(menubar);
/* Toolbar */