2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Fix -Wunused-function warnings

This commit is contained in:
Ilya Fedin
2021-07-12 11:13:58 +04:00
committed by John Preston
parent 84b1fac0c8
commit 89765340c3
19 changed files with 6 additions and 231 deletions

View File

@@ -142,10 +142,6 @@ auto Colors() {
return result;
}
bool IsMuted(CallMuteButtonType type) {
return (type != CallMuteButtonType::Active);
}
bool IsConnecting(CallMuteButtonType type) {
return (type == CallMuteButtonType::Connecting);
}

View File

@@ -258,37 +258,6 @@ CheckCaches *FrameCaches() {
return result;
}
void prepareCheckCaches(const style::RoundCheckbox *st, bool displayInactive, QPixmap &checkBgCache, QPixmap &checkFullCache) {
auto size = st->size;
auto wideSize = size * kWideScale;
auto cache = QImage(wideSize * cIntRetinaFactor(), wideSize * cIntRetinaFactor(), QImage::Format_ARGB32_Premultiplied);
cache.setDevicePixelRatio(cRetinaFactor());
cache.fill(Qt::transparent);
{
Painter p(&cache);
PainterHighQualityEnabler hq(p);
if (displayInactive) {
p.setPen(Qt::NoPen);
} else {
auto pen = st->border->p;
pen.setWidth(st->width);
p.setPen(pen);
}
p.setBrush(st->bgActive);
auto ellipse = QRect((wideSize - size) / 2, (wideSize - size) / 2, size, size);
p.drawEllipse(ellipse);
}
auto cacheIcon = cache;
{
Painter p(&cacheIcon);
auto ellipse = QRect((wideSize - size) / 2, (wideSize - size) / 2, size, size);
st->check.paint(p, ellipse.topLeft(), wideSize);
}
checkBgCache = Ui::PixmapFromImage(std::move(cache));
checkFullCache = Ui::PixmapFromImage(std::move(cacheIcon));
}
} // namespace
RoundCheckbox::RoundCheckbox(const style::RoundCheckbox &st, Fn<void()> updateCallback)