mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
changed some filenames and stuff like that
This commit is contained in:
parent
c7b3480aaf
commit
a4995201f5
18 changed files with 46 additions and 41 deletions
|
@ -60,7 +60,6 @@ SOURCES += \
|
||||||
src/resources.cpp \
|
src/resources.cpp \
|
||||||
src/widgets/chatwidget.cpp \
|
src/widgets/chatwidget.cpp \
|
||||||
src/widgets/chatwidgetheader.cpp \
|
src/widgets/chatwidgetheader.cpp \
|
||||||
src/widgets/chatwidgetheaderbutton.cpp \
|
|
||||||
src/widgets/chatwidgetinput.cpp \
|
src/widgets/chatwidgetinput.cpp \
|
||||||
src/widgets/mainwindow.cpp \
|
src/widgets/mainwindow.cpp \
|
||||||
src/widgets/notebook.cpp \
|
src/widgets/notebook.cpp \
|
||||||
|
@ -84,7 +83,6 @@ SOURCES += \
|
||||||
src/messages/messagebuilder.cpp \
|
src/messages/messagebuilder.cpp \
|
||||||
src/twitch/twitchmessagebuilder.cpp \
|
src/twitch/twitchmessagebuilder.cpp \
|
||||||
src/twitch/twitchparsemessage.cpp \
|
src/twitch/twitchparsemessage.cpp \
|
||||||
src/widgets/fancybutton.cpp \
|
|
||||||
src/widgets/titlebar.cpp \
|
src/widgets/titlebar.cpp \
|
||||||
src/appdatapath.cpp \
|
src/appdatapath.cpp \
|
||||||
src/accountmanager.cpp \
|
src/accountmanager.cpp \
|
||||||
|
@ -98,7 +96,9 @@ SOURCES += \
|
||||||
src/widgets/qualitypopup.cpp \
|
src/widgets/qualitypopup.cpp \
|
||||||
src/widgets/emotepopup.cpp \
|
src/widgets/emotepopup.cpp \
|
||||||
src/widgets/channelview.cpp \
|
src/widgets/channelview.cpp \
|
||||||
src/twitch/twitchchannel.cpp
|
src/twitch/twitchchannel.cpp \
|
||||||
|
src/widgets/rippleeffectlabel.cpp \
|
||||||
|
src/widgets/rippleeffectbutton.cpp
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
src/asyncexec.hpp \
|
src/asyncexec.hpp \
|
||||||
|
@ -117,7 +117,6 @@ HEADERS += \
|
||||||
src/twitch/emotevalue.hpp \
|
src/twitch/emotevalue.hpp \
|
||||||
src/widgets/chatwidget.hpp \
|
src/widgets/chatwidget.hpp \
|
||||||
src/widgets/chatwidgetheader.hpp \
|
src/widgets/chatwidgetheader.hpp \
|
||||||
src/widgets/chatwidgetheaderbutton.hpp \
|
|
||||||
src/widgets/chatwidgetinput.hpp \
|
src/widgets/chatwidgetinput.hpp \
|
||||||
src/widgets/mainwindow.hpp \
|
src/widgets/mainwindow.hpp \
|
||||||
src/widgets/notebook.hpp \
|
src/widgets/notebook.hpp \
|
||||||
|
@ -148,7 +147,6 @@ HEADERS += \
|
||||||
src/messages/messagebuilder.hpp \
|
src/messages/messagebuilder.hpp \
|
||||||
src/twitch/twitchmessagebuilder.hpp \
|
src/twitch/twitchmessagebuilder.hpp \
|
||||||
src/twitch/twitchparsemessage.hpp \
|
src/twitch/twitchparsemessage.hpp \
|
||||||
src/widgets/fancybutton.hpp \
|
|
||||||
src/widgets/titlebar.hpp \
|
src/widgets/titlebar.hpp \
|
||||||
src/appdatapath.hpp \
|
src/appdatapath.hpp \
|
||||||
src/accountmanager.hpp \
|
src/accountmanager.hpp \
|
||||||
|
@ -158,10 +156,12 @@ HEADERS += \
|
||||||
src/util/distancebetweenpoints.hpp \
|
src/util/distancebetweenpoints.hpp \
|
||||||
src/widgets/basewidget.hpp \
|
src/widgets/basewidget.hpp \
|
||||||
src/completionmanager.hpp \
|
src/completionmanager.hpp \
|
||||||
src/widgets/qualitypopup.h \
|
|
||||||
src/widgets/emotepopup.h \
|
|
||||||
src/widgets/channelview.hpp \
|
src/widgets/channelview.hpp \
|
||||||
src/twitch/twitchchannel.hpp
|
src/twitch/twitchchannel.hpp \
|
||||||
|
src/widgets/rippleeffectbutton.hpp \
|
||||||
|
src/widgets/rippleeffectlabel.hpp \
|
||||||
|
src/widgets/qualitypopup.hpp \
|
||||||
|
src/widgets/emotepopup.hpp
|
||||||
|
|
||||||
PRECOMPILED_HEADER =
|
PRECOMPILED_HEADER =
|
||||||
|
|
||||||
|
|
|
@ -151,6 +151,11 @@ EmoteMap &EmoteManager::getBTTVChannelEmoteFromCaches()
|
||||||
return _bttvChannelEmoteFromCaches;
|
return _bttvChannelEmoteFromCaches;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EmoteMap &EmoteManager::getEmojis()
|
||||||
|
{
|
||||||
|
return this->emojis;
|
||||||
|
}
|
||||||
|
|
||||||
ConcurrentMap<int, EmoteData> &EmoteManager::getFFZChannelEmoteFromCaches()
|
ConcurrentMap<int, EmoteData> &EmoteManager::getFFZChannelEmoteFromCaches()
|
||||||
{
|
{
|
||||||
return _ffzChannelEmoteFromCaches;
|
return _ffzChannelEmoteFromCaches;
|
||||||
|
@ -208,7 +213,15 @@ void EmoteManager::loadEmojis()
|
||||||
|
|
||||||
this->emojiFirstByte[emojiData.value.at(0)].append(emojiData);
|
this->emojiFirstByte[emojiData.value.at(0)].append(emojiData);
|
||||||
|
|
||||||
// TODO(pajlada): The vectors in emojiFirstByte need to be sorted by emojiData.code.length()
|
QString url = "https://cdnjs.cloudflare.com/ajax/libs/"
|
||||||
|
"emojione/2.2.6/assets/png/" +
|
||||||
|
code + ".png";
|
||||||
|
|
||||||
|
this->emojis.insert(code,
|
||||||
|
EmoteData(new LazyLoadedImage(*this, this->windowManager, url, 0.35)));
|
||||||
|
|
||||||
|
// TODO(pajlada): The vectors in emojiFirstByte need to be sorted by
|
||||||
|
// emojiData.code.length()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,7 @@ public:
|
||||||
EmoteMap &getFFZEmotes();
|
EmoteMap &getFFZEmotes();
|
||||||
EmoteMap &getChatterinoEmotes();
|
EmoteMap &getChatterinoEmotes();
|
||||||
EmoteMap &getBTTVChannelEmoteFromCaches();
|
EmoteMap &getBTTVChannelEmoteFromCaches();
|
||||||
|
EmoteMap &getEmojis();
|
||||||
ConcurrentMap<int, EmoteData> &getFFZChannelEmoteFromCaches();
|
ConcurrentMap<int, EmoteData> &getFFZChannelEmoteFromCaches();
|
||||||
ConcurrentMap<long, EmoteData> &getTwitchEmoteFromCache();
|
ConcurrentMap<long, EmoteData> &getTwitchEmoteFromCache();
|
||||||
|
|
||||||
|
@ -86,6 +87,7 @@ private:
|
||||||
|
|
||||||
// url Emoji-one image
|
// url Emoji-one image
|
||||||
EmoteMap emojiCache;
|
EmoteMap emojiCache;
|
||||||
|
EmoteMap emojis;
|
||||||
|
|
||||||
void loadEmojis();
|
void loadEmojis();
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include "notebookpage.hpp"
|
#include "notebookpage.hpp"
|
||||||
#include "settingsmanager.hpp"
|
#include "settingsmanager.hpp"
|
||||||
#include "util/urlfetch.hpp"
|
#include "util/urlfetch.hpp"
|
||||||
#include "widgets/qualitypopup.h"
|
#include "widgets/qualitypopup.hpp"
|
||||||
#include "widgets/textinputdialog.hpp"
|
#include "widgets/textinputdialog.hpp"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
|
@ -37,7 +37,7 @@ ChatWidgetHeader::ChatWidgetHeader(ChatWidget *_chatWidget)
|
||||||
this->leftLabel.getLabel().setTextFormat(Qt::RichText);
|
this->leftLabel.getLabel().setTextFormat(Qt::RichText);
|
||||||
this->leftLabel.getLabel().setText("<img src=':/images/tool_moreCollapser_off16.png' />");
|
this->leftLabel.getLabel().setText("<img src=':/images/tool_moreCollapser_off16.png' />");
|
||||||
|
|
||||||
connect(&this->leftLabel, &ChatWidgetHeaderButton::clicked, this,
|
connect(&this->leftLabel, &RippleEffectLabel::clicked, this,
|
||||||
&ChatWidgetHeader::leftButtonClicked);
|
&ChatWidgetHeader::leftButtonClicked);
|
||||||
|
|
||||||
this->leftMenu.addAction("Add new split", this->chatWidget, &ChatWidget::doAddSplit,
|
this->leftMenu.addAction("Add new split", this->chatWidget, &ChatWidget::doAddSplit,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include "signallabel.hpp"
|
#include "signallabel.hpp"
|
||||||
#include "widgets/basewidget.hpp"
|
#include "widgets/basewidget.hpp"
|
||||||
#include "widgets/chatwidgetheaderbutton.hpp"
|
#include "widgets/rippleeffectlabel.hpp"
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
|
@ -46,14 +46,14 @@ private:
|
||||||
QHBoxLayout hbox;
|
QHBoxLayout hbox;
|
||||||
|
|
||||||
// top left
|
// top left
|
||||||
ChatWidgetHeaderButton leftLabel;
|
RippleEffectLabel leftLabel;
|
||||||
QMenu leftMenu;
|
QMenu leftMenu;
|
||||||
|
|
||||||
// center
|
// center
|
||||||
SignalLabel channelNameLabel;
|
SignalLabel channelNameLabel;
|
||||||
|
|
||||||
// top right
|
// top right
|
||||||
ChatWidgetHeaderButton rightLabel;
|
RippleEffectLabel rightLabel;
|
||||||
QMenu rightMenu;
|
QMenu rightMenu;
|
||||||
|
|
||||||
void leftButtonClicked();
|
void leftButtonClicked();
|
||||||
|
|
|
@ -45,7 +45,7 @@ ChatWidgetInput::ChatWidgetInput(ChatWidget *_chatWidget, EmoteManager &emoteMan
|
||||||
"<img src=':/images/Emoji_Color_1F60A_19.png' width='12' height='12' "
|
"<img src=':/images/Emoji_Color_1F60A_19.png' width='12' height='12' "
|
||||||
"/>");
|
"/>");
|
||||||
|
|
||||||
connect(&this->emotesLabel, &ChatWidgetHeaderButton::clicked, [this] {
|
connect(&this->emotesLabel, &RippleEffectLabel::clicked, [this] {
|
||||||
if (this->emotePopup == nullptr) {
|
if (this->emotePopup == nullptr) {
|
||||||
this->emotePopup = new EmotePopup(this->colorScheme, this->emoteManager);
|
this->emotePopup = new EmotePopup(this->colorScheme, this->emoteManager);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
#include "emotemanager.hpp"
|
#include "emotemanager.hpp"
|
||||||
#include "resizingtextedit.hpp"
|
#include "resizingtextedit.hpp"
|
||||||
#include "widgets/basewidget.hpp"
|
#include "widgets/basewidget.hpp"
|
||||||
#include "widgets/chatwidgetheaderbutton.hpp"
|
#include "widgets/rippleeffectlabel.hpp"
|
||||||
#include "widgets/emotepopup.h"
|
#include "widgets/emotepopup.hpp"
|
||||||
|
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
|
@ -46,7 +46,7 @@ private:
|
||||||
QHBoxLayout editContainer;
|
QHBoxLayout editContainer;
|
||||||
ResizingTextEdit textInput;
|
ResizingTextEdit textInput;
|
||||||
QLabel textLengthLabel;
|
QLabel textLengthLabel;
|
||||||
ChatWidgetHeaderButton emotesLabel;
|
RippleEffectLabel emotesLabel;
|
||||||
QStringList prevMsg;
|
QStringList prevMsg;
|
||||||
unsigned int prevIndex = 0;
|
unsigned int prevIndex = 0;
|
||||||
virtual void refreshTheme() override;
|
virtual void refreshTheme() override;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "emotepopup.h"
|
#include "emotepopup.hpp"
|
||||||
|
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
|
|
||||||
|
@ -64,7 +64,9 @@ void EmotePopup::loadChannel(std::shared_ptr<Channel> _channel)
|
||||||
addEmotes(*channel->ffzChannelEmotes.get(), "FrankerFaceZ Channel Emotes",
|
addEmotes(*channel->ffzChannelEmotes.get(), "FrankerFaceZ Channel Emotes",
|
||||||
"FrankerFaceZ Channel Emote");
|
"FrankerFaceZ Channel Emote");
|
||||||
|
|
||||||
view->setChannel(emoteChannel);
|
// addEmotes(this->emoteManager.getEmojis(), "Emojis", "Emoji");
|
||||||
|
|
||||||
|
this->view->setChannel(emoteChannel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "widgets/notebookbutton.hpp"
|
#include "widgets/notebookbutton.hpp"
|
||||||
#include "colorscheme.hpp"
|
#include "colorscheme.hpp"
|
||||||
#include "widgets/fancybutton.hpp"
|
#include "widgets/rippleeffectbutton.hpp"
|
||||||
|
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "fancybutton.hpp"
|
#include "rippleeffectbutton.hpp"
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "qualitypopup.h"
|
#include "qualitypopup.hpp"
|
||||||
|
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "fancybutton.hpp"
|
#include "rippleeffectbutton.hpp"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
|
@ -1,4 +1,4 @@
|
||||||
#include "widgets/chatwidgetheaderbutton.hpp"
|
#include "widgets/rippleeffectlabel.hpp"
|
||||||
#include "colorscheme.hpp"
|
#include "colorscheme.hpp"
|
||||||
#include "widgets/chatwidgetheader.hpp"
|
#include "widgets/chatwidgetheader.hpp"
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
namespace widgets {
|
namespace widgets {
|
||||||
|
|
||||||
ChatWidgetHeaderButton::ChatWidgetHeaderButton(BaseWidget *parent, int spacing)
|
RippleEffectLabel::RippleEffectLabel(BaseWidget *parent, int spacing)
|
||||||
: FancyButton(parent)
|
: FancyButton(parent)
|
||||||
{
|
{
|
||||||
setLayout(&this->ui.hbox);
|
setLayout(&this->ui.hbox);
|
||||||
|
@ -23,12 +23,5 @@ ChatWidgetHeaderButton::ChatWidgetHeaderButton(BaseWidget *parent, int spacing)
|
||||||
this->setMouseEffectColor(QColor(255, 255, 255, 63));
|
this->setMouseEffectColor(QColor(255, 255, 255, 63));
|
||||||
}
|
}
|
||||||
|
|
||||||
// void ChatWidgetHeaderButton::paintEvent(QPaintEvent *)
|
|
||||||
//{
|
|
||||||
// QPainter painter(this);
|
|
||||||
|
|
||||||
// this->fancyPaint(painter);
|
|
||||||
//}
|
|
||||||
|
|
||||||
} // namespace widgets
|
} // namespace widgets
|
||||||
} // namespace chatterino
|
} // namespace chatterino
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "widgets/basewidget.hpp"
|
#include "widgets/basewidget.hpp"
|
||||||
#include "widgets/fancybutton.hpp"
|
#include "widgets/rippleeffectbutton.hpp"
|
||||||
#include "widgets/signallabel.hpp"
|
#include "widgets/signallabel.hpp"
|
||||||
|
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
|
@ -15,21 +15,16 @@ class ColorScheme;
|
||||||
|
|
||||||
namespace widgets {
|
namespace widgets {
|
||||||
|
|
||||||
class ChatWidgetHeader;
|
class RippleEffectLabel : public FancyButton
|
||||||
|
|
||||||
class ChatWidgetHeaderButton : public FancyButton
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ChatWidgetHeaderButton(BaseWidget *parent, int spacing = 6);
|
explicit RippleEffectLabel(BaseWidget *parent, int spacing = 6);
|
||||||
|
|
||||||
SignalLabel &getLabel()
|
SignalLabel &getLabel()
|
||||||
{
|
{
|
||||||
return this->ui.label;
|
return this->ui.label;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
|
||||||
// virtual void paintEvent(QPaintEvent *) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct {
|
struct {
|
||||||
QHBoxLayout hbox;
|
QHBoxLayout hbox;
|
Loading…
Reference in a new issue