diff --git a/CHANGELOG.md b/CHANGELOG.md index 73c5f574..81ec712b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unversioned +- Minor: Added viewer list button to twitch channel header. (#1978) - Minor: Added followage and subage information to usercard. (#2023) - Minor: Added an option to only open channels specified in command line with `-c` parameter. You can also use `--help` to display short help message (#1940) - Minor: Added customizable timeout buttons to the user info popup diff --git a/resources/buttons/viewersDark.png b/resources/buttons/viewersDark.png new file mode 100644 index 00000000..399b942e Binary files /dev/null and b/resources/buttons/viewersDark.png differ diff --git a/resources/buttons/viewersLight.png b/resources/buttons/viewersLight.png new file mode 100644 index 00000000..a55aae5c Binary files /dev/null and b/resources/buttons/viewersLight.png differ diff --git a/resources/resources_autogenerated.qrc b/resources/resources_autogenerated.qrc index 575639eb..0e8c02eb 100644 --- a/resources/resources_autogenerated.qrc +++ b/resources/resources_autogenerated.qrc @@ -29,6 +29,8 @@ buttons/unvip.png buttons/update.png buttons/updateError.png + buttons/viewersDark.png + buttons/viewersLight.png buttons/vip.png chatterino.icns com.chatterino.chatterino.appdata.xml diff --git a/src/autogenerated/ResourcesAutogen.cpp b/src/autogenerated/ResourcesAutogen.cpp index 0e6cecc7..2b31dc7e 100644 --- a/src/autogenerated/ResourcesAutogen.cpp +++ b/src/autogenerated/ResourcesAutogen.cpp @@ -28,6 +28,8 @@ Resources2::Resources2() this->buttons.unvip = QPixmap(":/buttons/unvip.png"); this->buttons.update = QPixmap(":/buttons/update.png"); this->buttons.updateError = QPixmap(":/buttons/updateError.png"); + this->buttons.viewersDark = QPixmap(":/buttons/viewersDark.png"); + this->buttons.viewersLight = QPixmap(":/buttons/viewersLight.png"); this->buttons.vip = QPixmap(":/buttons/vip.png"); this->error = QPixmap(":/error.png"); this->icon = QPixmap(":/icon.png"); diff --git a/src/autogenerated/ResourcesAutogen.hpp b/src/autogenerated/ResourcesAutogen.hpp index f108be95..87fc932e 100644 --- a/src/autogenerated/ResourcesAutogen.hpp +++ b/src/autogenerated/ResourcesAutogen.hpp @@ -35,6 +35,8 @@ public: QPixmap unvip; QPixmap update; QPixmap updateError; + QPixmap viewersDark; + QPixmap viewersLight; QPixmap vip; } buttons; QPixmap error; diff --git a/src/widgets/splits/Split.cpp b/src/widgets/splits/Split.cpp index e90c3eab..3d5fa930 100644 --- a/src/widgets/splits/Split.cpp +++ b/src/widgets/splits/Split.cpp @@ -314,6 +314,15 @@ void Split::setChannel(IndirectChannel newChannel) this->header_->updateChannelText(); this->header_->updateRoomModes(); + if (newChannel.getType() == Channel::Type::Twitch) + { + this->header_->setViewersButtonVisible(true); + } + else + { + this->header_->setViewersButtonVisible(false); + } + this->channelChanged.invoke(); // Queue up save because: Split channel changed diff --git a/src/widgets/splits/SplitHeader.cpp b/src/widgets/splits/SplitHeader.cpp index 6176bd81..baf9b6e2 100644 --- a/src/widgets/splits/SplitHeader.cpp +++ b/src/widgets/splits/SplitHeader.cpp @@ -228,6 +228,11 @@ void SplitHeader::initializeLayout() } }); }), + // viewer list + this->viewersButton_ = makeWidget