Added initial implementation of balance in credits settings.

This commit is contained in:
23rd
2024-05-21 05:19:32 +03:00
committed by John Preston
parent d81c3554cc
commit 030d35ea7e
3 changed files with 71 additions and 6 deletions
@@ -24,3 +24,4 @@ creditsTopupPrice: FlatLabel(defaultFlatLabel) {
}
creditsHistoryRightSkip: 10px;
creditsBalanceStarHeight: 20px;
@@ -256,11 +256,8 @@ void TopBar::resizeEvent(QResizeEvent *e) {
const auto progress = (max > min)
? ((e->size().height() - min) / float64(max - min))
: 1.;
_progress.top = 1. -
std::clamp(
(1. - progress) / kBodyAnimationPart,
0.,
1.);
_progress.top = 1.
- std::clamp((1. - progress) / kBodyAnimationPart, 0., 1.);
_progress.body = _progress.top;
_progress.title = 1. - progress;
_progress.scaleTitle = 1. + kTitleAdditionalScale * progress;