diff --git a/CHANGELOG.md b/CHANGELOG.md
index f72999d7..9b9ea8b7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -94,6 +94,7 @@
- Dev: Refactored `Button` and friends. (#6102, #6255, #6266, #6302, #6268, #6334, #6371, #6372)
- Dev: Made "add split" button (part of the split header) a natively rendered button. (#6349)
- Dev: Made Settings & Account button on Linux/macOS SVGs. (#6267)
+- Dev: Made "Chatters" button an SVG. (#6397)
- Dev: Made user card "pin" button SVGs. (#6399)
- Dev: Some more setting widget refactors. (#6317)
- Dev: Emoji style / set is now stored lowercase (and matched case-insensitively). Changing emoji style from this point on and then running an old version might mean you will use the Twitter emoji style by default. (#6300)
diff --git a/resources/buttons/chatters-darkMode.svg b/resources/buttons/chatters-darkMode.svg
new file mode 100644
index 00000000..22d0ca57
--- /dev/null
+++ b/resources/buttons/chatters-darkMode.svg
@@ -0,0 +1 @@
+
diff --git a/resources/buttons/chatters-lightMode.svg b/resources/buttons/chatters-lightMode.svg
new file mode 100644
index 00000000..61c8cf2b
--- /dev/null
+++ b/resources/buttons/chatters-lightMode.svg
@@ -0,0 +1 @@
+
diff --git a/resources/buttons/chattersDark.png b/resources/buttons/chattersDark.png
deleted file mode 100644
index 5cf95d93..00000000
Binary files a/resources/buttons/chattersDark.png and /dev/null differ
diff --git a/resources/buttons/chattersLight.png b/resources/buttons/chattersLight.png
deleted file mode 100644
index 9bd209f3..00000000
Binary files a/resources/buttons/chattersLight.png and /dev/null differ
diff --git a/src/widgets/splits/SplitHeader.cpp b/src/widgets/splits/SplitHeader.cpp
index 4332f601..afbe8de1 100644
--- a/src/widgets/splits/SplitHeader.cpp
+++ b/src/widgets/splits/SplitHeader.cpp
@@ -23,6 +23,7 @@
#include "widgets/buttons/DrawnButton.hpp"
#include "widgets/buttons/LabelButton.hpp"
#include "widgets/buttons/PixmapButton.hpp"
+#include "widgets/buttons/SvgButton.hpp"
#include "widgets/dialogs/SettingsDialog.hpp"
#include "widgets/helper/CommonTexts.hpp"
#include "widgets/Label.hpp"
@@ -289,6 +290,13 @@ void SplitHeader::initializeLayout()
{
assert(this->layout() == nullptr);
+ this->chattersButton_ = new SvgButton(
+ {
+ .dark = ":/buttons/chatters-darkMode.svg",
+ .light = ":/buttons/chatters-lightMode.svg",
+ },
+ this, {4, 4});
+
this->addButton_ = new DrawnButton(DrawnButton::Symbol::Plus,
{
.padding = 3,
@@ -365,17 +373,18 @@ void SplitHeader::initializeLayout()
});
}),
// chatter list
- this->chattersButton_ = makeWidget([&](auto w) {
- QObject::connect(w, &Button::leftClicked, this, [this]() {
- this->split_->openChatterList();
- });
- }),
+ this->chattersButton_,
// dropdown
this->dropdownButton_,
// add split
this->addButton_,
});
+ QObject::connect(this->chattersButton_, &Button::leftClicked, this,
+ [this]() {
+ this->split_->openChatterList();
+ });
+
QObject::connect(this->addButton_, &Button::leftClicked, this, [this]() {
this->split_->addSibling();
});
@@ -1085,16 +1094,6 @@ void SplitHeader::themeChangedEvent()
.backgroundHover = this->theme->messages.backgrounds.regular,
});
- // --
- if (this->theme->isLightTheme())
- {
- this->chattersButton_->setPixmap(getResources().buttons.chattersDark);
- }
- else
- {
- this->chattersButton_->setPixmap(getResources().buttons.chattersLight);
- }
-
this->update();
}
diff --git a/src/widgets/splits/SplitHeader.hpp b/src/widgets/splits/SplitHeader.hpp
index e0e7b9c6..f1c1f92d 100644
--- a/src/widgets/splits/SplitHeader.hpp
+++ b/src/widgets/splits/SplitHeader.hpp
@@ -16,6 +16,7 @@
namespace chatterino {
+class SvgButton;
class DrawnButton;
class PixmapButton;
class LabelButton;
@@ -87,7 +88,7 @@ private:
QAction *modeActionSetFollowers{};
PixmapButton *moderationButton_{};
- PixmapButton *chattersButton_{};
+ SvgButton *chattersButton_{};
DrawnButton *addButton_{};
// states