mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
fixed icons in settings pages
This commit is contained in:
parent
2f0658935a
commit
d16bbf6899
|
@ -88,7 +88,7 @@ void SettingsDialog::addTabs()
|
||||||
|
|
||||||
void SettingsDialog::addTab(settingspages::SettingsPage *page, Qt::Alignment alignment)
|
void SettingsDialog::addTab(settingspages::SettingsPage *page, Qt::Alignment alignment)
|
||||||
{
|
{
|
||||||
auto tab = new SettingsDialogTab(this, page, "xD");
|
auto tab = new SettingsDialogTab(this, page, page->getIconResource());
|
||||||
|
|
||||||
this->ui.pageStack->addWidget(page);
|
this->ui.pageStack->addWidget(page);
|
||||||
this->ui.tabContainer->addWidget(tab, 0, alignment);
|
this->ui.tabContainer->addWidget(tab, 0, alignment);
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace chatterino {
|
||||||
namespace widgets {
|
namespace widgets {
|
||||||
namespace settingspages {
|
namespace settingspages {
|
||||||
BehaviourPage::BehaviourPage()
|
BehaviourPage::BehaviourPage()
|
||||||
: SettingsPage("Behaviour", nullptr)
|
: SettingsPage("Behaviour", ":/images/behave.svg")
|
||||||
{
|
{
|
||||||
singletons::SettingManager &settings = singletons::SettingManager::getInstance();
|
singletons::SettingManager &settings = singletons::SettingManager::getInstance();
|
||||||
util::LayoutCreator<BehaviourPage> layoutCreator(this);
|
util::LayoutCreator<BehaviourPage> layoutCreator(this);
|
||||||
|
|
|
@ -6,9 +6,9 @@ namespace chatterino {
|
||||||
namespace widgets {
|
namespace widgets {
|
||||||
namespace settingspages {
|
namespace settingspages {
|
||||||
|
|
||||||
SettingsPage::SettingsPage(const QString &_name, const QString &_resourceName)
|
SettingsPage::SettingsPage(const QString &_name, const QString &_iconResource)
|
||||||
: name(_name)
|
: name(_name)
|
||||||
, resourceName(_resourceName)
|
, iconResource(_iconResource)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,6 +17,11 @@ const QString &SettingsPage::getName()
|
||||||
return this->name;
|
return this->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const QString &SettingsPage::getIconResource()
|
||||||
|
{
|
||||||
|
return this->iconResource;
|
||||||
|
}
|
||||||
|
|
||||||
void SettingsPage::cancel()
|
void SettingsPage::cancel()
|
||||||
{
|
{
|
||||||
this->onCancel.invoke();
|
this->onCancel.invoke();
|
||||||
|
|
|
@ -14,9 +14,10 @@ namespace settingspages {
|
||||||
class SettingsPage : public QWidget
|
class SettingsPage : public QWidget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SettingsPage(const QString &name, const QString &resourceName);
|
SettingsPage(const QString &name, const QString &iconResource);
|
||||||
|
|
||||||
const QString &getName();
|
const QString &getName();
|
||||||
|
const QString &getIconResource();
|
||||||
|
|
||||||
void cancel();
|
void cancel();
|
||||||
|
|
||||||
|
@ -27,7 +28,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QString name;
|
QString name;
|
||||||
QString resourceName;
|
QString iconResource;
|
||||||
|
|
||||||
pajlada::Signals::NoArgSignal onCancel;
|
pajlada::Signals::NoArgSignal onCancel;
|
||||||
std::vector<pajlada::Signals::ScopedConnection> managedConnections;
|
std::vector<pajlada::Signals::ScopedConnection> managedConnections;
|
||||||
|
|
Loading…
Reference in a new issue