@@ -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,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
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user