Paint outline in raster mode.

This commit is contained in:
John Preston 2021-05-31 08:05:22 +04:00
parent 78dfe940ef
commit 136e930362
2 changed files with 32 additions and 0 deletions

View file

@ -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(

View file

@ -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,