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
+6 -4
View File
@@ -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));
+2 -1
View File
@@ -2,6 +2,7 @@
#include <QPaintEvent>
#include <QWidget>
#include <QIcon>
namespace chatterino {
namespace widgets {
@@ -29,7 +30,7 @@ private:
struct {
QWidget *widget;
QString labelText;
QImage image;
QIcon icon;
} ui;
// Parent settings dialog
+6 -6
View File
@@ -21,6 +21,7 @@
#include <QPalette>
#include <QResource>
#include <QTextEdit>
#include <QtSvg>
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");