diff --git a/.gitignore b/.gitignore index 12823e755..2ea69951c 100644 --- a/.gitignore +++ b/.gitignore @@ -69,3 +69,6 @@ tags rapidjson/* Thumbs.db + +#I HATE MAC +.DS_Store diff --git a/chatterino.pro b/chatterino.pro index b7d3c74a8..b551c9d06 100644 --- a/chatterino.pro +++ b/chatterino.pro @@ -4,7 +4,7 @@ # #------------------------------------------------- -QT += core gui network multimedia +QT += core gui network multimedia svg CONFIG += communi COMMUNI += core model util CONFIG += c++14 @@ -256,3 +256,6 @@ include(dependencies/fmt.pri) DEFINES += IRC_NAMESPACE=Communi include(dependencies/libcommuni.pri) + +#MAC ICON +macx:ICON = resources/images/chatterino2.icns diff --git a/resources/images/accounts.svg b/resources/images/accounts.svg new file mode 100644 index 000000000..8edc7ba06 --- /dev/null +++ b/resources/images/accounts.svg @@ -0,0 +1,16 @@ + + + + + + + + + + diff --git a/resources/images/behave.svg b/resources/images/behave.svg new file mode 100644 index 000000000..da58c84c9 --- /dev/null +++ b/resources/images/behave.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + diff --git a/resources/images/chatterino2.icns b/resources/images/chatterino2.icns new file mode 100644 index 000000000..8b6482ee7 Binary files /dev/null and b/resources/images/chatterino2.icns differ diff --git a/resources/images/emote.svg b/resources/images/emote.svg new file mode 100644 index 000000000..10e25c9f5 --- /dev/null +++ b/resources/images/emote.svg @@ -0,0 +1,12 @@ + + + + + + diff --git a/resources/images/notifications.svg b/resources/images/notifications.svg new file mode 100644 index 000000000..2ccd2d97b --- /dev/null +++ b/resources/images/notifications.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + diff --git a/resources/images/theme.svg b/resources/images/theme.svg new file mode 100644 index 000000000..fa85cb274 --- /dev/null +++ b/resources/images/theme.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + diff --git a/resources/resources.qrc b/resources/resources.qrc index 6ffc4de55..bfa88631a 100644 --- a/resources/resources.qrc +++ b/resources/resources.qrc @@ -34,6 +34,16 @@ sounds/ping2.wav images/subscriber.png images/collapse.png + images/emote.svg + ../../../Small/ChatterinoRestyle/notifications.svg + ../../../Small/ChatterinoRestyle/behave.svg + ../../../Small/ChatterinoRestyle/theme.svg + ../../../Small/ChatterinoRestyle/accounts.svg + images/notifications.svg + images/behave.svg + images/theme.svg + images/accounts.svg + images/chatterino2.icns qt.conf diff --git a/src/widgets/helper/settingsdialogtab.cpp b/src/widgets/helper/settingsdialogtab.cpp index 0eadda0f1..8ebb22402 100644 --- a/src/widgets/helper/settingsdialogtab.cpp +++ b/src/widgets/helper/settingsdialogtab.cpp @@ -12,7 +12,7 @@ SettingsDialogTab::SettingsDialogTab(SettingsDialog *_dialog, QString _labelText : dialog(_dialog) { this->ui.labelText = _labelText; - this->ui.image.load(imageFileName); + this->ui.icon.addFile(imageFileName); this->setCursor(QCursor(Qt::PointingHandCursor)); @@ -50,11 +50,13 @@ void SettingsDialogTab::paintEvent(QPaintEvent *) 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, QTextOption(Qt::AlignLeft | Qt::AlignVCenter)); diff --git a/src/widgets/helper/settingsdialogtab.hpp b/src/widgets/helper/settingsdialogtab.hpp index d23966054..8a16c7f4a 100644 --- a/src/widgets/helper/settingsdialogtab.hpp +++ b/src/widgets/helper/settingsdialogtab.hpp @@ -2,6 +2,7 @@ #include #include +#include namespace chatterino { namespace widgets { @@ -29,7 +30,7 @@ private: struct { QWidget *widget; QString labelText; - QImage image; + QIcon icon; } ui; // Parent settings dialog diff --git a/src/widgets/settingsdialog.cpp b/src/widgets/settingsdialog.cpp index 2b6dd8ec3..3132dc18f 100644 --- a/src/widgets/settingsdialog.cpp +++ b/src/widgets/settingsdialog.cpp @@ -21,6 +21,7 @@ #include #include #include +#include namespace chatterino { namespace widgets { @@ -80,17 +81,16 @@ SettingsDialog *SettingsDialog::getHandle() 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", - ":/images/AppearanceEditorPart_16x.png"); + this->addTab(this->createAppearanceTab(), "Appearance", ":/images/theme.svg"); - this->addTab(this->createBehaviourTab(), "Behaviour", ":/images/AppearanceEditorPart_16x.png"); + this->addTab(this->createBehaviourTab(), "Behaviour", ":/images/behave.svg"); // this->addTab(this->createCommandsTab(), "Commands", // ":/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", // ":/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->createHighlightingTab(), "Highlighting", ":/images/format_Bold_16xLG.png"); + this->addTab(this->createHighlightingTab(), "Highlighting", ":/images/notifications.svg"); // this->addTab(this->createWhispersTab(), "Whispers", ":/images/Message_16xLG.png");