mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 15:47:11 +02:00
Paint outline in raster mode.
This commit is contained in:
parent
78dfe940ef
commit
136e930362
2 changed files with 32 additions and 0 deletions
|
@ -110,6 +110,31 @@ void Viewport::Renderer::paintTile(
|
|||
}
|
||||
|
||||
paintTileControls(p, x, y, width, height, tile);
|
||||
paintTileOutline(p, x, y, width, height, tile);
|
||||
}
|
||||
|
||||
void Viewport::Renderer::paintTileOutline(
|
||||
Painter &p,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
not_null<VideoTile*> tile) {
|
||||
if (!tile->row()->speaking()) {
|
||||
return;
|
||||
}
|
||||
const auto outline = st::groupCallOutline;
|
||||
const auto &color = st::groupCallMemberActiveIcon;
|
||||
p.setPen(Qt::NoPen);
|
||||
p.fillRect(x, y, outline, height - outline, color);
|
||||
p.fillRect(x + outline, y, width - outline, outline, color);
|
||||
p.fillRect(
|
||||
x + width - outline,
|
||||
y + outline,
|
||||
outline,
|
||||
height - outline,
|
||||
color);
|
||||
p.fillRect(x, y + height - outline, width - outline, outline, color);
|
||||
}
|
||||
|
||||
void Viewport::Renderer::paintTileControls(
|
||||
|
|
|
@ -31,6 +31,13 @@ private:
|
|||
const QRect &clip,
|
||||
bool opengl,
|
||||
QRegion &bg);
|
||||
void paintTileOutline(
|
||||
Painter &p,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
not_null<VideoTile*> tile);
|
||||
void paintTileControls(
|
||||
Painter &p,
|
||||
int x,
|
||||
|
|
Loading…
Add table
Reference in a new issue