Fade the clipped rich-draft preview bottom

This commit is contained in:
John Preston
2026-06-30 12:11:35 +04:00
parent 74075ae38e
commit 2abc55e1d0
2 changed files with 5 additions and 2 deletions
@@ -1266,6 +1266,7 @@ historyComposeField: InputField(defaultInputField) {
}
historyComposeFieldMaxHeight: 224px;
historyRichMessagePreviewHeight: 72px;
historyRichMessagePreviewFadeHeight: 40px;
historyComposeFieldFadeHeight: 6px;
historySendRight: 2px;
historySendPadding: 9px;
@@ -219,7 +219,9 @@ void RichDraftPreview::paint(QRect clip) {
|| _fadePixmap.isNull()) {
return;
}
const auto fadeHeight = std::min(st::historyComposeFieldFadeHeight, height());
const auto fadeHeight = std::min(
st::historyRichMessagePreviewFadeHeight,
height());
if (fadeHeight <= 0) {
return;
}
@@ -311,7 +313,7 @@ void RichDraftPreview::refreshPaletteDependentCaches() {
}
void RichDraftPreview::regenerateFadePixmap() {
const auto height = st::historyComposeFieldFadeHeight;
const auto height = st::historyRichMessagePreviewFadeHeight;
if (height <= 0) {
_fadePixmap = QPixmap();
return;