mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 07:37:11 +02:00
Added ability to paint circle buttons of accent colors with custom size.
This commit is contained in:
parent
a7e2de53f5
commit
5150ca054e
2 changed files with 11 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -31,7 +31,11 @@ void SetupExport(
|
|||
not_null<Window::SessionController*> controller,
|
||||
not_null<Ui::VerticalLayout*> container);
|
||||
|
||||
void PaintRoundColorButton(QPainter &p, QBrush brush, float64 selected);
|
||||
void PaintRoundColorButton(
|
||||
QPainter &p,
|
||||
int size,
|
||||
QBrush brush,
|
||||
float64 selected);
|
||||
|
||||
class Chat : public Section<Chat> {
|
||||
public:
|
||||
|
|
Loading…
Add table
Reference in a new issue