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/widgets/chatwidget.cpp \
|
||||
src/widgets/chatwidgetheader.cpp \
|
||||
src/widgets/chatwidgetheaderbutton.cpp \
|
||||
src/widgets/chatwidgetinput.cpp \
|
||||
src/widgets/mainwindow.cpp \
|
||||
src/widgets/notebook.cpp \
|
||||
|
@ -84,7 +83,6 @@ SOURCES += \
|
|||
src/messages/messagebuilder.cpp \
|
||||
src/twitch/twitchmessagebuilder.cpp \
|
||||
src/twitch/twitchparsemessage.cpp \
|
||||
src/widgets/fancybutton.cpp \
|
||||
src/widgets/titlebar.cpp \
|
||||
src/appdatapath.cpp \
|
||||
src/accountmanager.cpp \
|
||||
|
@ -98,7 +96,9 @@ SOURCES += \
|
|||
src/widgets/qualitypopup.cpp \
|
||||
src/widgets/emotepopup.cpp \
|
||||
src/widgets/channelview.cpp \
|
||||
src/twitch/twitchchannel.cpp
|
||||
src/twitch/twitchchannel.cpp \
|
||||
src/widgets/rippleeffectlabel.cpp \
|
||||
src/widgets/rippleeffectbutton.cpp
|
||||
|
||||
HEADERS += \
|
||||
src/asyncexec.hpp \
|
||||
|
@ -117,7 +117,6 @@ HEADERS += \
|
|||
src/twitch/emotevalue.hpp \
|
||||
src/widgets/chatwidget.hpp \
|
||||
src/widgets/chatwidgetheader.hpp \
|
||||
src/widgets/chatwidgetheaderbutton.hpp \
|
||||
src/widgets/chatwidgetinput.hpp \
|
||||
src/widgets/mainwindow.hpp \
|
||||
src/widgets/notebook.hpp \
|
||||
|
@ -148,7 +147,6 @@ HEADERS += \
|
|||
src/messages/messagebuilder.hpp \
|
||||
src/twitch/twitchmessagebuilder.hpp \
|
||||
src/twitch/twitchparsemessage.hpp \
|
||||
src/widgets/fancybutton.hpp \
|
||||
src/widgets/titlebar.hpp \
|
||||
src/appdatapath.hpp \
|
||||
src/accountmanager.hpp \
|
||||
|
@ -158,10 +156,12 @@ HEADERS += \
|
|||
src/util/distancebetweenpoints.hpp \
|
||||
src/widgets/basewidget.hpp \
|
||||
src/completionmanager.hpp \
|
||||
src/widgets/qualitypopup.h \
|
||||
src/widgets/emotepopup.h \
|
||||
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 =
|
||||
|
||||
|
|
|
@ -151,6 +151,11 @@ EmoteMap &EmoteManager::getBTTVChannelEmoteFromCaches()
|
|||
return _bttvChannelEmoteFromCaches;
|
||||
}
|
||||
|
||||
EmoteMap &EmoteManager::getEmojis()
|
||||
{
|
||||
return this->emojis;
|
||||
}
|
||||
|
||||
ConcurrentMap<int, EmoteData> &EmoteManager::getFFZChannelEmoteFromCaches()
|
||||
{
|
||||
return _ffzChannelEmoteFromCaches;
|
||||
|
@ -208,7 +213,15 @@ void EmoteManager::loadEmojis()
|
|||
|
||||
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 &getChatterinoEmotes();
|
||||
EmoteMap &getBTTVChannelEmoteFromCaches();
|
||||
EmoteMap &getEmojis();
|
||||
ConcurrentMap<int, EmoteData> &getFFZChannelEmoteFromCaches();
|
||||
ConcurrentMap<long, EmoteData> &getTwitchEmoteFromCache();
|
||||
|
||||
|
@ -86,6 +87,7 @@ private:
|
|||
|
||||
// url Emoji-one image
|
||||
EmoteMap emojiCache;
|
||||
EmoteMap emojis;
|
||||
|
||||
void loadEmojis();
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "notebookpage.hpp"
|
||||
#include "settingsmanager.hpp"
|
||||
#include "util/urlfetch.hpp"
|
||||
#include "widgets/qualitypopup.h"
|
||||
#include "widgets/qualitypopup.hpp"
|
||||
#include "widgets/textinputdialog.hpp"
|
||||
|
||||
#include <QApplication>
|
||||
|
|
|
@ -37,7 +37,7 @@ ChatWidgetHeader::ChatWidgetHeader(ChatWidget *_chatWidget)
|
|||
this->leftLabel.getLabel().setTextFormat(Qt::RichText);
|
||||
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);
|
||||
|
||||
this->leftMenu.addAction("Add new split", this->chatWidget, &ChatWidget::doAddSplit,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "signallabel.hpp"
|
||||
#include "widgets/basewidget.hpp"
|
||||
#include "widgets/chatwidgetheaderbutton.hpp"
|
||||
#include "widgets/rippleeffectlabel.hpp"
|
||||
|
||||
#include <QAction>
|
||||
#include <QHBoxLayout>
|
||||
|
@ -46,14 +46,14 @@ private:
|
|||
QHBoxLayout hbox;
|
||||
|
||||
// top left
|
||||
ChatWidgetHeaderButton leftLabel;
|
||||
RippleEffectLabel leftLabel;
|
||||
QMenu leftMenu;
|
||||
|
||||
// center
|
||||
SignalLabel channelNameLabel;
|
||||
|
||||
// top right
|
||||
ChatWidgetHeaderButton rightLabel;
|
||||
RippleEffectLabel rightLabel;
|
||||
QMenu rightMenu;
|
||||
|
||||
void leftButtonClicked();
|
||||
|
|
|
@ -45,7 +45,7 @@ ChatWidgetInput::ChatWidgetInput(ChatWidget *_chatWidget, EmoteManager &emoteMan
|
|||
"<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) {
|
||||
this->emotePopup = new EmotePopup(this->colorScheme, this->emoteManager);
|
||||
}
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
#include "emotemanager.hpp"
|
||||
#include "resizingtextedit.hpp"
|
||||
#include "widgets/basewidget.hpp"
|
||||
#include "widgets/chatwidgetheaderbutton.hpp"
|
||||
#include "widgets/emotepopup.h"
|
||||
#include "widgets/rippleeffectlabel.hpp"
|
||||
#include "widgets/emotepopup.hpp"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
|
@ -46,7 +46,7 @@ private:
|
|||
QHBoxLayout editContainer;
|
||||
ResizingTextEdit textInput;
|
||||
QLabel textLengthLabel;
|
||||
ChatWidgetHeaderButton emotesLabel;
|
||||
RippleEffectLabel emotesLabel;
|
||||
QStringList prevMsg;
|
||||
unsigned int prevIndex = 0;
|
||||
virtual void refreshTheme() override;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "emotepopup.h"
|
||||
#include "emotepopup.hpp"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
|
||||
|
@ -64,7 +64,9 @@ void EmotePopup::loadChannel(std::shared_ptr<Channel> _channel)
|
|||
addEmotes(*channel->ffzChannelEmotes.get(), "FrankerFaceZ Channel Emotes",
|
||||
"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 "colorscheme.hpp"
|
||||
#include "widgets/fancybutton.hpp"
|
||||
#include "widgets/rippleeffectbutton.hpp"
|
||||
|
||||
#include <QMouseEvent>
|
||||
#include <QPainter>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "fancybutton.hpp"
|
||||
#include "rippleeffectbutton.hpp"
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "qualitypopup.h"
|
||||
#include "qualitypopup.hpp"
|
||||
|
||||
#include <QProcess>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "fancybutton.hpp"
|
||||
#include "rippleeffectbutton.hpp"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QPainter>
|
|
@ -1,4 +1,4 @@
|
|||
#include "widgets/chatwidgetheaderbutton.hpp"
|
||||
#include "widgets/rippleeffectlabel.hpp"
|
||||
#include "colorscheme.hpp"
|
||||
#include "widgets/chatwidgetheader.hpp"
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
|||
namespace chatterino {
|
||||
namespace widgets {
|
||||
|
||||
ChatWidgetHeaderButton::ChatWidgetHeaderButton(BaseWidget *parent, int spacing)
|
||||
RippleEffectLabel::RippleEffectLabel(BaseWidget *parent, int spacing)
|
||||
: FancyButton(parent)
|
||||
{
|
||||
setLayout(&this->ui.hbox);
|
||||
|
@ -23,12 +23,5 @@ ChatWidgetHeaderButton::ChatWidgetHeaderButton(BaseWidget *parent, int spacing)
|
|||
this->setMouseEffectColor(QColor(255, 255, 255, 63));
|
||||
}
|
||||
|
||||
// void ChatWidgetHeaderButton::paintEvent(QPaintEvent *)
|
||||
//{
|
||||
// QPainter painter(this);
|
||||
|
||||
// this->fancyPaint(painter);
|
||||
//}
|
||||
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "widgets/basewidget.hpp"
|
||||
#include "widgets/fancybutton.hpp"
|
||||
#include "widgets/rippleeffectbutton.hpp"
|
||||
#include "widgets/signallabel.hpp"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
|
@ -15,21 +15,16 @@ class ColorScheme;
|
|||
|
||||
namespace widgets {
|
||||
|
||||
class ChatWidgetHeader;
|
||||
|
||||
class ChatWidgetHeaderButton : public FancyButton
|
||||
class RippleEffectLabel : public FancyButton
|
||||
{
|
||||
public:
|
||||
explicit ChatWidgetHeaderButton(BaseWidget *parent, int spacing = 6);
|
||||
explicit RippleEffectLabel(BaseWidget *parent, int spacing = 6);
|
||||
|
||||
SignalLabel &getLabel()
|
||||
{
|
||||
return this->ui.label;
|
||||
}
|
||||
|
||||
protected:
|
||||
// virtual void paintEvent(QPaintEvent *) override;
|
||||
|
||||
private:
|
||||
struct {
|
||||
QHBoxLayout hbox;
|
Loading…
Reference in a new issue