Use configure() instead of setup() for init

This commit is contained in:
2025-10-27 11:39:40 +01:00
parent f7080fb83d
commit fe3aa3b76c

View File

@@ -35,7 +35,7 @@ class FadingRects : public ScreensaverPlugin {
FadingRects() = default;
~FadingRects() = default;
void setup(cairo_t* context, const cairo_rectangle_t& rect) override;
void configure() override;
int fps() const override;
void update () override;
void render() override;
@@ -150,8 +150,7 @@ Color FadingRects::next_color() {
return Color {hsb};
}
void FadingRects::setup(cairo_t* context, const cairo_rectangle_t& rect) {
ScreensaverPlugin::setup(context, rect);
void FadingRects::configure() {
_hue = random_between(0.0, 360.0);
_rects.clear();
}