Run clang-format-all.sh
This commit is contained in:
@@ -76,8 +76,7 @@ void TooltipWidget::updateFont()
|
||||
{
|
||||
auto app = getApp();
|
||||
|
||||
this->setFont(
|
||||
app->fonts->getFont(Fonts::Type::ChatMediumSmall, this->getScale()));
|
||||
this->setFont(app->fonts->getFont(Fonts::Type::ChatMediumSmall, this->getScale()));
|
||||
}
|
||||
|
||||
void TooltipWidget::setText(QString text)
|
||||
|
||||
@@ -364,9 +364,11 @@ UserInfoPopup::TimeoutWidget::TimeoutWidget()
|
||||
}
|
||||
a->setBorderColor(color1);
|
||||
|
||||
QObject::connect(a.getElement(), &RippleEffectLabel2::clicked, [
|
||||
this, timeout = std::get<1>(item)
|
||||
] { this->buttonClicked.invoke(std::make_pair(Action::Timeout, timeout)); });
|
||||
QObject::connect(
|
||||
a.getElement(), &RippleEffectLabel2::clicked,
|
||||
[this, timeout = std::get<1>(item)] {
|
||||
this->buttonClicked.invoke(std::make_pair(Action::Timeout, timeout));
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -375,16 +377,21 @@ 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("days", {
|
||||
{"1", 1 * 60 * 60 * 24}, {"3", 3 * 60 * 60 * 24},
|
||||
{"1", 1 * 60 * 60 * 24},
|
||||
{"3", 3 * 60 * 60 * 24},
|
||||
});
|
||||
addTimeouts("weeks", {
|
||||
{"1", 1 * 60 * 60 * 24 * 7}, {"2", 2 * 60 * 60 * 24 * 7},
|
||||
{"1", 1 * 60 * 60 * 24 * 7},
|
||||
{"2", 2 * 60 * 60 * 24 * 7},
|
||||
});
|
||||
|
||||
addButton(Ban, "ban", getApp()->resources->buttons.ban);
|
||||
|
||||
@@ -238,8 +238,8 @@ void NotebookTab::paintEvent(QPaintEvent *)
|
||||
// || SettingsDialog::getHandle() == QApplication::activeWindow();
|
||||
|
||||
QBrush tabBackground = /*this->mouseOver_ ? colors.backgrounds.hover
|
||||
:*/ (windowFocused ? colors.backgrounds.regular
|
||||
: colors.backgrounds.unfocused);
|
||||
:*/
|
||||
(windowFocused ? colors.backgrounds.regular : colors.backgrounds.unfocused);
|
||||
|
||||
// painter.fillRect(rect(), this->mouseOver_ ? regular.backgrounds.hover
|
||||
// : (windowFocused ? regular.backgrounds.regular
|
||||
|
||||
@@ -93,8 +93,7 @@ void ResizingTextEdit::keyPressEvent(QKeyEvent *event)
|
||||
return;
|
||||
}
|
||||
|
||||
auto *completionModel =
|
||||
static_cast<CompletionModel *>(this->completer->model());
|
||||
auto *completionModel = static_cast<CompletionModel *>(this->completer->model());
|
||||
|
||||
if (!this->completionInProgress) {
|
||||
// First type pressing tab after modifying a message, we refresh our completion model
|
||||
|
||||
@@ -252,8 +252,7 @@ QLayout *AppearancePage::createUiScaleSlider()
|
||||
|
||||
slider->setMinimum(WindowManager::uiScaleMin);
|
||||
slider->setMaximum(WindowManager::uiScaleMax);
|
||||
slider->setValue(
|
||||
WindowManager::clampUiScale(getApp()->settings->uiScale.getValue()));
|
||||
slider->setValue(WindowManager::clampUiScale(getApp()->settings->uiScale.getValue()));
|
||||
|
||||
label->setMinimumWidth(100);
|
||||
|
||||
@@ -261,9 +260,7 @@ QLayout *AppearancePage::createUiScaleSlider()
|
||||
[](auto value) { getApp()->settings->uiScale.setValue(value); });
|
||||
|
||||
getApp()->settings->uiScale.connect(
|
||||
[label](auto, auto) {
|
||||
label->setText(QString::number(WindowManager::getUiScaleValue()));
|
||||
},
|
||||
[label](auto, auto) { label->setText(QString::number(WindowManager::getUiScaleValue())); },
|
||||
this->connections_);
|
||||
|
||||
return layout;
|
||||
|
||||
@@ -581,8 +581,7 @@ void SplitContainer::decodeNodeRecusively(QJsonObject &obj, Node *node)
|
||||
auto _type = _obj.value("type");
|
||||
if (_type == "split") {
|
||||
auto *split = new Split(this);
|
||||
split->setChannel(
|
||||
WindowManager::decodeChannel(_obj.value("data").toObject()));
|
||||
split->setChannel(WindowManager::decodeChannel(_obj.value("data").toObject()));
|
||||
|
||||
Node *_node = new Node();
|
||||
_node->parent = node;
|
||||
@@ -605,8 +604,7 @@ void SplitContainer::decodeNodeRecusively(QJsonObject &obj, Node *node)
|
||||
for (int i = 0; i < 2; i++) {
|
||||
if (node->getChildren().size() < 2) {
|
||||
auto *split = new Split(this);
|
||||
split->setChannel(
|
||||
WindowManager::decodeChannel(obj.value("data").toObject()));
|
||||
split->setChannel(WindowManager::decodeChannel(obj.value("data").toObject()));
|
||||
|
||||
this->insertSplit(split, direction, node);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user