mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Added vip and unvip buttons (#1996)
Co-authored-by: fourtf <tf.four@gmail.com>
This commit is contained in:
parent
53b18d03c6
commit
b4ef4fe54d
|
@ -8,6 +8,7 @@
|
||||||
- Minor: Disable checking for updates on unsupported platforms (#1874)
|
- Minor: Disable checking for updates on unsupported platforms (#1874)
|
||||||
- Minor: User popup will now automatically display messages as they are received
|
- Minor: User popup will now automatically display messages as they are received
|
||||||
- Minor: Changed the English in two rate-limited system messages (#1878)
|
- Minor: Changed the English in two rate-limited system messages (#1878)
|
||||||
|
- Minor: Added vip and unvip buttons.
|
||||||
- Bugfix: Fix bug preventing users from setting the highlight color of the second entry in the "User" highlights tab (#1898)
|
- Bugfix: Fix bug preventing users from setting the highlight color of the second entry in the "User" highlights tab (#1898)
|
||||||
- Bugfix: Fix bug where the "check user follow state" event could trigger a network request requesting the user to follow or unfollow a user. By itself its quite harmless as it just repeats to Twitch the same follow state we had, so no follows should have been lost by this but it meant there was a rogue network request that was fired that could cause a crash (#1906)
|
- Bugfix: Fix bug where the "check user follow state" event could trigger a network request requesting the user to follow or unfollow a user. By itself its quite harmless as it just repeats to Twitch the same follow state we had, so no follows should have been lost by this but it meant there was a rogue network request that was fired that could cause a crash (#1906)
|
||||||
- Bugfix: /usercard command will now respect the "Automatically close user popup" setting (#1918)
|
- Bugfix: /usercard command will now respect the "Automatically close user popup" setting (#1918)
|
||||||
|
|
BIN
resources/buttons/unvip.png
Normal file
BIN
resources/buttons/unvip.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 654 B |
BIN
resources/buttons/vip.png
Normal file
BIN
resources/buttons/vip.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 890 B |
|
@ -26,8 +26,10 @@
|
||||||
<file>buttons/trashcan.svg</file>
|
<file>buttons/trashcan.svg</file>
|
||||||
<file>buttons/unban.png</file>
|
<file>buttons/unban.png</file>
|
||||||
<file>buttons/unmod.png</file>
|
<file>buttons/unmod.png</file>
|
||||||
|
<file>buttons/unvip.png</file>
|
||||||
<file>buttons/update.png</file>
|
<file>buttons/update.png</file>
|
||||||
<file>buttons/updateError.png</file>
|
<file>buttons/updateError.png</file>
|
||||||
|
<file>buttons/vip.png</file>
|
||||||
<file>chatterino.icns</file>
|
<file>chatterino.icns</file>
|
||||||
<file>com.chatterino.chatterino.appdata.xml</file>
|
<file>com.chatterino.chatterino.appdata.xml</file>
|
||||||
<file>com.chatterino.chatterino.desktop</file>
|
<file>com.chatterino.chatterino.desktop</file>
|
||||||
|
|
|
@ -25,8 +25,10 @@ Resources2::Resources2()
|
||||||
this->buttons.trashCan = QPixmap(":/buttons/trashCan.png");
|
this->buttons.trashCan = QPixmap(":/buttons/trashCan.png");
|
||||||
this->buttons.unban = QPixmap(":/buttons/unban.png");
|
this->buttons.unban = QPixmap(":/buttons/unban.png");
|
||||||
this->buttons.unmod = QPixmap(":/buttons/unmod.png");
|
this->buttons.unmod = QPixmap(":/buttons/unmod.png");
|
||||||
|
this->buttons.unvip = QPixmap(":/buttons/unvip.png");
|
||||||
this->buttons.update = QPixmap(":/buttons/update.png");
|
this->buttons.update = QPixmap(":/buttons/update.png");
|
||||||
this->buttons.updateError = QPixmap(":/buttons/updateError.png");
|
this->buttons.updateError = QPixmap(":/buttons/updateError.png");
|
||||||
|
this->buttons.vip = QPixmap(":/buttons/vip.png");
|
||||||
this->error = QPixmap(":/error.png");
|
this->error = QPixmap(":/error.png");
|
||||||
this->icon = QPixmap(":/icon.png");
|
this->icon = QPixmap(":/icon.png");
|
||||||
this->pajaDank = QPixmap(":/pajaDank.png");
|
this->pajaDank = QPixmap(":/pajaDank.png");
|
||||||
|
|
|
@ -32,8 +32,10 @@ public:
|
||||||
QPixmap trashCan;
|
QPixmap trashCan;
|
||||||
QPixmap unban;
|
QPixmap unban;
|
||||||
QPixmap unmod;
|
QPixmap unmod;
|
||||||
|
QPixmap unvip;
|
||||||
QPixmap update;
|
QPixmap update;
|
||||||
QPixmap updateError;
|
QPixmap updateError;
|
||||||
|
QPixmap vip;
|
||||||
} buttons;
|
} buttons;
|
||||||
QPixmap error;
|
QPixmap error;
|
||||||
QPixmap icon;
|
QPixmap icon;
|
||||||
|
|
|
@ -186,6 +186,12 @@ UserInfoPopup::UserInfoPopup(bool closeAutomatically)
|
||||||
auto unmod = user.emplace<Button>(this);
|
auto unmod = user.emplace<Button>(this);
|
||||||
unmod->setPixmap(getResources().buttons.unmod);
|
unmod->setPixmap(getResources().buttons.unmod);
|
||||||
unmod->setScaleIndependantSize(30, 30);
|
unmod->setScaleIndependantSize(30, 30);
|
||||||
|
auto vip = user.emplace<Button>(this);
|
||||||
|
vip->setPixmap(getResources().buttons.vip);
|
||||||
|
vip->setScaleIndependantSize(30, 30);
|
||||||
|
auto unvip = user.emplace<Button>(this);
|
||||||
|
unvip->setPixmap(getResources().buttons.unvip);
|
||||||
|
unvip->setScaleIndependantSize(30, 30);
|
||||||
|
|
||||||
user->addStretch(1);
|
user->addStretch(1);
|
||||||
|
|
||||||
|
@ -203,6 +209,12 @@ UserInfoPopup::UserInfoPopup(bool closeAutomatically)
|
||||||
QObject::connect(unmod.getElement(), &Button::leftClicked, [this] {
|
QObject::connect(unmod.getElement(), &Button::leftClicked, [this] {
|
||||||
this->channel_->sendMessage("/unmod " + this->userName_);
|
this->channel_->sendMessage("/unmod " + this->userName_);
|
||||||
});
|
});
|
||||||
|
QObject::connect(vip.getElement(), &Button::leftClicked, [this] {
|
||||||
|
this->channel_->sendMessage("/vip " + this->userName_);
|
||||||
|
});
|
||||||
|
QObject::connect(unvip.getElement(), &Button::leftClicked, [this] {
|
||||||
|
this->channel_->sendMessage("/unvip " + this->userName_);
|
||||||
|
});
|
||||||
|
|
||||||
// userstate
|
// userstate
|
||||||
this->userStateChanged_.connect([this, mod, unmod]() mutable {
|
this->userStateChanged_.connect([this, mod, unmod]() mutable {
|
||||||
|
|
Loading…
Reference in a new issue