diff --git a/resources/images/about.svg b/resources/images/about.svg new file mode 100644 index 000000000..d0427d04c --- /dev/null +++ b/resources/images/about.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + diff --git a/resources/images/aboutlogo.png b/resources/images/aboutlogo.png new file mode 100644 index 000000000..5af06480f Binary files /dev/null and b/resources/images/aboutlogo.png differ diff --git a/resources/resources.qrc b/resources/resources.qrc index 3bc21f725..73976001b 100644 --- a/resources/resources.qrc +++ b/resources/resources.qrc @@ -42,6 +42,8 @@ images/chatterino2.icns images/icon.png images/commands.svg + images/aboutlogo.png + images/about.svg qt.conf diff --git a/src/widgets/settingsdialog.cpp b/src/widgets/settingsdialog.cpp index edcfc7948..55ba38bda 100644 --- a/src/widgets/settingsdialog.cpp +++ b/src/widgets/settingsdialog.cpp @@ -23,6 +23,8 @@ #include #include #include +#include +#include namespace chatterino { namespace widgets { @@ -106,6 +108,8 @@ void SettingsDialog::addTabs() // this->addTab(this->createWhispersTab(), "Whispers", ":/images/Message_16xLG.png"); + this->addTab(this->createAboutTab(), "About", ":/images/about.svg"); + // Add stretch this->ui.tabs.addStretch(1); } @@ -452,6 +456,37 @@ QVBoxLayout *SettingsDialog::createEmotesTab() return layout; } +QVBoxLayout *SettingsDialog::createAboutTab() +{ + auto layout = this->createTabLayout(); + QPixmap image; + image.load(":/images/aboutlogo.png"); + auto scene = new QGraphicsScene(this); + scene->addPixmap(image); + scene->setSceneRect(image.rect()); + + QGraphicsView *view = new QGraphicsView(scene); + view->setStyleSheet("background: transparent"); + layout->addWidget(view); + + auto created = new QLabel(); + created->setText("Twitch Chat Client created by fourtf"); + created->setTextFormat(Qt::RichText); + created->setTextInteractionFlags(Qt::TextBrowserInteraction); + created->setOpenExternalLinks(true); + layout->addWidget(created); + + auto github = new QLabel(); + github->setText("Chatterino on Github"); + github->setTextFormat(Qt::RichText); + github->setTextInteractionFlags(Qt::TextBrowserInteraction); + github->setOpenExternalLinks(true); + layout->addWidget(github); + + return layout; +} + + QVBoxLayout *SettingsDialog::createIgnoredUsersTab() { auto layout = this->createTabLayout(); diff --git a/src/widgets/settingsdialog.hpp b/src/widgets/settingsdialog.hpp index d8e4bda50..e2b9e9f0f 100644 --- a/src/widgets/settingsdialog.hpp +++ b/src/widgets/settingsdialog.hpp @@ -83,6 +83,7 @@ private: QVBoxLayout *createLogsTab(); QVBoxLayout *createHighlightingTab(); QVBoxLayout *createWhispersTab(); + QVBoxLayout *createAboutTab(); SettingsDialogTab *selectedTab = nullptr;