mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 07:33:52 +02:00
Fixed skip blocks for web pages and games.
This commit is contained in:
parent
d349759618
commit
7aa3956792
2 changed files with 9 additions and 9 deletions
|
@ -74,15 +74,15 @@ QSize Game::countOptimalSize() {
|
||||||
auto marked = TextWithEntities { text };
|
auto marked = TextWithEntities { text };
|
||||||
auto parseFlags = TextParseLinks | TextParseMultiline;
|
auto parseFlags = TextParseLinks | TextParseMultiline;
|
||||||
TextUtilities::ParseEntities(marked, parseFlags);
|
TextUtilities::ParseEntities(marked, parseFlags);
|
||||||
|
_description.setMarkedText(
|
||||||
|
st::webPageDescriptionStyle,
|
||||||
|
marked,
|
||||||
|
Ui::WebpageTextDescriptionOptions());
|
||||||
if (!_attach) {
|
if (!_attach) {
|
||||||
_description.updateSkipBlock(
|
_description.updateSkipBlock(
|
||||||
_parent->skipBlockWidth(),
|
_parent->skipBlockWidth(),
|
||||||
_parent->skipBlockHeight());
|
_parent->skipBlockHeight());
|
||||||
}
|
}
|
||||||
_description.setMarkedText(
|
|
||||||
st::webPageDescriptionStyle,
|
|
||||||
marked,
|
|
||||||
Ui::WebpageTextDescriptionOptions());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_title.isEmpty() && !title.isEmpty()) {
|
if (_title.isEmpty() && !title.isEmpty()) {
|
||||||
|
|
|
@ -201,11 +201,6 @@ QSize WebPage::countOptimalSize() {
|
||||||
if (_description.isEmpty() && !_data->description.text.isEmpty()) {
|
if (_description.isEmpty() && !_data->description.text.isEmpty()) {
|
||||||
auto text = _data->description;
|
auto text = _data->description;
|
||||||
|
|
||||||
if (textFloatsAroundInfo) {
|
|
||||||
_description.updateSkipBlock(
|
|
||||||
_parent->skipBlockWidth(),
|
|
||||||
_parent->skipBlockHeight());
|
|
||||||
}
|
|
||||||
if (isLogEntryOriginal()) {
|
if (isLogEntryOriginal()) {
|
||||||
// Fix layout for small bubbles (narrow media caption edit log entries).
|
// Fix layout for small bubbles (narrow media caption edit log entries).
|
||||||
_description = Ui::Text::String(st::minPhotoSize
|
_description = Ui::Text::String(st::minPhotoSize
|
||||||
|
@ -225,6 +220,11 @@ QSize WebPage::countOptimalSize() {
|
||||||
text,
|
text,
|
||||||
Ui::WebpageTextDescriptionOptions(),
|
Ui::WebpageTextDescriptionOptions(),
|
||||||
context);
|
context);
|
||||||
|
if (textFloatsAroundInfo) {
|
||||||
|
_description.updateSkipBlock(
|
||||||
|
_parent->skipBlockWidth(),
|
||||||
|
_parent->skipBlockHeight());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!displayedSiteName().isEmpty()) {
|
if (!displayedSiteName().isEmpty()) {
|
||||||
_siteNameLines = 1;
|
_siteNameLines = 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue