mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Added first state to snowflakes effect in main menu.
This commit is contained in:
@@ -492,6 +492,10 @@ MainMenu::MainMenu(
|
||||
const auto snow = snowLifetime->make_state<Ui::Snowflakes>(
|
||||
[=](const QRect &r) { snowRaw->update(r); });
|
||||
snow->setBrush(QColor(230, 230, 230));
|
||||
_showFinished.value(
|
||||
) | rpl::start_with_next([=](bool shown) {
|
||||
snow->setPaused(!shown);
|
||||
}, snowRaw->lifetime());
|
||||
snowRaw->paintRequest(
|
||||
) | rpl::start_with_next([=](const QRect &r) {
|
||||
auto p = Painter(snowRaw);
|
||||
@@ -694,6 +698,10 @@ void MainMenu::parentResized() {
|
||||
resize(st::mainMenuWidth, parentWidget()->height());
|
||||
}
|
||||
|
||||
void MainMenu::showFinished() {
|
||||
_showFinished = true;
|
||||
}
|
||||
|
||||
void MainMenu::setupMenu() {
|
||||
using namespace Settings;
|
||||
|
||||
|
Reference in New Issue
Block a user