mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Compare commits
4 commits
64ccef94d1
...
a9b446ffc7
Author | SHA1 | Date | |
---|---|---|---|
a9b446ffc7 | |||
021f1a0bfc | |||
e87302ca2d | |||
867e3f3ab0 |
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
- Major: Add option to show pronouns in user card. (#5442, #5583)
|
- Major: Add option to show pronouns in user card. (#5442, #5583)
|
||||||
- Major: Release plugins alpha. (#5288)
|
- Major: Release plugins alpha. (#5288)
|
||||||
- Major: Improve high-DPI support on Windows. (#4868, #5391, #5664)
|
- Major: Improve high-DPI support on Windows. (#4868, #5391, #5664, #5666)
|
||||||
- Major: Added transparent overlay window (default keybind: <kbd>CTRL</kbd> + <kbd>ALT</kbd> + <kbd>N</kbd>). (#4746, #5643, #5659)
|
- Major: Added transparent overlay window (default keybind: <kbd>CTRL</kbd> + <kbd>ALT</kbd> + <kbd>N</kbd>). (#4746, #5643, #5659)
|
||||||
- Minor: Removed the Ctrl+Shift+L hotkey for toggling the "live only" tab visibility state. (#5530)
|
- Minor: Removed the Ctrl+Shift+L hotkey for toggling the "live only" tab visibility state. (#5530)
|
||||||
- Minor: Add support for Shared Chat messages. Shared chat messages can be filtered with the `flags.shared` filter variable, or with search using `is:shared`. Some messages like subscriptions are filtered on purpose to avoid confusion for the broadcaster. If you have both channels participating in Shared Chat open, only one of the message triggering your highlight will trigger. (#5606, #5625, #5661)
|
- Minor: Add support for Shared Chat messages. Shared chat messages can be filtered with the `flags.shared` filter variable, or with search using `is:shared`. Some messages like subscriptions are filtered on purpose to avoid confusion for the broadcaster. If you have both channels participating in Shared Chat open, only one of the message triggering your highlight will trigger. (#5606, #5625, #5661)
|
||||||
|
|
|
@ -2759,7 +2759,7 @@ void MessageBuilder::appendTwitchBadges(const QVariantMap &tags,
|
||||||
|
|
||||||
if (this->message().flags.has(MessageFlag::SharedMessage))
|
if (this->message().flags.has(MessageFlag::SharedMessage))
|
||||||
{
|
{
|
||||||
QString sourceId = tags["source-room-id"].toString();
|
const QString sourceId = tags["source-room-id"].toString();
|
||||||
std::optional<QString> sourceName;
|
std::optional<QString> sourceName;
|
||||||
if (twitchChannel->roomId() == sourceId)
|
if (twitchChannel->roomId() == sourceId)
|
||||||
{
|
{
|
||||||
|
@ -2773,9 +2773,14 @@ void MessageBuilder::appendTwitchBadges(const QVariantMap &tags,
|
||||||
|
|
||||||
if (sourceName.has_value())
|
if (sourceName.has_value())
|
||||||
{
|
{
|
||||||
this->emplace<BadgeElement>(makeSharedChatBadge(sourceName.value()),
|
const auto &name = sourceName.value();
|
||||||
MessageElementFlag::BadgeSharedChannel)
|
auto *badge = this->emplace<BadgeElement>(
|
||||||
->setLink({Link::UserInfo, sourceName.value()});
|
makeSharedChatBadge(name),
|
||||||
|
MessageElementFlag::BadgeSharedChannel);
|
||||||
|
if (!name.isEmpty())
|
||||||
|
{
|
||||||
|
badge->setLink({Link::UserInfo, name});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,6 +100,11 @@ public:
|
||||||
std::shared_ptr<Channel> getChannelOrEmptyByID(
|
std::shared_ptr<Channel> getChannelOrEmptyByID(
|
||||||
const QString &channelID) override;
|
const QString &channelID) override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Obtains the channel login name associated with the passed ID,
|
||||||
|
* so that Shared Chat messages can provide source channel context.
|
||||||
|
* Can yield an empty string if a helix request is already in-flight.
|
||||||
|
*/
|
||||||
std::optional<QString> getOrPopulateChannelCache(
|
std::optional<QString> getOrPopulateChannelCache(
|
||||||
const QString &channelId) override;
|
const QString &channelId) override;
|
||||||
|
|
||||||
|
|
|
@ -877,11 +877,14 @@ bool BaseWindow::nativeEvent(const QByteArray &eventType, void *message,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_DPICHANGED: {
|
case WM_DPICHANGED: {
|
||||||
|
if (this->flags_.has(ClearBuffersOnDpiChange))
|
||||||
|
{
|
||||||
// wait for Qt to process this message
|
// wait for Qt to process this message
|
||||||
postToThread([] {
|
postToThread([] {
|
||||||
getApp()->getWindows()->invalidateChannelViewBuffers();
|
getApp()->getWindows()->invalidateChannelViewBuffers();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_NCLBUTTONDOWN:
|
case WM_NCLBUTTONDOWN:
|
||||||
|
|
|
@ -37,6 +37,7 @@ public:
|
||||||
Dialog = 1 << 6,
|
Dialog = 1 << 6,
|
||||||
DisableLayoutSave = 1 << 7,
|
DisableLayoutSave = 1 << 7,
|
||||||
BoundsCheckOnShow = 1 << 8,
|
BoundsCheckOnShow = 1 << 8,
|
||||||
|
ClearBuffersOnDpiChange = 1 << 9,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ActionOnFocusLoss { Nothing, Delete, Close, Hide };
|
enum ActionOnFocusLoss { Nothing, Delete, Close, Hide };
|
||||||
|
|
|
@ -36,9 +36,9 @@ namespace {
|
||||||
|
|
||||||
DraggablePopup::DraggablePopup(bool closeAutomatically, QWidget *parent)
|
DraggablePopup::DraggablePopup(bool closeAutomatically, QWidget *parent)
|
||||||
: BaseWindow(
|
: BaseWindow(
|
||||||
closeAutomatically
|
(closeAutomatically ? popupFlagsCloseAutomatically : popupFlags) |
|
||||||
? popupFlagsCloseAutomatically | BaseWindow::DisableLayoutSave
|
BaseWindow::DisableLayoutSave |
|
||||||
: popupFlags | BaseWindow::DisableLayoutSave,
|
BaseWindow::ClearBuffersOnDpiChange,
|
||||||
parent)
|
parent)
|
||||||
, lifetimeHack_(std::make_shared<bool>(false))
|
, lifetimeHack_(std::make_shared<bool>(false))
|
||||||
, dragTimer_(this)
|
, dragTimer_(this)
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include "singletons/Emotes.hpp"
|
#include "singletons/Emotes.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
#include "singletons/WindowManager.hpp"
|
#include "singletons/WindowManager.hpp"
|
||||||
|
#include "util/PostToThread.hpp"
|
||||||
#include "widgets/BaseWidget.hpp"
|
#include "widgets/BaseWidget.hpp"
|
||||||
#include "widgets/helper/ChannelView.hpp"
|
#include "widgets/helper/ChannelView.hpp"
|
||||||
#include "widgets/helper/InvisibleSizeGrip.hpp"
|
#include "widgets/helper/InvisibleSizeGrip.hpp"
|
||||||
|
@ -312,6 +313,13 @@ bool OverlayWindow::nativeEvent(const QByteArray &eventType, void *message,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
# endif
|
# endif
|
||||||
|
case WM_DPICHANGED: {
|
||||||
|
// wait for Qt to process this message, same as in BaseWindow
|
||||||
|
postToThread([] {
|
||||||
|
getApp()->getWindows()->invalidateChannelViewBuffers();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return QWidget::nativeEvent(eventType, message, result);
|
return QWidget::nativeEvent(eventType, message, result);
|
||||||
|
|
|
@ -52,7 +52,9 @@
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
Window::Window(WindowType type, QWidget *parent)
|
Window::Window(WindowType type, QWidget *parent)
|
||||||
: BaseWindow(BaseWindow::EnableCustomFrame, parent)
|
: BaseWindow(
|
||||||
|
{BaseWindow::EnableCustomFrame, BaseWindow::ClearBuffersOnDpiChange},
|
||||||
|
parent)
|
||||||
, type_(type)
|
, type_(type)
|
||||||
, notebook_(new SplitNotebook(this))
|
, notebook_(new SplitNotebook(this))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue