mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-01 15:05:56 +00:00
Beta version 4.2.1: Fix build with GCC.
This commit is contained in:
@@ -1295,7 +1295,6 @@ void Message::paintText(
|
|||||||
if (!hasVisibleText()) {
|
if (!hasVisibleText()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto item = message();
|
|
||||||
const auto stm = context.messageStyle();
|
const auto stm = context.messageStyle();
|
||||||
p.setPen(stm->historyTextFg);
|
p.setPen(stm->historyTextFg);
|
||||||
p.setFont(st::msgFont);
|
p.setFont(st::msgFont);
|
||||||
@@ -2001,9 +2000,7 @@ void Message::updatePressed(QPoint point) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TextForMimeData Message::selectedText(TextSelection selection) const {
|
TextForMimeData Message::selectedText(TextSelection selection) const {
|
||||||
const auto item = message();
|
|
||||||
const auto media = this->media();
|
const auto media = this->media();
|
||||||
|
|
||||||
auto logEntryOriginalResult = TextForMimeData();
|
auto logEntryOriginalResult = TextForMimeData();
|
||||||
auto textResult = text().toTextForMimeData(selection);
|
auto textResult = text().toTextForMimeData(selection);
|
||||||
auto skipped = skipTextSelection(selection);
|
auto skipped = skipTextSelection(selection);
|
||||||
@@ -2034,7 +2031,6 @@ TextForMimeData Message::selectedText(TextSelection selection) const {
|
|||||||
TextSelection Message::adjustSelection(
|
TextSelection Message::adjustSelection(
|
||||||
TextSelection selection,
|
TextSelection selection,
|
||||||
TextSelectType type) const {
|
TextSelectType type) const {
|
||||||
const auto item = message();
|
|
||||||
const auto media = this->media();
|
const auto media = this->media();
|
||||||
|
|
||||||
auto result = text().adjustSelection(selection, type);
|
auto result = text().adjustSelection(selection, type);
|
||||||
|
@@ -417,9 +417,6 @@ QSize Service::performCountCurrentSize(int newWidth) {
|
|||||||
return { newWidth, newHeight };
|
return { newWidth, newHeight };
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto item = message();
|
|
||||||
const auto media = this->media();
|
|
||||||
|
|
||||||
if (!text().isEmpty()) {
|
if (!text().isEmpty()) {
|
||||||
auto contentWidth = newWidth;
|
auto contentWidth = newWidth;
|
||||||
if (delegate()->elementIsChatWide()) {
|
if (delegate()->elementIsChatWide()) {
|
||||||
@@ -435,7 +432,7 @@ QSize Service::performCountCurrentSize(int newWidth) {
|
|||||||
? minHeight()
|
? minHeight()
|
||||||
: textHeightFor(nwidth);
|
: textHeightFor(nwidth);
|
||||||
newHeight += st::msgServicePadding.top() + st::msgServicePadding.bottom() + st::msgServiceMargin.top() + st::msgServiceMargin.bottom();
|
newHeight += st::msgServicePadding.top() + st::msgServicePadding.bottom() + st::msgServiceMargin.top() + st::msgServiceMargin.bottom();
|
||||||
if (media) {
|
if (const auto media = this->media()) {
|
||||||
newHeight += st::msgServiceMargin.top() + media->resizeGetHeight(media->maxWidth());
|
newHeight += st::msgServiceMargin.top() + media->resizeGetHeight(media->maxWidth());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -444,13 +441,11 @@ QSize Service::performCountCurrentSize(int newWidth) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QSize Service::performCountOptimalSize() {
|
QSize Service::performCountOptimalSize() {
|
||||||
const auto item = message();
|
|
||||||
const auto media = this->media();
|
|
||||||
validateText();
|
validateText();
|
||||||
|
|
||||||
auto maxWidth = text().maxWidth() + st::msgServicePadding.left() + st::msgServicePadding.right();
|
auto maxWidth = text().maxWidth() + st::msgServicePadding.left() + st::msgServicePadding.right();
|
||||||
auto minHeight = text().minHeight();
|
auto minHeight = text().minHeight();
|
||||||
if (media) {
|
if (const auto media = this->media()) {
|
||||||
media->initDimensions();
|
media->initDimensions();
|
||||||
}
|
}
|
||||||
return { maxWidth, minHeight };
|
return { maxWidth, minHeight };
|
||||||
@@ -469,7 +464,6 @@ int Service::marginBottom() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Service::draw(Painter &p, const PaintContext &context) const {
|
void Service::draw(Painter &p, const PaintContext &context) const {
|
||||||
const auto item = message();
|
|
||||||
auto g = countGeometry();
|
auto g = countGeometry();
|
||||||
if (g.width() < 1) {
|
if (g.width() < 1) {
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user