mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
removed SplitColumn
This commit is contained in:
parent
c74bc00106
commit
6ee1fc303e
5 changed files with 31 additions and 63 deletions
|
@ -210,7 +210,6 @@ SOURCES += \
|
|||
src/widgets/settingspages/SettingsPage.cpp \
|
||||
src/widgets/settingspages/SpecialChannelsPage.cpp \
|
||||
src/widgets/splits/Split.cpp \
|
||||
src/widgets/splits/SplitColumn.cpp \
|
||||
src/widgets/splits/SplitContainer.cpp \
|
||||
src/widgets/splits/SplitHeader.cpp \
|
||||
src/widgets/splits/SplitInput.cpp \
|
||||
|
@ -380,7 +379,6 @@ HEADERS += \
|
|||
src/widgets/settingspages/SettingsPage.hpp \
|
||||
src/widgets/settingspages/SpecialChannelsPage.hpp \
|
||||
src/widgets/splits/Split.hpp \
|
||||
src/widgets/splits/SplitColumn.hpp \
|
||||
src/widgets/splits/SplitContainer.hpp \
|
||||
src/widgets/splits/SplitHeader.hpp \
|
||||
src/widgets/splits/SplitInput.hpp \
|
||||
|
|
|
@ -193,7 +193,7 @@ void TwitchEmotes::refresh(const std::shared_ptr<TwitchAccount> &user)
|
|||
emoteData.filled = true;
|
||||
};
|
||||
|
||||
getAuthorized(url, clientID, oauthToken, QThread::currentThread(), loadEmotes);
|
||||
twitchApiGetAuthorized(url, clientID, oauthToken, QThread::currentThread(), loadEmotes);
|
||||
}
|
||||
|
||||
void TwitchEmotes::loadSetData(std::shared_ptr<TwitchEmotes::EmoteSet> emoteSet)
|
||||
|
|
|
@ -352,45 +352,45 @@ void ResourceManager::loadChannelData(const QString &roomID, bool bypassCache)
|
|||
|
||||
QString cheermoteURL = "https://api.twitch.tv/kraken/bits/actions?channel_id=" + roomID;
|
||||
|
||||
get2(cheermoteURL, QThread::currentThread(), true,
|
||||
[this, roomID](const rapidjson::Document &d) {
|
||||
ResourceManager::Channel &ch = this->channels[roomID];
|
||||
twitchApiGet2(
|
||||
cheermoteURL, QThread::currentThread(), true, [this, roomID](const rapidjson::Document &d) {
|
||||
ResourceManager::Channel &ch = this->channels[roomID];
|
||||
|
||||
ParseCheermoteSets(ch.jsonCheermoteSets, d);
|
||||
ParseCheermoteSets(ch.jsonCheermoteSets, d);
|
||||
|
||||
for (auto &set : ch.jsonCheermoteSets) {
|
||||
CheermoteSet cheermoteSet;
|
||||
cheermoteSet.regex =
|
||||
QRegularExpression("^" + set.prefix.toLower() + "([1-9][0-9]*)$");
|
||||
for (auto &set : ch.jsonCheermoteSets) {
|
||||
CheermoteSet cheermoteSet;
|
||||
cheermoteSet.regex =
|
||||
QRegularExpression("^" + set.prefix.toLower() + "([1-9][0-9]*)$");
|
||||
|
||||
for (auto &tier : set.tiers) {
|
||||
Cheermote cheermote;
|
||||
for (auto &tier : set.tiers) {
|
||||
Cheermote cheermote;
|
||||
|
||||
cheermote.color = QColor(tier.color);
|
||||
cheermote.minBits = tier.minBits;
|
||||
cheermote.color = QColor(tier.color);
|
||||
cheermote.minBits = tier.minBits;
|
||||
|
||||
// TODO(pajlada): We currently hardcode dark here :|
|
||||
// We will continue to do so for now since we haven't had to
|
||||
// solve that anywhere else
|
||||
cheermote.emoteDataAnimated.image1x = tier.images["dark"]["animated"]["1"];
|
||||
cheermote.emoteDataAnimated.image2x = tier.images["dark"]["animated"]["2"];
|
||||
cheermote.emoteDataAnimated.image3x = tier.images["dark"]["animated"]["4"];
|
||||
// TODO(pajlada): We currently hardcode dark here :|
|
||||
// We will continue to do so for now since we haven't had to
|
||||
// solve that anywhere else
|
||||
cheermote.emoteDataAnimated.image1x = tier.images["dark"]["animated"]["1"];
|
||||
cheermote.emoteDataAnimated.image2x = tier.images["dark"]["animated"]["2"];
|
||||
cheermote.emoteDataAnimated.image3x = tier.images["dark"]["animated"]["4"];
|
||||
|
||||
cheermote.emoteDataStatic.image1x = tier.images["dark"]["static"]["1"];
|
||||
cheermote.emoteDataStatic.image2x = tier.images["dark"]["static"]["2"];
|
||||
cheermote.emoteDataStatic.image3x = tier.images["dark"]["static"]["4"];
|
||||
cheermote.emoteDataStatic.image1x = tier.images["dark"]["static"]["1"];
|
||||
cheermote.emoteDataStatic.image2x = tier.images["dark"]["static"]["2"];
|
||||
cheermote.emoteDataStatic.image3x = tier.images["dark"]["static"]["4"];
|
||||
|
||||
cheermoteSet.cheermotes.emplace_back(cheermote);
|
||||
}
|
||||
cheermoteSet.cheermotes.emplace_back(cheermote);
|
||||
}
|
||||
|
||||
std::sort(cheermoteSet.cheermotes.begin(), cheermoteSet.cheermotes.end(),
|
||||
[](const auto &lhs, const auto &rhs) {
|
||||
return lhs.minBits < rhs.minBits; //
|
||||
});
|
||||
std::sort(cheermoteSet.cheermotes.begin(), cheermoteSet.cheermotes.end(),
|
||||
[](const auto &lhs, const auto &rhs) {
|
||||
return lhs.minBits < rhs.minBits; //
|
||||
});
|
||||
|
||||
ch.cheermoteSets.emplace_back(cheermoteSet);
|
||||
}
|
||||
});
|
||||
ch.cheermoteSets.emplace_back(cheermoteSet);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void ResourceManager::loadDynamicTwitchBadges()
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
#include "SplitColumn.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
namespace helper {
|
||||
|
||||
} // namespace helper
|
||||
} // namespace chatterino
|
|
@ -1,23 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "widgets/splits/Split.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
class SplitColumn
|
||||
{
|
||||
public:
|
||||
SplitColumn() = default;
|
||||
|
||||
void insert(Split *split, int index = -1);
|
||||
void remove(int index);
|
||||
double getFlex();
|
||||
void setFlex(double flex);
|
||||
|
||||
private:
|
||||
std::vector<Split> items;
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
Loading…
Reference in a new issue