mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 15:13:57 +02:00
Apply uniform-color palette to webpage preview titles.
This commit is contained in:
parent
f771ad8cb1
commit
7fbce765c9
2 changed files with 8 additions and 0 deletions
|
@ -224,12 +224,16 @@ void Game::draw(Painter &p, const PaintContext &context) const {
|
||||||
auto lineHeight = unitedLineHeight();
|
auto lineHeight = unitedLineHeight();
|
||||||
if (_titleLines) {
|
if (_titleLines) {
|
||||||
p.setPen(semibold);
|
p.setPen(semibold);
|
||||||
|
p.setTextPalette(stm->semiboldPalette);
|
||||||
|
|
||||||
auto endskip = 0;
|
auto endskip = 0;
|
||||||
if (_title.hasSkipBlock()) {
|
if (_title.hasSkipBlock()) {
|
||||||
endskip = _parent->skipBlockWidth();
|
endskip = _parent->skipBlockWidth();
|
||||||
}
|
}
|
||||||
_title.drawLeftElided(p, padding.left(), tshift, paintw, width(), _titleLines, style::al_left, 0, -1, endskip, false, context.selection);
|
_title.drawLeftElided(p, padding.left(), tshift, paintw, width(), _titleLines, style::al_left, 0, -1, endskip, false, context.selection);
|
||||||
tshift += _titleLines * lineHeight;
|
tshift += _titleLines * lineHeight;
|
||||||
|
|
||||||
|
p.setTextPalette(stm->textPalette);
|
||||||
}
|
}
|
||||||
if (_descriptionLines) {
|
if (_descriptionLines) {
|
||||||
p.setPen(stm->historyTextFg);
|
p.setPen(stm->historyTextFg);
|
||||||
|
|
|
@ -514,12 +514,16 @@ void WebPage::draw(Painter &p, const PaintContext &context) const {
|
||||||
}
|
}
|
||||||
if (_siteNameLines) {
|
if (_siteNameLines) {
|
||||||
p.setPen(semibold);
|
p.setPen(semibold);
|
||||||
|
p.setTextPalette(stm->semiboldPalette);
|
||||||
|
|
||||||
auto endskip = 0;
|
auto endskip = 0;
|
||||||
if (_siteName.hasSkipBlock()) {
|
if (_siteName.hasSkipBlock()) {
|
||||||
endskip = _parent->skipBlockWidth();
|
endskip = _parent->skipBlockWidth();
|
||||||
}
|
}
|
||||||
_siteName.drawLeftElided(p, padding.left(), tshift, paintw, width(), _siteNameLines, style::al_left, 0, -1, endskip, false, context.selection);
|
_siteName.drawLeftElided(p, padding.left(), tshift, paintw, width(), _siteNameLines, style::al_left, 0, -1, endskip, false, context.selection);
|
||||||
tshift += lineHeight;
|
tshift += lineHeight;
|
||||||
|
|
||||||
|
p.setTextPalette(stm->textPalette);
|
||||||
}
|
}
|
||||||
p.setPen(stm->historyTextFg);
|
p.setPen(stm->historyTextFg);
|
||||||
if (_titleLines) {
|
if (_titleLines) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue