#include "whats_new_dialog.h" #include "yacreader_global.h" #include YACReader::WhatsNewDialog::WhatsNewDialog(QWidget *parent) : RoundedCornersDialog(parent) { auto scrollArea = new QScrollArea(this); scrollArea->setStyleSheet("background-color:transparent;" "border:none;"); scrollArea->horizontalScrollBar()->setStyleSheet("QScrollBar {height:0px;}"); scrollArea->verticalScrollBar()->setStyleSheet("QScrollBar {width:0px;}"); scrollArea->setContentsMargins(0, 0, 0, 0); auto mainLayout = new QVBoxLayout(this); mainLayout->setContentsMargins(0, 0, 0, 0); auto contentLayout = new QGridLayout(); auto content = new QFrame(); content->setStyleSheet("background-color:transparent;" "border:none;"); auto headerImageLabel = new QLabel(); QPixmap headerImage(":/images/whats_new/whatsnew_header.svg"); headerImageLabel->setPixmap(headerImage); headerImageLabel->setFixedSize(headerImage.size()); auto headerLabel = new QLabel(); headerLabel->setText("What's New in\nYACReader"); QFont headerLabelFont("Arial", 34, QFont::ExtraBold); headerLabel->setFont(headerLabelFont); headerLabel->setAlignment(Qt::AlignCenter); headerLabel->setStyleSheet("padding: 18px 0 0 0;" "background-color:transparent;" "color:#0A0A0A;"); auto versionLabel = new QLabel(); versionLabel->setText(VERSION); QFont versionLabelFont("Arial", 12, QFont::Normal); versionLabel->setFont(versionLabelFont); versionLabel->setAlignment(Qt::AlignCenter); versionLabel->setStyleSheet("padding:0 0 0 0;" "background-color:transparent;" "color:#858585;"); auto text = new QLabel(); text->setText("New release with the following updates:
" "
" "YACReader
" " • Show error when opening bad open recent entries.
" " • GoTo page: Fix segfault when entering page numbers greater than comic's page count(toolbar and page flow).
" " • Initialize GotoFlow on current page, not cover.
" " • GotoFlow with Quick navigation mode: Fix page index error when using both mouse and keyboard for navigation.
" " • Support HDPI screens.
" " • Use one wheel mouse step per page in full page mode.
" " • (Linux) Add updated MIME types to .desktop file for .cbz and .cbr.
" " • New settings to control page turning behaviour on scroll.
" " • Make forward and backward buttons in a mouse turn pages.
" " • Don't crash if bookmarks get corrupt for some reason.
" " • Magnifying glass fixes and improvements.
" "
" "YACReaderLibrary
" " • Support HDPI screens.
" " • Support import legacy XML info in comic files.
" " • Enable arrow keys navigation in the folders tree view.
" " • Add `Publication Date` column to the comics table view.
" " • Use a scale effect in the comics grids on mouse over.
" " • Fix selection when clicking on a folder in search mode.
" " • Add system info to the help/about dialog to help reporting bugs.
" " • Fix defaul value for manga/comic mode in folders..
" "
" "I hope you enjoy the new update. Please, if you like YACReader consider to become a patron in Patreon or donate some money using Pay-Pal and help keeping the project alive. Remember that there is an iOS version available in the Apple App Store."); QFont textLabelFont("Arial", 15, QFont::Light); text->setFont(textLabelFont); text->setStyleSheet("padding:51px;" "background-color:transparent;" "color:#0A0A0A;"); text->setWordWrap(true); text->setOpenExternalLinks(true); contentLayout->addItem(new QSpacerItem(0, 50), 0, 0); contentLayout->addWidget(headerImageLabel, 1, 0, Qt::AlignTop | Qt::AlignHCenter); contentLayout->addWidget(headerLabel, 1, 0, Qt::AlignTop | Qt::AlignHCenter); contentLayout->addWidget(versionLabel, 2, 0, Qt::AlignTop | Qt::AlignHCenter); contentLayout->addWidget(text, 3, 0, Qt::AlignTop); contentLayout->setRowStretch(3, 1); content->setLayout(contentLayout); mainLayout->addWidget(scrollArea); // containerLayout->addWidget(content); scrollArea->setWidget(content); scrollArea->setWidgetResizable(true); this->setLayout(mainLayout); auto closeButton = new QPushButton(this); closeButton->setFlat(true); closeButton->setStyleSheet("background-color:transparent;"); auto closeIcon = QPixmap(":/images/custom_dialog/custom_close_button.svg"); if (!closeIcon.isNull()) { closeButton->setIcon(QPixmap(":/images/custom_dialog/custom_close_button.svg")); closeButton->setIconSize(QSize(44, 44)); closeButton->setFixedSize(44, 44); closeButton->move(656, 20); } else { closeButton->setText(tr("Close")); auto font = closeButton->font(); font.setPointSize(16); closeButton->setFont(font); closeButton->move(616, 20); } scrollArea->setFixedSize(720, 640); setFixedSize(720, 640); setModal(true); connect(closeButton, &QPushButton::clicked, this, &QDialog::close); }