2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Replaced multiple static constants for square root of 2 with Qt define.

This commit is contained in:
23rd
2023-01-21 19:35:55 +03:00
parent c8aa97b6b2
commit 6258aa01b8
4 changed files with 5 additions and 10 deletions

View File

@@ -272,8 +272,7 @@ void MainMenu::ToggleAccountsButton::paintEvent(QPaintEvent *e) {
const auto y = 0. + height() - st::mainMenuTogglePosition.y();
const auto size = st::mainMenuToggleSize;
const auto size2 = size / 2.;
const auto sqrt2 = sqrt(2.);
const auto stroke = (st::mainMenuToggleFourStrokes / 4.) / sqrt2;
const auto stroke = (st::mainMenuToggleFourStrokes / 4.) / M_SQRT2;
const auto left = x - size;
const auto right = x + size;
const auto bottom = y + size2;