mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 15:13:57 +02:00
Fixed QPainter warnings in line from premium limits boxes.
This commit is contained in:
parent
287fae858e
commit
44f0f81d5d
1 changed files with 12 additions and 7 deletions
|
@ -474,6 +474,9 @@ Line::Line(
|
||||||
|
|
||||||
sizeValue(
|
sizeValue(
|
||||||
) | rpl::start_with_next([=](const QSize &s) {
|
) | rpl::start_with_next([=](const QSize &s) {
|
||||||
|
if (s.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
_leftWidth = (s.width() / 2);
|
_leftWidth = (s.width() / 2);
|
||||||
_rightWidth = (s.width() - _leftWidth);
|
_rightWidth = (s.width() - _leftWidth);
|
||||||
recache(s);
|
recache(s);
|
||||||
|
@ -620,12 +623,6 @@ void AddAccountsRow(
|
||||||
const auto state = container->lifetime().make_state<State>();
|
const auto state = container->lifetime().make_state<State>();
|
||||||
const auto group = args.group;
|
const auto group = args.group;
|
||||||
|
|
||||||
group->setChangedCallback([=](int value) {
|
|
||||||
for (auto i = 0; i < state->accounts.size(); i++) {
|
|
||||||
state->accounts[i].checkbox.setChecked(i == value);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const auto imageRadius = args.st.imageRadius;
|
const auto imageRadius = args.st.imageRadius;
|
||||||
const auto checkSelectWidth = args.st.selectWidth;
|
const auto checkSelectWidth = args.st.selectWidth;
|
||||||
const auto nameFg = args.stNameFg;
|
const auto nameFg = args.stNameFg;
|
||||||
|
@ -675,7 +672,9 @@ void AddAccountsRow(
|
||||||
.name = std::move(name),
|
.name = std::move(name),
|
||||||
});
|
});
|
||||||
const auto index = int(state->accounts.size()) - 1;
|
const auto index = int(state->accounts.size()) - 1;
|
||||||
state->accounts[index].checkbox.setChecked(index == group->value());
|
state->accounts[index].checkbox.setChecked(
|
||||||
|
index == group->value(),
|
||||||
|
anim::type::instant);
|
||||||
|
|
||||||
widget->paintRequest(
|
widget->paintRequest(
|
||||||
) | rpl::start_with_next([=] {
|
) | rpl::start_with_next([=] {
|
||||||
|
@ -733,6 +732,12 @@ void AddAccountsRow(
|
||||||
photoWidth)));
|
photoWidth)));
|
||||||
}
|
}
|
||||||
}, container->lifetime());
|
}, container->lifetime());
|
||||||
|
|
||||||
|
group->setChangedCallback([=](int value) {
|
||||||
|
for (auto i = 0; i < state->accounts.size(); i++) {
|
||||||
|
state->accounts[i].checkbox.setChecked(i == value);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QGradientStops LimitGradientStops() {
|
QGradientStops LimitGradientStops() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue