diff --git a/chatterino.pro b/chatterino.pro
index abf1e697..5b93269f 100644
--- a/chatterino.pro
+++ b/chatterino.pro
@@ -1,436 +1,438 @@
-#-------------------------------------------------
-#
-# Project created by QtCreator 2016-12-28T18:23:35
-#
-#-------------------------------------------------
-
-message(----)
-
-QT += widgets core gui network multimedia svg
-CONFIG += communi
-COMMUNI += core model util
-CONFIG += c++14
-INCLUDEPATH += src/
-TARGET = chatterino
-TEMPLATE = app
-DEFINES += QT_DEPRECATED_WARNINGS
-PRECOMPILED_HEADER = src/precompiled_header.hpp
-CONFIG += precompile_header
-
-# https://bugreports.qt.io/browse/QTBUG-27018
-equals(QMAKE_CXX, "clang++")|equals(QMAKE_CXX, "g++") {
- TARGET = bin/chatterino
-}
-
-# Icons
-macx:ICON = resources/images/chatterino2.icns
-win32:RC_FILE = resources/windows.rc
-
-
-macx {
- LIBS += -L/usr/local/lib
-}
-
-# Submodules
-include(dependencies/rapidjson.pri)
-include(dependencies/settings.pri)
-include(dependencies/signals.pri)
-include(dependencies/humanize.pri)
-include(dependencies/fmt.pri)
-DEFINES += IRC_NAMESPACE=Communi
-include(dependencies/libcommuni.pri)
-include(dependencies/websocketpp.pri)
-include(dependencies/openssl.pri)
-include(dependencies/boost.pri)
-
-# Optional feature: QtWebEngine
-#exists ($(QTDIR)/include/QtWebEngine/QtWebEngine) {
-# message(Using QWebEngine)
-# QT += webenginewidgets
-# DEFINES += "USEWEBENGINE"
-#}
-
-linux {
- LIBS += -lrt
-}
-
-win32 {
- LIBS += -luser32
-}
-
-# OSX include directory
-macx {
- INCLUDEPATH += /usr/local/include
-}
-
-# Optional dependency on Windows SDK 7
-!contains(QMAKE_TARGET.arch, x86_64) {
- win32:exists(C:\Program Files\Microsoft SDKs\Windows\v7.1\Include\Windows.h) {
- LIBS += -L"C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib" \
- -ldwmapi
-
- DEFINES += "USEWINSDK"
- message(Using Windows SDK 7)
- }
-}
-
-# Optional dependency on Windows SDK 10
-contains(QMAKE_TARGET.arch, x86_64) {
- WIN_SDK_VERSION = $$(WindowsSDKVersion)
- !isEmpty(WIN_SDK_VERSION) {
- !equals(WIN_SDK_VERSION, "\\") {
- DEFINES += "USEWINSDK"
- message(Using Windows SDK 10)
- }
- }
-}
-
-werr {
- QMAKE_CXXFLAGS += -Werror
-
- message("Enabling error on warning")
-}
-
-# src
-SOURCES += \
- src/main.cpp \
- src/application.cpp \
- src/channel.cpp \
- src/channeldata.cpp \
- src/messages/image.cpp \
- src/messages/layouts/messagelayout.cpp \
- src/messages/layouts/messagelayoutcontainer.cpp \
- src/messages/layouts/messagelayoutelement.cpp \
- src/messages/link.cpp \
- src/messages/message.cpp \
- src/messages/messagebuilder.cpp \
- src/messages/messagecolor.cpp \
- src/messages/messageelement.cpp \
- src/providers/irc/abstractircserver.cpp \
- src/providers/twitch/ircmessagehandler.cpp \
- src/providers/twitch/twitchaccount.cpp \
- src/providers/twitch/twitchaccountmanager.cpp \
- src/providers/twitch/twitchchannel.cpp \
- src/providers/twitch/twitchmessagebuilder.cpp \
- src/providers/twitch/twitchserver.cpp \
- src/providers/twitch/pubsub.cpp \
- src/providers/twitch/twitchemotes.cpp \
- src/providers/bttv/bttvemotes.cpp \
- src/providers/ffz/ffzemotes.cpp \
- src/providers/emoji/emojis.cpp \
- src/singletons/emotemanager.cpp \
- src/singletons/fontmanager.cpp \
- src/util/completionmodel.cpp \
- src/singletons/helper/loggingchannel.cpp \
- src/singletons/helper/moderationaction.cpp \
- src/singletons/helper/chatterinosetting.cpp \
- src/singletons/helper/giftimer.cpp \
- src/singletons/loggingmanager.cpp \
- src/singletons/pathmanager.cpp \
- src/singletons/resourcemanager.cpp \
- src/singletons/settingsmanager.cpp \
- src/singletons/thememanager.cpp \
- src/singletons/windowmanager.cpp \
- src/util/networkmanager.cpp \
- src/util/networkrequest.cpp \
- src/widgets/accountswitchpopupwidget.cpp \
- src/widgets/accountswitchwidget.cpp \
- src/widgets/basewidget.cpp \
- src/widgets/basewindow.cpp \
- src/widgets/emotepopup.cpp \
- src/widgets/helper/channelview.cpp \
- src/widgets/helper/droppreview.cpp \
- src/widgets/helper/label.cpp \
- src/widgets/helper/notebookbutton.cpp \
- src/widgets/helper/notebooktab.cpp \
- src/widgets/helper/resizingtextedit.cpp \
- src/widgets/helper/rippleeffectbutton.cpp \
- src/widgets/helper/rippleeffectlabel.cpp \
- src/widgets/helper/scrollbarhighlight.cpp \
- src/widgets/helper/searchpopup.cpp \
- src/widgets/helper/settingsdialogtab.cpp \
- src/widgets/helper/splitcolumn.cpp \
- src/widgets/helper/splitheader.cpp \
- src/widgets/helper/splitinput.cpp \
- src/widgets/helper/titlebarbutton.cpp \
- src/widgets/logindialog.cpp \
- src/widgets/notebook.cpp \
- src/widgets/qualitypopup.cpp \
- src/widgets/scrollbar.cpp \
- src/widgets/settingsdialog.cpp \
- src/widgets/settingspages/aboutpage.cpp \
- src/widgets/settingspages/accountspage.cpp \
- src/widgets/settingspages/appearancepage.cpp \
- src/widgets/settingspages/behaviourpage.cpp \
- src/widgets/settingspages/commandpage.cpp \
- src/widgets/settingspages/emotespage.cpp \
- src/widgets/settingspages/highlightingpage.cpp \
- src/widgets/settingspages/ignoreuserspage.cpp \
- src/widgets/settingspages/keyboardsettingspage.cpp \
- src/widgets/settingspages/logspage.cpp \
- src/widgets/settingspages/moderationpage.cpp \
- src/widgets/settingspages/settingspage.cpp \
- src/widgets/settingspages/specialchannelspage.cpp \
- src/widgets/split.cpp \
- src/widgets/splitcontainer.cpp \
- src/widgets/streamview.cpp \
- src/widgets/textinputdialog.cpp \
- src/widgets/tooltipwidget.cpp \
- src/widgets/window.cpp \
- src/providers/irc/ircaccount.cpp \
- src/providers/irc/ircserver.cpp \
- src/providers/irc/ircchannel2.cpp \
- src/util/streamlink.cpp \
- src/providers/twitch/twitchhelpers.cpp \
- src/widgets/helper/signallabel.cpp \
- src/widgets/helper/debugpopup.cpp \
- src/util/debugcount.cpp \
- src/singletons/nativemessagingmanager.cpp \
- src/util/rapidjson-helpers.cpp \
- src/providers/twitch/pubsubhelpers.cpp \
- src/providers/twitch/pubsubactions.cpp \
- src/providers/twitch/twitchuser.cpp \
- src/widgets/selectchanneldialog.cpp \
- src/singletons/updatemanager.cpp \
- src/widgets/lastruncrashdialog.cpp \
- src/widgets/attachedwindow.cpp \
- src/widgets/settingspages/externaltoolspage.cpp \
- src/widgets/helper/comboboxitemdelegate.cpp \
- src/controllers/commands/command.cpp \
- src/controllers/commands/commandmodel.cpp \
- src/controllers/commands/commandcontroller.cpp \
- src/controllers/highlights/highlightcontroller.cpp \
- src/controllers/highlights/highlightmodel.cpp \
- src/controllers/ignores/ignorecontroller.cpp \
- src/controllers/ignores/ignoremodel.cpp \
- src/widgets/helper/editablemodelview.cpp \
- src/controllers/accounts/accountcontroller.cpp \
- src/controllers/accounts/accountmodel.cpp \
- src/controllers/accounts/account.cpp \
- src/widgets/helper/splitoverlay.cpp \
- src/widgets/helper/dropoverlay.cpp \
- src/widgets/helper/splitnode.cpp \
- src/widgets/notificationpopup.cpp \
- src/controllers/taggedusers/taggeduserscontroller.cpp \
- src/controllers/taggedusers/taggeduser.cpp \
- src/controllers/taggedusers/taggedusersmodel.cpp \
- src/util/emotemap.cpp \
- src/providers/irc/ircconnection2.cpp \
- src/widgets/userinfopopup.cpp
-
-HEADERS += \
- src/precompiled_header.hpp \
- src/channel.hpp \
- src/const.hpp \
- src/debug/log.hpp \
- src/messages/image.hpp \
- src/messages/layouts/messagelayout.hpp \
- src/messages/layouts/messagelayoutcontainer.hpp \
- src/messages/layouts/messagelayoutelement.hpp \
- src/messages/limitedqueue.hpp \
- src/messages/limitedqueuesnapshot.hpp \
- src/messages/link.hpp \
- src/messages/message.hpp \
- src/messages/messagebuilder.hpp \
- src/messages/messagecolor.hpp \
- src/messages/messageelement.hpp \
- src/messages/messageparseargs.hpp \
- src/messages/selection.hpp \
- src/providers/twitch/emotevalue.hpp \
- src/providers/twitch/ircmessagehandler.hpp \
- src/providers/twitch/twitchaccount.hpp \
- src/providers/twitch/twitchaccountmanager.hpp \
- src/providers/twitch/twitchchannel.hpp \
- src/providers/twitch/twitchmessagebuilder.hpp \
- src/providers/twitch/twitchserver.hpp \
- src/providers/twitch/pubsub.hpp \
- src/providers/twitch/twitchemotes.hpp \
- src/providers/bttv/bttvemotes.hpp \
- src/providers/ffz/ffzemotes.hpp \
- src/providers/emoji/emojis.hpp \
- src/singletons/emotemanager.hpp \
- src/singletons/fontmanager.hpp \
- src/singletons/helper/chatterinosetting.hpp \
- src/singletons/helper/giftimer.hpp \
- src/util/completionmodel.hpp \
- src/singletons/helper/loggingchannel.hpp \
- src/singletons/helper/moderationaction.hpp \
- src/singletons/loggingmanager.hpp \
- src/singletons/pathmanager.hpp \
- src/singletons/resourcemanager.hpp \
- src/singletons/thememanager.hpp \
- src/singletons/windowmanager.hpp \
- src/util/benchmark.hpp \
- src/util/concurrentmap.hpp \
- src/util/distancebetweenpoints.hpp \
- src/util/emotemap.hpp \
- src/util/flagsenum.hpp \
- src/util/helpers.hpp \
- src/util/irchelpers.hpp \
- src/util/layoutcreator.hpp \
- src/util/nativeeventhelper.hpp \
- src/util/networkmanager.hpp \
- src/util/networkrequest.hpp \
- src/util/networkrequester.hpp \
- src/util/networkworker.hpp \
- src/util/posttothread.hpp \
- src/util/property.hpp \
- src/util/serialize-custom.hpp \
- src/util/urlfetch.hpp \
- src/widgets/accountswitchpopupwidget.hpp \
- src/widgets/accountswitchwidget.hpp \
- src/widgets/basewidget.hpp \
- src/widgets/basewindow.hpp \
- src/widgets/emotepopup.hpp \
- src/widgets/helper/channelview.hpp \
- src/widgets/helper/droppreview.hpp \
- src/widgets/helper/label.hpp \
- src/widgets/helper/notebookbutton.hpp \
- src/widgets/helper/notebooktab.hpp \
- src/widgets/helper/resizingtextedit.hpp \
- src/widgets/helper/rippleeffectbutton.hpp \
- src/widgets/helper/rippleeffectlabel.hpp \
- src/widgets/helper/scrollbarhighlight.hpp \
- src/widgets/helper/searchpopup.hpp \
- src/widgets/helper/settingsdialogtab.hpp \
- src/widgets/helper/shortcut.hpp \
- src/widgets/helper/signallabel.hpp \
- src/widgets/helper/splitcolumn.hpp \
- src/widgets/helper/splitheader.hpp \
- src/widgets/helper/splitinput.hpp \
- src/widgets/helper/titlebarbutton.hpp \
- src/widgets/notebook.hpp \
- src/widgets/qualitypopup.hpp \
- src/widgets/scrollbar.hpp \
- src/widgets/settingsdialog.hpp \
- src/widgets/settingspages/aboutpage.hpp \
- src/widgets/settingspages/accountspage.hpp \
- src/widgets/settingspages/appearancepage.hpp \
- src/widgets/settingspages/behaviourpage.hpp \
- src/widgets/settingspages/commandpage.hpp \
- src/widgets/settingspages/emotespage.hpp \
- src/widgets/settingspages/highlightingpage.hpp \
- src/widgets/settingspages/ignoreuserspage.hpp \
- src/widgets/settingspages/keyboardsettingspage.hpp \
- src/widgets/settingspages/logspage.hpp \
- src/widgets/settingspages/moderationpage.hpp \
- src/widgets/settingspages/settingspage.hpp \
- src/widgets/settingspages/specialchannelspage.hpp \
- src/widgets/split.hpp \
- src/widgets/splitcontainer.hpp \
- src/widgets/streamview.hpp \
- src/widgets/textinputdialog.hpp \
- src/widgets/tooltipwidget.hpp \
- src/widgets/window.hpp \
- src/common.hpp \
- src/providers/irc/abstractircserver.hpp \
- src/providers/irc/ircaccount.hpp \
- src/providers/irc/ircserver.hpp \
- src/providers/irc/ircchannel2.hpp \
- src/util/streamlink.hpp \
- src/providers/twitch/twitchhelpers.hpp \
- src/util/debugcount.hpp \
- src/widgets/helper/debugpopup.hpp \
- src/version.hpp \
- src/singletons/settingsmanager.hpp \
- src/singletons/nativemessagingmanager.hpp \
- src/util/rapidjson-helpers.hpp \
- src/providers/twitch/pubsubhelpers.hpp \
- src/providers/twitch/pubsubactions.hpp \
- src/providers/twitch/twitchuser.hpp \
- src/widgets/selectchanneldialog.hpp \
- src/singletons/updatemanager.hpp \
- src/widgets/lastruncrashdialog.hpp \
- src/widgets/attachedwindow.hpp \
- src/widgets/settingspages/externaltoolspage.hpp \
- src/util/removescrollareabackground.hpp \
- src/util/standarditemhelper.hpp \
- src/widgets/helper/comboboxitemdelegate.hpp \
- src/util/assertinguithread.hpp \
- src/util/signalvector2.hpp \
- src/util/signalvectormodel.hpp \
- src/controllers/commands/command.hpp \
- src/controllers/commands/commandmodel.hpp \
- src/controllers/commands/commandcontroller.hpp \
- src/controllers/highlights/highlightcontroller.hpp \
- src/controllers/highlights/highlightphrase.hpp \
- src/controllers/highlights/highlightmodel.hpp \
- src/controllers/ignores/ignorecontroller.hpp \
- src/controllers/ignores/ignorephrase.hpp \
- src/controllers/ignores/ignoremodel.hpp \
- src/widgets/helper/editablemodelview.hpp \
- src/controllers/accounts/accountcontroller.hpp \
- src/controllers/accounts/accountmodel.hpp \
- src/controllers/accounts/account.hpp \
- src/util/sharedptrelementless.hpp \
- src/widgets/helper/splitoverlay.hpp \
- src/widgets/helper/dropoverlay.hpp \
- src/widgets/helper/splitnode.hpp \
- src/widgets/notificationpopup.hpp \
- src/controllers/taggedusers/taggeduserscontroller.hpp \
- src/controllers/taggedusers/taggeduser.hpp \
- src/providerid.hpp \
- src/controllers/taggedusers/taggedusersmodel.hpp \
- src/util/qstringhash.hpp \
- src/util/mutexvalue.hpp \
- src/providers/irc/ircconnection2.hpp \
- src/widgets/helper/line.hpp \
- src/widgets/userinfopopup.hpp
-
-RESOURCES += \
- resources/resources.qrc
-
-DISTFILES +=
-
-FORMS +=
-
-# Define warning flags for Chatterino
-win32-msvc* {
- QMAKE_CXXFLAGS_WARN_ON = /W4
- # 4714 - function marked as __forceinline not inlined
- # 4996 - occurs when the compiler encounters a function or variable that is marked as deprecated.
- # These functions may have a different preferred name, may be insecure or have
- # a more secure variant, or may be obsolete.
- # 4505 - unreferenced local version has been removed
- # 4127 - conditional expression is constant
- # 4503 - decorated name length exceeded, name was truncated
- # 4100 - unreferences formal parameter
- # 4305 - possible truncation of data
- # 4267 - possible loss of data in return
- QMAKE_CXXFLAGS_WARN_ON += /wd4714
- QMAKE_CXXFLAGS_WARN_ON += /wd4996
- QMAKE_CXXFLAGS_WARN_ON += /wd4505
- QMAKE_CXXFLAGS_WARN_ON += /wd4127
- QMAKE_CXXFLAGS_WARN_ON += /wd4503
- QMAKE_CXXFLAGS_WARN_ON += /wd4100
- QMAKE_CXXFLAGS_WARN_ON += /wd4305
- QMAKE_CXXFLAGS_WARN_ON += /wd4267
-
-} else {
- QMAKE_CXXFLAGS_WARN_ON = -Wall
- QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-function
- QMAKE_CXXFLAGS_WARN_ON += -Wno-switch
- QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-declarations
- QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare
- QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-variable
-
- # Disabling strict-aliasing warnings for now, although we probably want to re-enable this in the future
- QMAKE_CXXFLAGS_WARN_ON += -Wno-strict-aliasing
-
- equals(QMAKE_CXX, "clang++") {
- QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-local-typedef
- } else {
- QMAKE_CXXFLAGS_WARN_ON += -Wno-class-memaccess
- }
-}
-
-# do not use windows min/max macros
-#win32 {
-# DEFINES += NOMINMAX
-#}
-
-#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
-
-linux {
- QMAKE_LFLAGS += -lrt
-}
+#-------------------------------------------------
+#
+# Project created by QtCreator 2016-12-28T18:23:35
+#
+#-------------------------------------------------
+
+message(----)
+
+QT += widgets core gui network multimedia svg
+CONFIG += communi
+COMMUNI += core model util
+CONFIG += c++14
+INCLUDEPATH += src/
+TARGET = chatterino
+TEMPLATE = app
+DEFINES += QT_DEPRECATED_WARNINGS
+PRECOMPILED_HEADER = src/precompiled_header.hpp
+CONFIG += precompile_header
+
+# https://bugreports.qt.io/browse/QTBUG-27018
+equals(QMAKE_CXX, "clang++")|equals(QMAKE_CXX, "g++") {
+ TARGET = bin/chatterino
+}
+
+# Icons
+macx:ICON = resources/images/chatterino2.icns
+win32:RC_FILE = resources/windows.rc
+
+
+macx {
+ LIBS += -L/usr/local/lib
+}
+
+# Submodules
+include(dependencies/rapidjson.pri)
+include(dependencies/settings.pri)
+include(dependencies/signals.pri)
+include(dependencies/humanize.pri)
+include(dependencies/fmt.pri)
+DEFINES += IRC_NAMESPACE=Communi
+include(dependencies/libcommuni.pri)
+include(dependencies/websocketpp.pri)
+include(dependencies/openssl.pri)
+include(dependencies/boost.pri)
+
+# Optional feature: QtWebEngine
+#exists ($(QTDIR)/include/QtWebEngine/QtWebEngine) {
+# message(Using QWebEngine)
+# QT += webenginewidgets
+# DEFINES += "USEWEBENGINE"
+#}
+
+linux {
+ LIBS += -lrt
+}
+
+win32 {
+ LIBS += -luser32
+}
+
+# OSX include directory
+macx {
+ INCLUDEPATH += /usr/local/include
+}
+
+# Optional dependency on Windows SDK 7
+!contains(QMAKE_TARGET.arch, x86_64) {
+ win32:exists(C:\Program Files\Microsoft SDKs\Windows\v7.1\Include\Windows.h) {
+ LIBS += -L"C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib" \
+ -ldwmapi
+
+ DEFINES += "USEWINSDK"
+ message(Using Windows SDK 7)
+ }
+}
+
+# Optional dependency on Windows SDK 10
+contains(QMAKE_TARGET.arch, x86_64) {
+ WIN_SDK_VERSION = $$(WindowsSDKVersion)
+ !isEmpty(WIN_SDK_VERSION) {
+ !equals(WIN_SDK_VERSION, "\\") {
+ DEFINES += "USEWINSDK"
+ message(Using Windows SDK 10)
+ }
+ }
+}
+
+werr {
+ QMAKE_CXXFLAGS += -Werror
+
+ message("Enabling error on warning")
+}
+
+# src
+SOURCES += \
+ src/main.cpp \
+ src/application.cpp \
+ src/channel.cpp \
+ src/channeldata.cpp \
+ src/messages/image.cpp \
+ src/messages/layouts/messagelayout.cpp \
+ src/messages/layouts/messagelayoutcontainer.cpp \
+ src/messages/layouts/messagelayoutelement.cpp \
+ src/messages/link.cpp \
+ src/messages/message.cpp \
+ src/messages/messagebuilder.cpp \
+ src/messages/messagecolor.cpp \
+ src/messages/messageelement.cpp \
+ src/providers/irc/abstractircserver.cpp \
+ src/providers/twitch/ircmessagehandler.cpp \
+ src/providers/twitch/twitchaccount.cpp \
+ src/providers/twitch/twitchaccountmanager.cpp \
+ src/providers/twitch/twitchchannel.cpp \
+ src/providers/twitch/twitchmessagebuilder.cpp \
+ src/providers/twitch/twitchserver.cpp \
+ src/providers/twitch/pubsub.cpp \
+ src/providers/twitch/twitchemotes.cpp \
+ src/providers/bttv/bttvemotes.cpp \
+ src/providers/ffz/ffzemotes.cpp \
+ src/providers/emoji/emojis.cpp \
+ src/singletons/emotemanager.cpp \
+ src/singletons/fontmanager.cpp \
+ src/util/completionmodel.cpp \
+ src/singletons/helper/loggingchannel.cpp \
+ src/singletons/helper/moderationaction.cpp \
+ src/singletons/helper/chatterinosetting.cpp \
+ src/singletons/helper/giftimer.cpp \
+ src/singletons/loggingmanager.cpp \
+ src/singletons/pathmanager.cpp \
+ src/singletons/resourcemanager.cpp \
+ src/singletons/settingsmanager.cpp \
+ src/singletons/thememanager.cpp \
+ src/singletons/windowmanager.cpp \
+ src/util/networkmanager.cpp \
+ src/util/networkrequest.cpp \
+ src/widgets/accountswitchpopupwidget.cpp \
+ src/widgets/accountswitchwidget.cpp \
+ src/widgets/basewidget.cpp \
+ src/widgets/basewindow.cpp \
+ src/widgets/emotepopup.cpp \
+ src/widgets/helper/channelview.cpp \
+ src/widgets/helper/droppreview.cpp \
+ src/widgets/helper/label.cpp \
+ src/widgets/helper/notebookbutton.cpp \
+ src/widgets/helper/notebooktab.cpp \
+ src/widgets/helper/resizingtextedit.cpp \
+ src/widgets/helper/rippleeffectbutton.cpp \
+ src/widgets/helper/rippleeffectlabel.cpp \
+ src/widgets/helper/scrollbarhighlight.cpp \
+ src/widgets/helper/searchpopup.cpp \
+ src/widgets/helper/settingsdialogtab.cpp \
+ src/widgets/helper/splitcolumn.cpp \
+ src/widgets/helper/splitheader.cpp \
+ src/widgets/helper/splitinput.cpp \
+ src/widgets/helper/titlebarbutton.cpp \
+ src/widgets/logindialog.cpp \
+ src/widgets/notebook.cpp \
+ src/widgets/qualitypopup.cpp \
+ src/widgets/scrollbar.cpp \
+ src/widgets/settingsdialog.cpp \
+ src/widgets/settingspages/aboutpage.cpp \
+ src/widgets/settingspages/accountspage.cpp \
+ src/widgets/settingspages/appearancepage.cpp \
+ src/widgets/settingspages/behaviourpage.cpp \
+ src/widgets/settingspages/commandpage.cpp \
+ src/widgets/settingspages/emotespage.cpp \
+ src/widgets/settingspages/highlightingpage.cpp \
+ src/widgets/settingspages/ignoreuserspage.cpp \
+ src/widgets/settingspages/keyboardsettingspage.cpp \
+ src/widgets/settingspages/logspage.cpp \
+ src/widgets/settingspages/moderationpage.cpp \
+ src/widgets/settingspages/settingspage.cpp \
+ src/widgets/settingspages/specialchannelspage.cpp \
+ src/widgets/split.cpp \
+ src/widgets/splitcontainer.cpp \
+ src/widgets/streamview.cpp \
+ src/widgets/textinputdialog.cpp \
+ src/widgets/tooltipwidget.cpp \
+ src/widgets/window.cpp \
+ src/providers/irc/ircaccount.cpp \
+ src/providers/irc/ircserver.cpp \
+ src/providers/irc/ircchannel2.cpp \
+ src/util/streamlink.cpp \
+ src/providers/twitch/twitchhelpers.cpp \
+ src/widgets/helper/signallabel.cpp \
+ src/widgets/helper/debugpopup.cpp \
+ src/util/debugcount.cpp \
+ src/singletons/nativemessagingmanager.cpp \
+ src/util/rapidjson-helpers.cpp \
+ src/providers/twitch/pubsubhelpers.cpp \
+ src/providers/twitch/pubsubactions.cpp \
+ src/providers/twitch/twitchuser.cpp \
+ src/widgets/selectchanneldialog.cpp \
+ src/singletons/updatemanager.cpp \
+ src/widgets/lastruncrashdialog.cpp \
+ src/widgets/attachedwindow.cpp \
+ src/widgets/settingspages/externaltoolspage.cpp \
+ src/widgets/helper/comboboxitemdelegate.cpp \
+ src/controllers/commands/command.cpp \
+ src/controllers/commands/commandmodel.cpp \
+ src/controllers/commands/commandcontroller.cpp \
+ src/controllers/highlights/highlightcontroller.cpp \
+ src/controllers/highlights/highlightmodel.cpp \
+ src/controllers/ignores/ignorecontroller.cpp \
+ src/controllers/ignores/ignoremodel.cpp \
+ src/widgets/helper/editablemodelview.cpp \
+ src/controllers/accounts/accountcontroller.cpp \
+ src/controllers/accounts/accountmodel.cpp \
+ src/controllers/accounts/account.cpp \
+ src/widgets/helper/splitoverlay.cpp \
+ src/widgets/helper/dropoverlay.cpp \
+ src/widgets/helper/splitnode.cpp \
+ src/widgets/notificationpopup.cpp \
+ src/controllers/taggedusers/taggeduserscontroller.cpp \
+ src/controllers/taggedusers/taggeduser.cpp \
+ src/controllers/taggedusers/taggedusersmodel.cpp \
+ src/util/emotemap.cpp \
+ src/providers/irc/ircconnection2.cpp \
+ src/widgets/userinfopopup.cpp \
+ src/widgets/welcomedialog.cpp
+
+HEADERS += \
+ src/precompiled_header.hpp \
+ src/channel.hpp \
+ src/const.hpp \
+ src/debug/log.hpp \
+ src/messages/image.hpp \
+ src/messages/layouts/messagelayout.hpp \
+ src/messages/layouts/messagelayoutcontainer.hpp \
+ src/messages/layouts/messagelayoutelement.hpp \
+ src/messages/limitedqueue.hpp \
+ src/messages/limitedqueuesnapshot.hpp \
+ src/messages/link.hpp \
+ src/messages/message.hpp \
+ src/messages/messagebuilder.hpp \
+ src/messages/messagecolor.hpp \
+ src/messages/messageelement.hpp \
+ src/messages/messageparseargs.hpp \
+ src/messages/selection.hpp \
+ src/providers/twitch/emotevalue.hpp \
+ src/providers/twitch/ircmessagehandler.hpp \
+ src/providers/twitch/twitchaccount.hpp \
+ src/providers/twitch/twitchaccountmanager.hpp \
+ src/providers/twitch/twitchchannel.hpp \
+ src/providers/twitch/twitchmessagebuilder.hpp \
+ src/providers/twitch/twitchserver.hpp \
+ src/providers/twitch/pubsub.hpp \
+ src/providers/twitch/twitchemotes.hpp \
+ src/providers/bttv/bttvemotes.hpp \
+ src/providers/ffz/ffzemotes.hpp \
+ src/providers/emoji/emojis.hpp \
+ src/singletons/emotemanager.hpp \
+ src/singletons/fontmanager.hpp \
+ src/singletons/helper/chatterinosetting.hpp \
+ src/singletons/helper/giftimer.hpp \
+ src/util/completionmodel.hpp \
+ src/singletons/helper/loggingchannel.hpp \
+ src/singletons/helper/moderationaction.hpp \
+ src/singletons/loggingmanager.hpp \
+ src/singletons/pathmanager.hpp \
+ src/singletons/resourcemanager.hpp \
+ src/singletons/thememanager.hpp \
+ src/singletons/windowmanager.hpp \
+ src/util/benchmark.hpp \
+ src/util/concurrentmap.hpp \
+ src/util/distancebetweenpoints.hpp \
+ src/util/emotemap.hpp \
+ src/util/flagsenum.hpp \
+ src/util/helpers.hpp \
+ src/util/irchelpers.hpp \
+ src/util/layoutcreator.hpp \
+ src/util/nativeeventhelper.hpp \
+ src/util/networkmanager.hpp \
+ src/util/networkrequest.hpp \
+ src/util/networkrequester.hpp \
+ src/util/networkworker.hpp \
+ src/util/posttothread.hpp \
+ src/util/property.hpp \
+ src/util/serialize-custom.hpp \
+ src/util/urlfetch.hpp \
+ src/widgets/accountswitchpopupwidget.hpp \
+ src/widgets/accountswitchwidget.hpp \
+ src/widgets/basewidget.hpp \
+ src/widgets/basewindow.hpp \
+ src/widgets/emotepopup.hpp \
+ src/widgets/helper/channelview.hpp \
+ src/widgets/helper/droppreview.hpp \
+ src/widgets/helper/label.hpp \
+ src/widgets/helper/notebookbutton.hpp \
+ src/widgets/helper/notebooktab.hpp \
+ src/widgets/helper/resizingtextedit.hpp \
+ src/widgets/helper/rippleeffectbutton.hpp \
+ src/widgets/helper/rippleeffectlabel.hpp \
+ src/widgets/helper/scrollbarhighlight.hpp \
+ src/widgets/helper/searchpopup.hpp \
+ src/widgets/helper/settingsdialogtab.hpp \
+ src/widgets/helper/shortcut.hpp \
+ src/widgets/helper/signallabel.hpp \
+ src/widgets/helper/splitcolumn.hpp \
+ src/widgets/helper/splitheader.hpp \
+ src/widgets/helper/splitinput.hpp \
+ src/widgets/helper/titlebarbutton.hpp \
+ src/widgets/notebook.hpp \
+ src/widgets/qualitypopup.hpp \
+ src/widgets/scrollbar.hpp \
+ src/widgets/settingsdialog.hpp \
+ src/widgets/settingspages/aboutpage.hpp \
+ src/widgets/settingspages/accountspage.hpp \
+ src/widgets/settingspages/appearancepage.hpp \
+ src/widgets/settingspages/behaviourpage.hpp \
+ src/widgets/settingspages/commandpage.hpp \
+ src/widgets/settingspages/emotespage.hpp \
+ src/widgets/settingspages/highlightingpage.hpp \
+ src/widgets/settingspages/ignoreuserspage.hpp \
+ src/widgets/settingspages/keyboardsettingspage.hpp \
+ src/widgets/settingspages/logspage.hpp \
+ src/widgets/settingspages/moderationpage.hpp \
+ src/widgets/settingspages/settingspage.hpp \
+ src/widgets/settingspages/specialchannelspage.hpp \
+ src/widgets/split.hpp \
+ src/widgets/splitcontainer.hpp \
+ src/widgets/streamview.hpp \
+ src/widgets/textinputdialog.hpp \
+ src/widgets/tooltipwidget.hpp \
+ src/widgets/window.hpp \
+ src/common.hpp \
+ src/providers/irc/abstractircserver.hpp \
+ src/providers/irc/ircaccount.hpp \
+ src/providers/irc/ircserver.hpp \
+ src/providers/irc/ircchannel2.hpp \
+ src/util/streamlink.hpp \
+ src/providers/twitch/twitchhelpers.hpp \
+ src/util/debugcount.hpp \
+ src/widgets/helper/debugpopup.hpp \
+ src/version.hpp \
+ src/singletons/settingsmanager.hpp \
+ src/singletons/nativemessagingmanager.hpp \
+ src/util/rapidjson-helpers.hpp \
+ src/providers/twitch/pubsubhelpers.hpp \
+ src/providers/twitch/pubsubactions.hpp \
+ src/providers/twitch/twitchuser.hpp \
+ src/widgets/selectchanneldialog.hpp \
+ src/singletons/updatemanager.hpp \
+ src/widgets/lastruncrashdialog.hpp \
+ src/widgets/attachedwindow.hpp \
+ src/widgets/settingspages/externaltoolspage.hpp \
+ src/util/removescrollareabackground.hpp \
+ src/util/standarditemhelper.hpp \
+ src/widgets/helper/comboboxitemdelegate.hpp \
+ src/util/assertinguithread.hpp \
+ src/util/signalvector2.hpp \
+ src/util/signalvectormodel.hpp \
+ src/controllers/commands/command.hpp \
+ src/controllers/commands/commandmodel.hpp \
+ src/controllers/commands/commandcontroller.hpp \
+ src/controllers/highlights/highlightcontroller.hpp \
+ src/controllers/highlights/highlightphrase.hpp \
+ src/controllers/highlights/highlightmodel.hpp \
+ src/controllers/ignores/ignorecontroller.hpp \
+ src/controllers/ignores/ignorephrase.hpp \
+ src/controllers/ignores/ignoremodel.hpp \
+ src/widgets/helper/editablemodelview.hpp \
+ src/controllers/accounts/accountcontroller.hpp \
+ src/controllers/accounts/accountmodel.hpp \
+ src/controllers/accounts/account.hpp \
+ src/util/sharedptrelementless.hpp \
+ src/widgets/helper/splitoverlay.hpp \
+ src/widgets/helper/dropoverlay.hpp \
+ src/widgets/helper/splitnode.hpp \
+ src/widgets/notificationpopup.hpp \
+ src/controllers/taggedusers/taggeduserscontroller.hpp \
+ src/controllers/taggedusers/taggeduser.hpp \
+ src/providerid.hpp \
+ src/controllers/taggedusers/taggedusersmodel.hpp \
+ src/util/qstringhash.hpp \
+ src/util/mutexvalue.hpp \
+ src/providers/irc/ircconnection2.hpp \
+ src/widgets/helper/line.hpp \
+ src/widgets/userinfopopup.hpp \
+ src/widgets/welcomedialog.hpp
+
+RESOURCES += \
+ resources/resources.qrc
+
+DISTFILES +=
+
+FORMS +=
+
+# Define warning flags for Chatterino
+win32-msvc* {
+ QMAKE_CXXFLAGS_WARN_ON = /W4
+ # 4714 - function marked as __forceinline not inlined
+ # 4996 - occurs when the compiler encounters a function or variable that is marked as deprecated.
+ # These functions may have a different preferred name, may be insecure or have
+ # a more secure variant, or may be obsolete.
+ # 4505 - unreferenced local version has been removed
+ # 4127 - conditional expression is constant
+ # 4503 - decorated name length exceeded, name was truncated
+ # 4100 - unreferences formal parameter
+ # 4305 - possible truncation of data
+ # 4267 - possible loss of data in return
+ QMAKE_CXXFLAGS_WARN_ON += /wd4714
+ QMAKE_CXXFLAGS_WARN_ON += /wd4996
+ QMAKE_CXXFLAGS_WARN_ON += /wd4505
+ QMAKE_CXXFLAGS_WARN_ON += /wd4127
+ QMAKE_CXXFLAGS_WARN_ON += /wd4503
+ QMAKE_CXXFLAGS_WARN_ON += /wd4100
+ QMAKE_CXXFLAGS_WARN_ON += /wd4305
+ QMAKE_CXXFLAGS_WARN_ON += /wd4267
+
+} else {
+ QMAKE_CXXFLAGS_WARN_ON = -Wall
+ QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-function
+ QMAKE_CXXFLAGS_WARN_ON += -Wno-switch
+ QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-declarations
+ QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare
+ QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-variable
+
+ # Disabling strict-aliasing warnings for now, although we probably want to re-enable this in the future
+ QMAKE_CXXFLAGS_WARN_ON += -Wno-strict-aliasing
+
+ equals(QMAKE_CXX, "clang++") {
+ QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-local-typedef
+ } else {
+ QMAKE_CXXFLAGS_WARN_ON += -Wno-class-memaccess
+ }
+}
+
+# do not use windows min/max macros
+#win32 {
+# DEFINES += NOMINMAX
+#}
+
+#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
+
+linux {
+ QMAKE_LFLAGS += -lrt
+}
diff --git a/resources/images/emote_dark.svg b/resources/images/emote_dark.svg
new file mode 100644
index 00000000..10f2ad9b
--- /dev/null
+++ b/resources/images/emote_dark.svg
@@ -0,0 +1,12 @@
+
+
+
diff --git a/resources/resources.qrc b/resources/resources.qrc
index 56f59383..8e968699 100644
--- a/resources/resources.qrc
+++ b/resources/resources.qrc
@@ -65,6 +65,7 @@
images/buttons/mod.png
images/buttons/unban.png
images/buttons/unmod.png
+ images/emote_dark.svg
qt.conf
diff --git a/src/singletons/thememanager.cpp b/src/singletons/thememanager.cpp
index 704748b0..aaf32124 100644
--- a/src/singletons/thememanager.cpp
+++ b/src/singletons/thememanager.cpp
@@ -52,7 +52,8 @@ void ThemeManager::actuallyUpdate(double hue, double multiplier)
isLight = multiplier > 0;
bool lightWin = isLight;
- QColor themeColor = QColor::fromHslF(hue, 0.43, 0.5);
+ // QColor themeColor = QColor::fromHslF(hue, 0.43, 0.5);
+ QColor themeColor = QColor::fromHslF(hue, 0.8, 0.5);
QColor themeColorNoSat = QColor::fromHslF(hue, 0, 0.5);
qreal sat = 0;
@@ -86,17 +87,19 @@ void ThemeManager::actuallyUpdate(double hue, double multiplier)
this->messages.textColors.caret = //
this->messages.textColors.regular = isLight ? "#000" : "#fff";
- QColor highlighted = lightWin ? QColor("#b60505") : QColor("#ee6166");
+ QColor highlighted = lightWin ? QColor("#ff0000") : QColor("#ee6166");
/// TABS
if (lightWin) {
this->tabs.regular = {QColor("#444"),
- {QColor("#fff"), QColor("#fff"), QColor("#fff")},
+ {QColor("#fff"), QColor("#eee"), QColor("#fff")},
{QColor("#fff"), QColor("#fff"), QColor("#fff")}};
- this->tabs.newMessage = {
- fg, {bg, QColor("#ccc"), bg}, {QColor("#aaa"), QColor("#aaa"), QColor("#aaa")}};
- this->tabs.highlighted = {
- fg, {bg, QColor("#ccc"), bg}, {highlighted, highlighted, highlighted}};
+ this->tabs.newMessage = {QColor("#222"),
+ {QColor("#fff"), QColor("#eee"), QColor("#fff")},
+ {QColor("#bbb"), QColor("#bbb"), QColor("#bbb")}};
+ this->tabs.highlighted = {fg,
+ {QColor("#fff"), QColor("#eee"), QColor("#fff")},
+ {highlighted, highlighted, highlighted}};
this->tabs.selected = {QColor("#000"),
{QColor("#b4d7ff"), QColor("#b4d7ff"), QColor("#b4d7ff")},
{QColor("#00aeef"), QColor("#00aeef"), QColor("#00aeef")}};
@@ -147,13 +150,20 @@ void ThemeManager::actuallyUpdate(double hue, double multiplier)
this->splits.background = getColor(0, sat, 1);
this->splits.dropPreview = QColor(0, 148, 255, 0x30);
this->splits.dropPreviewBorder = QColor(0, 148, 255, 0xff);
- this->splits.dropTargetRect = QColor(0, 148, 255, 0x00);
- this->splits.dropTargetRectBorder = QColor(0, 148, 255, 0x00);
- this->splits.resizeHandle = QColor(0, 148, 255, 0x70);
- this->splits.resizeHandleBackground = QColor(0, 148, 255, 0x20);
- // this->splits.border
- // this->splits.borderFocused
+ if (isLight) {
+ this->splits.dropTargetRect = QColor(255, 255, 255, 0x00);
+ this->splits.dropTargetRectBorder = QColor(0, 148, 255, 0x00);
+
+ this->splits.resizeHandle = QColor(0, 148, 255, 0xff);
+ this->splits.resizeHandleBackground = QColor(0, 148, 255, 0x50);
+ } else {
+ this->splits.dropTargetRect = QColor(0, 148, 255, 0x00);
+ this->splits.dropTargetRectBorder = QColor(0, 148, 255, 0x00);
+
+ this->splits.resizeHandle = QColor(0, 148, 255, 0x70);
+ this->splits.resizeHandleBackground = QColor(0, 148, 255, 0x20);
+ }
this->splits.header.background = getColor(0, sat, flat ? 1 : 0.9);
this->splits.header.border = getColor(0, sat, flat ? 1 : 0.85);
@@ -165,8 +175,9 @@ void ThemeManager::actuallyUpdate(double hue, double multiplier)
this->splits.input.styleSheet =
"background:" + this->splits.input.background.name() + ";" +
"border:" + this->tabs.selected.backgrounds.regular.color().name() + ";" +
- "color:" + this->messages.textColors.regular.name() + ";" +
- "selection-background-color:" + this->tabs.selected.backgrounds.regular.color().name();
+ "color:" + this->messages.textColors.regular.name() + ";" + //
+ "selection-background-color:" +
+ (isLight ? "#68B1FF" : this->tabs.selected.backgrounds.regular.color().name());
// Message
this->messages.textColors.link = isLight ? QColor(66, 134, 244) : QColor(66, 134, 244);
@@ -175,7 +186,7 @@ void ThemeManager::actuallyUpdate(double hue, double multiplier)
this->messages.backgrounds.regular = splits.background;
this->messages.backgrounds.alternate = getColor(0, sat, 0.93);
this->messages.backgrounds.highlighted =
- blendColors(themeColor, this->messages.backgrounds.regular, 0.6);
+ blendColors(themeColor, this->messages.backgrounds.regular, isLight ? 0.8 : 0.6);
this->messages.backgrounds.subscription =
blendColors(QColor("#C466FF"), this->messages.backgrounds.regular, 0.7);
@@ -200,7 +211,7 @@ void ThemeManager::actuallyUpdate(double hue, double multiplier)
this->messages.selection = isLightTheme() ? QColor(0, 0, 0, 64) : QColor(255, 255, 255, 64);
this->updated.invoke();
-} // namespace singletons
+}
QColor ThemeManager::blendColors(const QColor &color1, const QColor &color2, qreal ratio)
{
@@ -222,7 +233,7 @@ void ThemeManager::normalizeColor(QColor &color)
color.setHslF(
color.hueF(), color.saturationF(),
color.lightnessF() - sin((color.hueF() - 0.1) / (0.3333 - 0.1) * 3.14159) *
- color.saturationF() * 0.2);
+ color.saturationF() * 0.4);
}
} else {
if (color.lightnessF() < 0.5) {
diff --git a/src/singletons/thememanager.hpp b/src/singletons/thememanager.hpp
index 77a8130b..cf6c2d10 100644
--- a/src/singletons/thememanager.hpp
+++ b/src/singletons/thememanager.hpp
@@ -59,8 +59,6 @@ public:
struct {
QColor messageSeperator;
QColor background;
- QColor border;
- QColor borderFocused;
QColor dropPreview;
QColor dropPreviewBorder;
QColor dropTargetRect;
diff --git a/src/util/networkrequest.hpp b/src/util/networkrequest.hpp
index 11d8371a..e4d78674 100644
--- a/src/util/networkrequest.hpp
+++ b/src/util/networkrequest.hpp
@@ -216,7 +216,7 @@ public:
if (this->data.caller != nullptr) {
QObject::connect(worker, &NetworkWorker::doneUrl, this->data.caller,
- [onFinished, data = this->data](auto reply) mutable {
+ [ onFinished, data = this->data ](auto reply) mutable {
if (reply->error() != QNetworkReply::NetworkError::NoError) {
// TODO: We might want to call an onError callback here
return;
@@ -238,7 +238,7 @@ public:
QObject::connect(
&requester, &NetworkRequester::requestUrl, worker,
- [timer, data = std::move(this->data), worker, onFinished{std::move(onFinished)}]() {
+ [ timer, data = std::move(this->data), worker, onFinished{std::move(onFinished)} ]() {
QNetworkReply *reply = NetworkManager::NaM.get(data.request);
if (timer != nullptr) {
@@ -253,21 +253,21 @@ public:
data.onReplyCreated(reply);
}
- QObject::connect(reply, &QNetworkReply::finished, worker,
- [data = std::move(data), worker, reply,
- onFinished = std::move(onFinished)]() mutable {
- if (data.caller == nullptr) {
- QByteArray bytes = reply->readAll();
- data.writeToCache(bytes);
- onFinished(bytes);
+ QObject::connect(reply, &QNetworkReply::finished, worker, [
+ data = std::move(data), worker, reply, onFinished = std::move(onFinished)
+ ]() mutable {
+ if (data.caller == nullptr) {
+ QByteArray bytes = reply->readAll();
+ data.writeToCache(bytes);
+ onFinished(bytes);
- reply->deleteLater();
- } else {
- emit worker->doneUrl(reply);
- }
+ reply->deleteLater();
+ } else {
+ emit worker->doneUrl(reply);
+ }
- delete worker;
- });
+ delete worker;
+ });
});
emit requester.requestUrl();
@@ -276,7 +276,7 @@ public:
template
void getJSON(FinishedCallback onFinished)
{
- this->get([onFinished{std::move(onFinished)}](const QByteArray &bytes) -> bool {
+ this->get([onFinished{std::move(onFinished)}](const QByteArray &bytes)->bool {
auto object = parseJSONFromData(bytes);
onFinished(object);
@@ -289,7 +289,7 @@ public:
template
void getJSON2(FinishedCallback onFinished)
{
- this->get([onFinished{std::move(onFinished)}](const QByteArray &bytes) -> bool {
+ this->get([onFinished{std::move(onFinished)}](const QByteArray &bytes)->bool {
auto object = parseJSONFromData2(bytes);
onFinished(object);
@@ -370,8 +370,8 @@ private:
worker->moveToThread(&NetworkManager::workerThread);
if (this->data.caller != nullptr) {
- QObject::connect(worker, &NetworkWorker::doneUrl, this->data.caller,
- [data = this->data](auto reply) mutable {
+ QObject::connect(worker, &NetworkWorker::doneUrl,
+ this->data.caller, [data = this->data](auto reply) mutable {
if (reply->error() != QNetworkReply::NetworkError::NoError) {
if (data.onError) {
data.onError(reply->error());
@@ -394,7 +394,7 @@ private:
}
QObject::connect(&requester, &NetworkRequester::requestUrl, worker,
- [timer, data = std::move(this->data), worker]() {
+ [ timer, data = std::move(this->data), worker ]() {
QNetworkReply *reply = nullptr;
switch (data.requestType) {
case GetRequest: {
@@ -430,7 +430,7 @@ private:
}
QObject::connect(reply, &QNetworkReply::finished, worker,
- [data = std::move(data), worker, reply]() mutable {
+ [ data = std::move(data), worker, reply ]() mutable {
if (data.caller == nullptr) {
QByteArray bytes = reply->readAll();
data.writeToCache(bytes);
diff --git a/src/util/serialize-custom.hpp b/src/util/serialize-custom.hpp
index decb4487..2fa1367b 100644
--- a/src/util/serialize-custom.hpp
+++ b/src/util/serialize-custom.hpp
@@ -29,7 +29,7 @@ struct Deserialize {
auto strLen = value.GetStringLength();
return QString::fromUtf8(str, strLen);
- } catch (const std::exception &e) {
+ } catch (const std::exception &) {
// int x = 5;
} catch (...) {
// int y = 5;
diff --git a/src/widgets/helper/splitinput.cpp b/src/widgets/helper/splitinput.cpp
index 1588c6cb..87dc29b0 100644
--- a/src/widgets/helper/splitinput.cpp
+++ b/src/widgets/helper/splitinput.cpp
@@ -108,11 +108,7 @@ void SplitInput::initLayout()
void SplitInput::scaleChangedEvent(float scale)
{
// update the icon size of the emote button
- QString text = "
";
- text.replace("xD", QString::number(int(12 * scale)));
-
- this->ui_.emoteButton->getLabel().setText(text);
- this->ui_.emoteButton->setFixedHeight(int(18 * scale));
+ this->updateEmoteButton();
// set maximum height
this->setMaximumHeight(int(150 * this->getScale()));
@@ -124,11 +120,29 @@ void SplitInput::themeRefreshEvent()
palette.setColor(QPalette::Foreground, this->themeManager->splits.input.text);
+ this->updateEmoteButton();
this->ui_.textEditLength->setPalette(palette);
this->ui_.textEdit->setStyleSheet(this->themeManager->splits.input.styleSheet);
this->ui_.hbox->setMargin(int((this->themeManager->isLightTheme() ? 4 : 2) * this->getScale()));
+
+ this->ui_.emoteButton->getLabel().setStyleSheet("color: #000");
+}
+
+void SplitInput::updateEmoteButton()
+{
+ float scale = this->getScale();
+
+ QString text = "
";
+ text.replace("xD", QString::number(int(12 * scale)));
+
+ if (this->themeManager->isLightTheme()) {
+ text.replace("emote", "emote_dark");
+ }
+
+ this->ui_.emoteButton->getLabel().setText(text);
+ this->ui_.emoteButton->setFixedHeight(int(18 * scale));
}
void SplitInput::installKeyPressedEvent()
diff --git a/src/widgets/helper/splitinput.hpp b/src/widgets/helper/splitinput.hpp
index 05c9b74b..4dbd793f 100644
--- a/src/widgets/helper/splitinput.hpp
+++ b/src/widgets/helper/splitinput.hpp
@@ -33,6 +33,7 @@ public:
protected:
virtual void scaleChangedEvent(float scale) override;
+ virtual void themeRefreshEvent() override;
virtual void paintEvent(QPaintEvent *) override;
virtual void resizeEvent(QResizeEvent *) override;
@@ -58,7 +59,8 @@ private:
void initLayout();
void installKeyPressedEvent();
- virtual void themeRefreshEvent() override;
+
+ void updateEmoteButton();
private slots:
void editTextChanged();
diff --git a/src/widgets/helper/splitoverlay.cpp b/src/widgets/helper/splitoverlay.cpp
index e59cc71d..48aac6be 100644
--- a/src/widgets/helper/splitoverlay.cpp
+++ b/src/widgets/helper/splitoverlay.cpp
@@ -1,6 +1,8 @@
#include "splitoverlay.hpp"
#include
+#include
+#include
#include
#include
#include
@@ -90,7 +92,11 @@ SplitOverlay::SplitOverlay(Split *parent)
void SplitOverlay::paintEvent(QPaintEvent *)
{
QPainter painter(this);
- painter.fillRect(this->rect(), QColor(0, 0, 0, 150));
+ if (this->themeManager->isLightTheme()) {
+ painter.fillRect(this->rect(), QColor(255, 255, 255, 200));
+ } else {
+ painter.fillRect(this->rect(), QColor(0, 0, 0, 150));
+ }
QRect rect;
switch (this->hoveredElement) {
diff --git a/src/widgets/splitcontainer.cpp b/src/widgets/splitcontainer.cpp
index 3969c95f..c3d85483 100644
--- a/src/widgets/splitcontainer.cpp
+++ b/src/widgets/splitcontainer.cpp
@@ -418,7 +418,11 @@ void SplitContainer::paintEvent(QPaintEvent *)
painter.drawText(rect(), text, QTextOption(Qt::AlignCenter));
} else {
- painter.fillRect(rect(), QColor("#555"));
+ if (getApp()->themes->isLightTheme()) {
+ painter.fillRect(rect(), QColor("#999"));
+ } else {
+ painter.fillRect(rect(), QColor("#555"));
+ }
}
for (DropRect &dropRect : this->dropRects) {
@@ -442,7 +446,11 @@ void SplitContainer::paintEvent(QPaintEvent *)
int s = std::min(dropRect.rect.width(), dropRect.rect.height()) - 12;
- painter.setPen(QColor(255, 255, 255));
+ if (this->themeManager->isLightTheme()) {
+ painter.setPen(QColor(0, 0, 0));
+ } else {
+ painter.setPen(QColor(255, 255, 255));
+ }
painter.drawLine(rect.left() + rect.width() / 2 - (s / 2), rect.top() + rect.height() / 2,
rect.left() + rect.width() / 2 + (s / 2), rect.top() + rect.height() / 2);
painter.drawLine(rect.left() + rect.width() / 2, rect.top() + rect.height() / 2 - (s / 2),
diff --git a/src/widgets/userinfopopup.cpp b/src/widgets/userinfopopup.cpp
index 021dfe95..532fba45 100644
--- a/src/widgets/userinfopopup.cpp
+++ b/src/widgets/userinfopopup.cpp
@@ -140,6 +140,13 @@ UserInfoPopup::UserInfoPopup()
this->installEvents();
}
+void UserInfoPopup::themeRefreshEvent()
+{
+ BaseWindow::themeRefreshEvent();
+
+ this->setStyleSheet("background: #333");
+}
+
void UserInfoPopup::installEvents()
{
std::weak_ptr hack = this->hack_;
@@ -346,7 +353,7 @@ UserInfoPopup::TimeoutWidget::TimeoutWidget()
// connect
QObject::connect(
- *a, &RippleEffectLabel::clicked, [this, timeout = std::get<1>(item)] {
+ *a, &RippleEffectLabel::clicked, [ this, timeout = std::get<1>(item) ] {
this->buttonClicked.invoke(std::make_pair(Action::Timeout, timeout));
});
}
@@ -357,17 +364,13 @@ UserInfoPopup::TimeoutWidget::TimeoutWidget()
addTimeouts("sec", {{"1", 1}});
addTimeouts("min", {
- {"1", 1 * 60},
- {"5", 5 * 60},
- {"10", 10 * 60},
+ {"1", 1 * 60}, {"5", 5 * 60}, {"10", 10 * 60},
});
addTimeouts("hour", {
- {"1", 1 * 60 * 60},
- {"4", 4 * 60 * 60},
+ {"1", 1 * 60 * 60}, {"4", 4 * 60 * 60},
});
addTimeouts("weeks", {
- {"1", 1 * 60 * 60 * 30},
- {"2", 2 * 60 * 60 * 30},
+ {"1", 1 * 60 * 60 * 30}, {"2", 2 * 60 * 60 * 30},
});
addButton(Ban, "ban", getApp()->resources->buttons.ban);
diff --git a/src/widgets/userinfopopup.hpp b/src/widgets/userinfopopup.hpp
index 8394f4e4..2e77896a 100644
--- a/src/widgets/userinfopopup.hpp
+++ b/src/widgets/userinfopopup.hpp
@@ -20,6 +20,9 @@ public:
void setData(const QString &name, const ChannelPtr &channel);
+protected:
+ virtual void themeRefreshEvent() override;
+
private:
bool isMod_;
bool isBroadcaster_;
diff --git a/src/widgets/welcomedialog.cpp b/src/widgets/welcomedialog.cpp
new file mode 100644
index 00000000..56fa3cb9
--- /dev/null
+++ b/src/widgets/welcomedialog.cpp
@@ -0,0 +1,13 @@
+#include "welcomedialog.hpp"
+
+namespace chatterino {
+namespace widgets {
+
+WelcomeDialog::WelcomeDialog()
+ : BaseWindow(nullptr, BaseWindow::EnableCustomFrame)
+{
+ this->setWindowTitle("Chatterino quick setup");
+}
+
+} // namespace widgets
+} // namespace chatterino
diff --git a/src/widgets/welcomedialog.hpp b/src/widgets/welcomedialog.hpp
new file mode 100644
index 00000000..1fad3dbb
--- /dev/null
+++ b/src/widgets/welcomedialog.hpp
@@ -0,0 +1,15 @@
+#pragma once
+
+#include "widgets/basewindow.hpp"
+
+namespace chatterino {
+namespace widgets {
+
+class WelcomeDialog : public BaseWindow
+{
+public:
+ WelcomeDialog();
+};
+
+} // namespace widgets
+} // namespace chatterino
diff --git a/src/widgets/window.cpp b/src/widgets/window.cpp
index 9f2d2b2b..1700176b 100644
--- a/src/widgets/window.cpp
+++ b/src/widgets/window.cpp
@@ -13,6 +13,7 @@
#include "widgets/notebook.hpp"
#include "widgets/settingsdialog.hpp"
#include "widgets/split.hpp"
+#include "widgets/welcomedialog.hpp"
#include
#include
@@ -146,6 +147,12 @@ Window::Window(WindowType _type)
const auto &msg = messages[index++ % messages.size()];
app->twitch.server->addFakeMessage(msg);
});
+
+ CreateWindowShortcut(this, "F9", [=] {
+ auto *dialog = new WelcomeDialog();
+ dialog->setAttribute(Qt::WA_DeleteOnClose);
+ dialog->show();
+ });
#endif
this->refreshWindowTitle("");