Allow manual style::complex_color refresh.
This commit is contained in:
parent
48ebd65323
commit
fb812fd748
3 changed files with 5 additions and 2 deletions
|
|
@ -952,7 +952,7 @@ void prepareRound(
|
|||
auto cornerHeight = cornerMasks[0].height();
|
||||
auto targetWidth = target.width();
|
||||
auto targetHeight = target.height();
|
||||
if (targetWidth < 2 * cornerWidth || targetHeight < 2 * cornerHeight) {
|
||||
if (targetWidth < cornerWidth || targetHeight < cornerHeight) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ void ColorData::set(uchar r, uchar g, uchar b, uchar a) {
|
|||
void ComplexColor::subscribeToPaletteChanges() {
|
||||
style::PaletteChanged(
|
||||
) | rpl::start_with_next([=] {
|
||||
_owned.update(_generator());
|
||||
refresh();
|
||||
}, _lifetime);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -145,6 +145,9 @@ public:
|
|||
[[nodiscard]] const Color &color() const {
|
||||
return _owned.color();
|
||||
}
|
||||
void refresh() {
|
||||
_owned.update(_generator());
|
||||
}
|
||||
|
||||
private:
|
||||
void subscribeToPaletteChanges();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue