do a full reformat according to our current .clang-format
This commit is contained in:
@@ -6,11 +6,11 @@
|
||||
#include "singletons/Theme.hpp"
|
||||
#include "singletons/WindowManager.hpp"
|
||||
#include "util/InitUpdateButton.hpp"
|
||||
#include "util/Shortcut.hpp"
|
||||
#include "widgets/Window.hpp"
|
||||
#include "widgets/dialogs/SettingsDialog.hpp"
|
||||
#include "widgets/helper/NotebookButton.hpp"
|
||||
#include "widgets/helper/NotebookTab.hpp"
|
||||
#include "util/Shortcut.hpp"
|
||||
#include "widgets/splits/Split.hpp"
|
||||
#include "widgets/splits/SplitContainer.hpp"
|
||||
|
||||
|
||||
@@ -128,8 +128,8 @@ UserInfoPopup::UserInfoPopup()
|
||||
this->userName_, Qt::CaseInsensitive) == 0;
|
||||
|
||||
visibilityMod = twitchChannel->isBroadcaster() && !isMyself;
|
||||
visibilityUnmod = visibilityMod ||
|
||||
(twitchChannel->isMod() && isMyself);
|
||||
visibilityUnmod =
|
||||
visibilityMod || (twitchChannel->isMod() && isMyself);
|
||||
}
|
||||
mod->setVisible(visibilityMod);
|
||||
unmod->setVisible(visibilityUnmod);
|
||||
@@ -147,8 +147,8 @@ UserInfoPopup::UserInfoPopup()
|
||||
TwitchChannel *twitchChannel =
|
||||
dynamic_cast<TwitchChannel *>(this->channel_.get());
|
||||
|
||||
bool hasModRights = twitchChannel ? twitchChannel->hasModRights()
|
||||
: false;
|
||||
bool hasModRights =
|
||||
twitchChannel ? twitchChannel->hasModRights() : false;
|
||||
lineMod->setVisible(hasModRights);
|
||||
timeout->setVisible(hasModRights);
|
||||
});
|
||||
|
||||
@@ -27,7 +27,8 @@ void SearchPopup::setChannel(ChannelPtr channel)
|
||||
|
||||
void SearchPopup::keyPressEvent(QKeyEvent *e)
|
||||
{
|
||||
if (e->key() == Qt::Key_Escape) {
|
||||
if (e->key() == Qt::Key_Escape)
|
||||
{
|
||||
this->close();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -258,7 +258,8 @@ void GeneralPage::initLayout(SettingsLayout &layout)
|
||||
layout.addCheckbox("Lowercase domains", s.lowercaseDomains);
|
||||
layout.addCheckbox("Bold @usernames", s.boldUsernames);
|
||||
layout.addDropdown<float>(
|
||||
"Username font weight", {"0", "25", "Default", "75", "100"}, s.boldScale,
|
||||
"Username font weight", {"0", "25", "Default", "75", "100"},
|
||||
s.boldScale,
|
||||
[](auto val) {
|
||||
if (val == 50)
|
||||
return QString("Default");
|
||||
|
||||
@@ -43,7 +43,8 @@ KeyboardSettingsPage::KeyboardSettingsPage()
|
||||
new QLabel("Search in current channel"));
|
||||
form->addRow(new QLabel("Ctrl + E"), new QLabel("Open Emote menu"));
|
||||
form->addRow(new QLabel("Ctrl + P"), new QLabel("Open Settings menu"));
|
||||
form->addRow(new QLabel("F5"), new QLabel("Reload subscriber and channel emotes"));
|
||||
form->addRow(new QLabel("F5"),
|
||||
new QLabel("Reload subscriber and channel emotes"));
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
@@ -62,8 +62,8 @@ QString formatSize(qint64 size)
|
||||
QString fetchLogDirectorySize()
|
||||
{
|
||||
QString logPathDirectory = getSettings()->logPath.getValue().isEmpty()
|
||||
? getPaths()->messageLogDirectory
|
||||
: getSettings()->logPath;
|
||||
? getPaths()->messageLogDirectory
|
||||
: getSettings()->logPath;
|
||||
|
||||
qint64 logsSize = dirSize(logPathDirectory);
|
||||
QString logsSizeLabel = "Your logs currently take up ";
|
||||
@@ -91,20 +91,19 @@ ModerationPage::ModerationPage()
|
||||
QtConcurrent::run([] { return fetchLogDirectorySize(); }));
|
||||
|
||||
// Logs (copied from LoggingMananger)
|
||||
getSettings()->logPath.connect(
|
||||
[logsPathLabel](const QString &logPath, auto) mutable {
|
||||
QString pathOriginal = logPath.isEmpty()
|
||||
? getPaths()->messageLogDirectory
|
||||
: logPath;
|
||||
getSettings()->logPath.connect([logsPathLabel](const QString &logPath,
|
||||
auto) mutable {
|
||||
QString pathOriginal =
|
||||
logPath.isEmpty() ? getPaths()->messageLogDirectory : logPath;
|
||||
|
||||
QString pathShortened =
|
||||
"Logs are saved at <a href=\"file:///" + pathOriginal +
|
||||
"\"><span style=\"color: white;\">" +
|
||||
shortenString(pathOriginal, 50) + "</span></a>";
|
||||
QString pathShortened =
|
||||
"Logs are saved at <a href=\"file:///" + pathOriginal +
|
||||
"\"><span style=\"color: white;\">" +
|
||||
shortenString(pathOriginal, 50) + "</span></a>";
|
||||
|
||||
logsPathLabel->setText(pathShortened);
|
||||
logsPathLabel->setToolTip(pathOriginal);
|
||||
});
|
||||
logsPathLabel->setText(pathShortened);
|
||||
logsPathLabel->setToolTip(pathOriginal);
|
||||
});
|
||||
|
||||
logsPathLabel->setTextFormat(Qt::RichText);
|
||||
logsPathLabel->setTextInteractionFlags(Qt::TextBrowserInteraction |
|
||||
|
||||
Reference in New Issue
Block a user