2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Allow more file attach layout customization.

This commit is contained in:
John Preston
2022-09-30 11:23:32 +04:00
parent b13471672d
commit dd52c53ec0
5 changed files with 28 additions and 23 deletions

View File

@@ -259,7 +259,7 @@ void Generator::addAudioBubble(QVector<int> waveform, int waveactive, QString wa
auto width = st::msgFileMinWidth;
const auto &st = st::msgFileLayout;
auto tleft = st.padding.left() + st.thumbSize + st.padding.right();
auto tleft = st.padding.left() + st.thumbSize + st.thumbSkip;
accumulate_max(width, tleft + st::normalFont->width(wavestatus) + skipBlock.width() + st::msgPadding.right());
accumulate_min(width, st::msgMaxWidth);
@@ -839,8 +839,8 @@ void Generator::paintBubble(const Bubble &bubble) {
bubble.text.draw(*_p, trect.x(), trect.y(), trect.width());
} else if (!bubble.waveform.isEmpty()) {
const auto &st = st::msgFileLayout;
auto nameleft = x + st.padding.left() + st.thumbSize + st.padding.right();
auto nameright = st.padding.left();
auto nameleft = x + st.padding.left() + st.thumbSize + st.thumbSkip;
auto nameright = st.padding.right();
auto statustop = y + st.statusTop;
auto inner = style::rtlrect(x + st.padding.left(), y + st.padding.top(), st.thumbSize, st.thumbSize, _rect.width());