mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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_max(maxWidth, tleft + named->name.maxWidth() + tright);
|
||||||
accumulate_min(maxWidth, st::msgMaxWidth);
|
accumulate_min(maxWidth, st::msgMaxWidth);
|
||||||
}
|
}
|
||||||
if (voice && voice->transcribe) {
|
if (voice) {
|
||||||
maxWidth += st::historyTranscribeSkip
|
const auto maxWaveformWidth = ::Media::Player::kWaveformSamplesCount *
|
||||||
+ voice->transcribe->size().width();
|
(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();
|
auto minHeight = st.padding.top() + st.thumbSize + st.padding.bottom();
|
||||||
|
|
Loading…
Add table
Reference in a new issue