mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
About box added in Settings, early implementation
This commit is contained in:
parent
6377331364
commit
1fab5adaf8
5 changed files with 62 additions and 0 deletions
24
resources/images/about.svg
Normal file
24
resources/images/about.svg
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 100 100" style="enable-background:new 0 0 100 100;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#E0E0E0;}
|
||||
.st1{fill:#FFFFFF;}
|
||||
</style>
|
||||
<g id="Layer_5">
|
||||
<path class="st0" d="M12,70.7c0,0-2.6-5.6-4-11.9C7.1,54.6,7,50.1,7.3,47C8.5,30.3,19.7,11.3,39.1,5.3c14.5-4.5,29.5-3.6,40.4,4.4
|
||||
c13.9,10.3,13.3,12.5,13.3,12.5L73.1,41.6c0,0-4.4-8.8-13.7-12c-6.5-2.3-11.7-1.4-16.2-0.6c-5.7,1-15.6,4.9-22.6,13.6
|
||||
c-2.4,3-4.5,6.1-6.2,10.6C11.4,61.5,12,70.7,12,70.7z"/>
|
||||
</g>
|
||||
<g id="Layer_4">
|
||||
<path class="st1" d="M58.3,99c-0.3,0-0.7,0-1,0c-14.7-0.5-23.4-4.2-27.3-6.4c-1.5,1.5-3.8,3.4-6.5,4.4c-4.7,1.7-10.2,1-10.5,1
|
||||
l-7.3-1l5.9-4.4c0.1-0.1,3.3-2.6,3.3-6.7c0.1-5.3-1.3-7.9-2.4-10.1v0C7,65.1,4.8,56.2,5.5,46.8C6.7,30.6,17.6,10.2,38.5,3.8
|
||||
c16-4.9,31.2-3.2,41.9,4.8c15.1,11.2,14.5,13.8,14.1,15.3l-0.2,0.8L71.5,46.9l-1.8-3.8c0-0.1-3.4-6.9-11.1-9.3
|
||||
c-4.7-1.5-10.4-0.1-13.6,2c-8.6,5.8-11.1,15.4-6.1,22.9c3.9,5.7,9.7,8.5,16.8,8c7.7-0.5,14.1-9.8,14.1-9.9l2-3l23.7,23.1L94,79
|
||||
C93.4,79.9,78.8,99,58.3,99z M29,84.5l2.4,1.9c0.1,0,7.9,6,26.1,6.6c14.2,0.5,25.8-10.8,30-15.5L72.7,63c-3.1,3.6-9.1,9.3-16.5,9.8
|
||||
c-9.3,0.6-17.1-3.1-22.2-10.6c-6.9-10.2-3.6-23.6,7.7-31.2c4.4-3,11.8-5,18.7-2.8c6.3,2,10.4,6.1,12.6,9l14.8-14.4
|
||||
c-1.3-1.4-4.2-4.3-11-9.3c-9.1-6.8-22.5-8.2-36.6-3.9C22,15.1,12.5,33,11.5,47.3c-0.6,8.2,1.3,15.9,6.4,25.7
|
||||
c1.6,3.1,3.2,6.7,3.1,13c0,2.3-0.6,4.3-1.4,5.9c0.6-0.1,1.2-0.3,1.8-0.5c2.5-0.9,5-3.6,5.7-4.5L29,84.5z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.7 KiB |
BIN
resources/images/aboutlogo.png
Normal file
BIN
resources/images/aboutlogo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
|
@ -42,6 +42,8 @@
|
|||
<file>images/chatterino2.icns</file>
|
||||
<file>images/icon.png</file>
|
||||
<file>images/commands.svg</file>
|
||||
<file>images/aboutlogo.png</file>
|
||||
<file>images/about.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/qt/etc">
|
||||
<file>qt.conf</file>
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#include <QResource>
|
||||
#include <QTextEdit>
|
||||
#include <QtSvg>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsView>
|
||||
|
||||
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 <a href=\"github.com/fourtf\">fourtf</a>");
|
||||
created->setTextFormat(Qt::RichText);
|
||||
created->setTextInteractionFlags(Qt::TextBrowserInteraction);
|
||||
created->setOpenExternalLinks(true);
|
||||
layout->addWidget(created);
|
||||
|
||||
auto github = new QLabel();
|
||||
github->setText("<a href=\"github.com/fourt/chatterino2\">Chatterino on Github</a>");
|
||||
github->setTextFormat(Qt::RichText);
|
||||
github->setTextInteractionFlags(Qt::TextBrowserInteraction);
|
||||
github->setOpenExternalLinks(true);
|
||||
layout->addWidget(github);
|
||||
|
||||
return layout;
|
||||
}
|
||||
|
||||
|
||||
QVBoxLayout *SettingsDialog::createIgnoredUsersTab()
|
||||
{
|
||||
auto layout = this->createTabLayout();
|
||||
|
|
|
@ -83,6 +83,7 @@ private:
|
|||
QVBoxLayout *createLogsTab();
|
||||
QVBoxLayout *createHighlightingTab();
|
||||
QVBoxLayout *createWhispersTab();
|
||||
QVBoxLayout *createAboutTab();
|
||||
|
||||
SettingsDialogTab *selectedTab = nullptr;
|
||||
|
||||
|
|
Loading…
Reference in a new issue