mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-06 20:03:12 +00:00
Fade the clipped rich-draft preview bottom
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user