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

Added ability to paint circle buttons of accent colors with custom size.

This commit is contained in:
23rd
2023-01-23 23:55:24 +03:00
committed by John Preston
parent a7e2de53f5
commit 5150ca054e
2 changed files with 11 additions and 3 deletions

View File

@@ -210,6 +210,7 @@ void ColorsPalette::Button::paint() {
if (_colors.size() == 1) {
PaintRoundColorButton(
p,
st::settingsAccentColorSize,
_colors.front(),
_selectedAnimation.value(_selected ? 1. : 0.));
} else if (_colors.size() >= kCustomColorButtonParts) {
@@ -371,8 +372,11 @@ void ColorsPalette::updateInnerGeometry() {
} // namespace
void PaintRoundColorButton(QPainter &p, QBrush brush, float64 selected) {
const auto size = st::settingsAccentColorSize;
void PaintRoundColorButton(
QPainter &p,
int size,
QBrush brush,
float64 selected) {
const auto rect = QRect(0, 0, size, size);
p.setBrush(brush);