Use configure() instead of setup() for init
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user