fix: paddings & mark as β

This commit is contained in:
AlexeyZavar 2025-01-16 16:44:44 +03:00
parent fc3f59a053
commit 7dfc27f3c9
9 changed files with 12 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 B

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 B

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 527 B

After

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 B

After

Width:  |  Height:  |  Size: 327 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 417 B

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 492 B

After

Width:  |  Height:  |  Size: 564 B

View file

@ -240,7 +240,7 @@ AyuGramSettings::AyuGramSettings() {
#endif
;
simpleQuotesAndReplies = true;
replaceBottomInfoWithIcons = true;
replaceBottomInfoWithIcons = false;
deletedMark = "🧹";
editedMark = Core::IsAppLaunched() ? tr::lng_edited(tr::now) : QString("edited");
recentStickersCount = 100;

View file

@ -1325,7 +1325,8 @@ void SetupWideMultiplierSlider(not_null<Ui::VerticalLayout*> container,
constexpr auto kMinSize = 1.00;
// const auto kMaxSize = 4.00;
constexpr auto kStep = 0.05;
const auto valueToIndex = [=](double value) {
const auto valueToIndex = [=](double value)
{
return static_cast<int>(std::round((value - kMinSize) / kStep));
};
const auto indexToValue = [=](int index)
@ -1460,7 +1461,10 @@ void SetupMarks(not_null<Ui::VerticalLayout*> container) {
AddButtonWithIcon(
container,
tr::ayu_ReplaceMarksWithIcons(),
tr::ayu_ReplaceMarksWithIcons() | rpl::map([=](QString val)
{
return val + " β";
}),
st::settingsButtonNoIcon
)->toggleOn(
rpl::single(settings->replaceBottomInfoWithIcons)

View file

@ -461,6 +461,9 @@ void BottomInfo::layoutDateText() {
owner->customEmojiManager().registerInternalEmoji(icon, padding)
);
deleted = Ui::Text::Colorized(added, 1);
if (!(_data.flags & Data::Flag::Edited)) {
deleted.append(' ');
}
}
TextWithEntities edited;
@ -472,12 +475,13 @@ void BottomInfo::layoutDateText() {
owner->customEmojiManager().registerInternalEmoji(icon, padding)
);
edited = Ui::Text::Colorized(added, 1);
edited.append(' ');
} else if (_data.flags & Data::Flag::EstimateDate) {
edited = TextWithEntities{ tr::lng_approximate(tr::now) + ' ' };
}
const auto author = _data.author;
const auto prefix = !author.isEmpty() ? u", "_q : QString();
const auto prefix = !author.isEmpty() ? (_data.flags & Data::Flag::Edited ? u" "_q : u", "_q) : QString();
const auto date = TextWithEntities{}.append(edited).append(QLocale().toString(
_data.date.time(),