mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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);
|
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(
|
void Viewport::Renderer::paintTileControls(
|
||||||
|
|
|
@ -31,6 +31,13 @@ private:
|
||||||
const QRect &clip,
|
const QRect &clip,
|
||||||
bool opengl,
|
bool opengl,
|
||||||
QRegion &bg);
|
QRegion &bg);
|
||||||
|
void paintTileOutline(
|
||||||
|
Painter &p,
|
||||||
|
int x,
|
||||||
|
int y,
|
||||||
|
int width,
|
||||||
|
int height,
|
||||||
|
not_null<VideoTile*> tile);
|
||||||
void paintTileControls(
|
void paintTileControls(
|
||||||
Painter &p,
|
Painter &p,
|
||||||
int x,
|
int x,
|
||||||
|
|
Loading…
Add table
Reference in a new issue