mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-13 04:37:11 +02:00
Improved width of voice waveform.
This commit is contained in:
parent
fae9649773
commit
9f73242cc5
1 changed files with 13 additions and 3 deletions
|
@ -503,9 +503,19 @@ QSize Document::countOptimalSize() {
|
|||
accumulate_max(maxWidth, tleft + named->name.maxWidth() + tright);
|
||||
accumulate_min(maxWidth, st::msgMaxWidth);
|
||||
}
|
||||
if (voice && voice->transcribe) {
|
||||
maxWidth += st::historyTranscribeSkip
|
||||
+ voice->transcribe->size().width();
|
||||
if (voice) {
|
||||
const auto maxWaveformWidth = ::Media::Player::kWaveformSamplesCount *
|
||||
(st::msgWaveformBar + st::msgWaveformSkip);
|
||||
const auto transcribeWidth = voice->transcribe
|
||||
? (voice->transcribe->size().width() + st::historyTranscribeSkip)
|
||||
: 0;
|
||||
accumulate_max(
|
||||
maxWidth,
|
||||
maxWaveformWidth
|
||||
+ rect::m::sum::h(st.padding)
|
||||
+ st.thumbSize
|
||||
+ st.thumbSkip
|
||||
+ transcribeWidth);
|
||||
}
|
||||
|
||||
auto minHeight = st.padding.top() + st.thumbSize + st.padding.bottom();
|
||||
|
|
Loading…
Add table
Reference in a new issue