New setting menu icons! (#189)

* LUL

* Added system icon for OSX
This commit is contained in:
coral 2018-01-01 18:44:52 -08:00 committed by fourtf
parent eb4ba30d9f
commit 0e8b50c4e9
12 changed files with 116 additions and 12 deletions

3
.gitignore vendored
View file

@ -69,3 +69,6 @@ tags
rapidjson/* rapidjson/*
Thumbs.db Thumbs.db
#I HATE MAC
.DS_Store

View file

@ -4,7 +4,7 @@
# #
#------------------------------------------------- #-------------------------------------------------
QT += core gui network multimedia QT += core gui network multimedia svg
CONFIG += communi CONFIG += communi
COMMUNI += core model util COMMUNI += core model util
CONFIG += c++14 CONFIG += c++14
@ -256,3 +256,6 @@ include(dependencies/fmt.pri)
DEFINES += IRC_NAMESPACE=Communi DEFINES += IRC_NAMESPACE=Communi
include(dependencies/libcommuni.pri) include(dependencies/libcommuni.pri)
#MAC ICON
macx:ICON = resources/images/chatterino2.icns

View file

@ -0,0 +1,16 @@
<?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" id="Layer_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:#FFFFFF;}
</style>
<g>
<g>
<path class="st0" d="M89.7,93.1c0,3.1-2.5,5.7-5.7,5.7H15.9c-3.1,0-5.7-2.5-5.7-5.7c0-21.9,17.8-39.7,39.7-39.7
S89.7,71.2,89.7,93.1z M50,60.2c-17.8,0-32.3,14.1-32.9,31.8h65.8C82.3,74.3,67.8,60.2,50,60.2z M50,48.8
c-13.2,0-23.8-10.7-23.8-23.8S36.8,1.2,50,1.2S73.8,11.9,73.8,25S63.2,48.8,50,48.8z M50,42c9.4,0,17-7.6,17-17S59.4,8,50,8
s-17,7.6-17,17S40.6,42,50,42z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 805 B

View file

@ -0,0 +1,17 @@
<?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:none;stroke:#FFFFFF;stroke-width:8;stroke-miterlimit:10;}
.st1{fill:#FFFFFF;}
</style>
<g id="Layer_1">
<path class="st0" d="M40,93.7c-7.8-1.8-15.2-5.8-21.3-11.8c-17.3-17.3-17.3-45.4,0-62.7s45.4-17.3,62.7,0
C94.8,32.6,97.8,52.7,90.3,69"/>
<path class="st0" d="M56.1,23.7c4.6,1.1,9.1,3.4,12.7,7c10.3,10.3,10.3,27,0,37.3s-27,10.3-37.3,0c-8-8-9.8-19.9-5.3-29.7"/>
<circle class="st1" cx="50.2" cy="50.2" r="9.2"/>
</g>
<g id="RULER">
</g>
</svg>

After

Width:  |  Height:  |  Size: 820 B

Binary file not shown.

View file

@ -0,0 +1,12 @@
<?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" id="Layer_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:#FFFFFF;}
</style>
<path class="st0" d="M50,100c27.7,0,50-22.3,50-50S77.7,0,50,0S0,22.3,0,50S22.3,100,50,100z M33.3,46.2c4.2,0,8.3-3.3,8.3-8.3
s-4.2-8.3-8.3-8.3S25,32.9,25,37.9S29.2,46.2,33.3,46.2z M50,91.7C27,91.7,8.3,73,8.3,50S27,8.3,50,8.3S91.7,27,91.7,50
S73,91.7,50,91.7z M23.3,63.1c16.2,10.3,37.1,10.4,53.2,0.1l-4.3-7c-13.7,8.5-31,8.4-44.5-0.1L23.3,63.1z M67.1,46.2
c4.2,0,8.3-3.3,8.3-8.3s-4.2-8.3-8.3-8.3s-8.3,3.3-8.3,8.3S62.9,46.2,67.1,46.2z"/>
</svg>

After

Width:  |  Height:  |  Size: 847 B

View file

@ -0,0 +1,20 @@
<?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:none;stroke:#FFFFFF;stroke-width:10;stroke-miterlimit:10;}
.st1{fill:#FFFFFF;}
</style>
<g id="Layer_1">
<path class="st0" d="M82.1,93.6H18.5c-6.6,0-12-5.4-12-12V18c0-6.6,5.4-12,12-12h63.6c6.6,0,12,5.4,12,12v63.6
C94.1,88.2,88.7,93.6,82.1,93.6z"/>
<g>
<path class="st1" d="M59,26.8c0,3.6-0.8,9-2.4,16.1C55,50,53.9,54.1,53.3,55.2c-0.6,1.1-1.6,1.6-2.9,1.6c-1.4,0-2.4-0.4-2.9-1.3
c-0.5-0.9-1.6-4.7-3.3-11.4c-1.7-6.7-2.6-12.5-2.6-17.2c0-5.7,2.9-8.6,8.8-8.6C56.1,18.2,59,21.1,59,26.8z"/>
</g>
<circle class="st1" cx="50.3" cy="71.3" r="9.5"/>
</g>
<g id="Layer_2">
</g>
</svg>

After

Width:  |  Height:  |  Size: 955 B

View file

@ -0,0 +1,20 @@
<?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" id="Layer_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:none;stroke:#000000;stroke-width:8;stroke-miterlimit:10;}
.st1{fill:#A5A5A5;}
.st2{fill:#848484;}
.st3{fill:#474747;}
.st4{fill:none;}
.st5{fill:none;stroke:#FFFFFF;stroke-width:8;stroke-miterlimit:10;}
</style>
<path class="st0" d="M94.3,65.3"/>
<path class="st0" d="M43.6,5.7"/>
<polygon class="st1" points="75.3,10.7 11.5,74.4 4.9,55.3 7,36.5 18.6,16.7 37.5,5.5 "/>
<rect x="3.9" y="40.2" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -20.9199 49.9896)" class="st2" width="92" height="20.1"/>
<polygon class="st3" points="97.5,51.8 95.2,64.3 81.2,85.2 64.5,92.4 45.3,95.7 24.4,89.9 89.9,24.4 96.9,44.7 "/>
<ellipse class="st4" cx="50.7" cy="50.6" rx="46" ry="45.4"/>
<ellipse transform="matrix(0.7071 -0.7071 0.7071 0.7071 -21.0775 50.5688)" class="st5" cx="50.5" cy="50.7" rx="44.4" ry="45"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -34,6 +34,16 @@
<file>sounds/ping2.wav</file> <file>sounds/ping2.wav</file>
<file>images/subscriber.png</file> <file>images/subscriber.png</file>
<file>images/collapse.png</file> <file>images/collapse.png</file>
<file>images/emote.svg</file>
<file>../../../Small/ChatterinoRestyle/notifications.svg</file>
<file>../../../Small/ChatterinoRestyle/behave.svg</file>
<file>../../../Small/ChatterinoRestyle/theme.svg</file>
<file>../../../Small/ChatterinoRestyle/accounts.svg</file>
<file>images/notifications.svg</file>
<file>images/behave.svg</file>
<file>images/theme.svg</file>
<file>images/accounts.svg</file>
<file>images/chatterino2.icns</file>
</qresource> </qresource>
<qresource prefix="/qt/etc"> <qresource prefix="/qt/etc">
<file>qt.conf</file> <file>qt.conf</file>

View file

@ -12,7 +12,7 @@ SettingsDialogTab::SettingsDialogTab(SettingsDialog *_dialog, QString _labelText
: dialog(_dialog) : dialog(_dialog)
{ {
this->ui.labelText = _labelText; this->ui.labelText = _labelText;
this->ui.image.load(imageFileName); this->ui.icon.addFile(imageFileName);
this->setCursor(QCursor(Qt::PointingHandCursor)); this->setCursor(QCursor(Qt::PointingHandCursor));
@ -50,11 +50,13 @@ void SettingsDialogTab::paintEvent(QPaintEvent *)
this->style()->drawPrimitive(QStyle::PE_Widget, &opt, &painter, this); this->style()->drawPrimitive(QStyle::PE_Widget, &opt, &painter, this);
int a = (this->height() - this->ui.image.width()) / 2; int a = (this->height() - 20) / 2;
QPixmap pixmap = this->ui.icon.pixmap(QSize(20,20));
painter.drawImage(a, a, this->ui.image);
a = a + a + this->ui.image.width(); painter.drawPixmap(0, a, pixmap);
a = a + a + 20;
painter.drawText(QRect(a, 0, width() - a, height()), this->ui.labelText, painter.drawText(QRect(a, 0, width() - a, height()), this->ui.labelText,
QTextOption(Qt::AlignLeft | Qt::AlignVCenter)); QTextOption(Qt::AlignLeft | Qt::AlignVCenter));

View file

@ -2,6 +2,7 @@
#include <QPaintEvent> #include <QPaintEvent>
#include <QWidget> #include <QWidget>
#include <QIcon>
namespace chatterino { namespace chatterino {
namespace widgets { namespace widgets {
@ -29,7 +30,7 @@ private:
struct { struct {
QWidget *widget; QWidget *widget;
QString labelText; QString labelText;
QImage image; QIcon icon;
} ui; } ui;
// Parent settings dialog // Parent settings dialog

View file

@ -21,6 +21,7 @@
#include <QPalette> #include <QPalette>
#include <QResource> #include <QResource>
#include <QTextEdit> #include <QTextEdit>
#include <QtSvg>
namespace chatterino { namespace chatterino {
namespace widgets { namespace widgets {
@ -80,17 +81,16 @@ SettingsDialog *SettingsDialog::getHandle()
void SettingsDialog::addTabs() void SettingsDialog::addTabs()
{ {
this->addTab(this->createAccountsTab(), "Accounts", ":/images/Message_16xLG.png"); this->addTab(this->createAccountsTab(), "Accounts", ":/images/accounts.svg");
this->addTab(this->createAppearanceTab(), "Appearance", this->addTab(this->createAppearanceTab(), "Appearance", ":/images/theme.svg");
":/images/AppearanceEditorPart_16x.png");
this->addTab(this->createBehaviourTab(), "Behaviour", ":/images/AppearanceEditorPart_16x.png"); this->addTab(this->createBehaviourTab(), "Behaviour", ":/images/behave.svg");
// this->addTab(this->createCommandsTab(), "Commands", // this->addTab(this->createCommandsTab(), "Commands",
// ":/images/CustomActionEditor_16x.png"); // ":/images/CustomActionEditor_16x.png");
this->addTab(this->createEmotesTab(), "Emotes", ":/images/Emoji_Color_1F60A_19.png"); this->addTab(this->createEmotesTab(), "Emotes", ":/images/emote.svg");
// this->addTab(this->createIgnoredUsersTab(), "Ignored Users", // this->addTab(this->createIgnoredUsersTab(), "Ignored Users",
// ":/images/StatusAnnotations_Blocked_16xLG_color.png"); // ":/images/StatusAnnotations_Blocked_16xLG_color.png");
@ -102,7 +102,7 @@ void SettingsDialog::addTabs()
// this->addTab(this->createLogsTab(), "Logs", ":/images/VSO_Link_blue_16x.png"); // this->addTab(this->createLogsTab(), "Logs", ":/images/VSO_Link_blue_16x.png");
this->addTab(this->createHighlightingTab(), "Highlighting", ":/images/format_Bold_16xLG.png"); this->addTab(this->createHighlightingTab(), "Highlighting", ":/images/notifications.svg");
// this->addTab(this->createWhispersTab(), "Whispers", ":/images/Message_16xLG.png"); // this->addTab(this->createWhispersTab(), "Whispers", ":/images/Message_16xLG.png");