Use configure() instead of setup() for init
This commit is contained in:
@@ -35,7 +35,7 @@ class FadingRects : public ScreensaverPlugin {
|
|||||||
FadingRects() = default;
|
FadingRects() = default;
|
||||||
~FadingRects() = default;
|
~FadingRects() = default;
|
||||||
|
|
||||||
void setup(cairo_t* context, const cairo_rectangle_t& rect) override;
|
void configure() override;
|
||||||
int fps() const override;
|
int fps() const override;
|
||||||
void update () override;
|
void update () override;
|
||||||
void render() override;
|
void render() override;
|
||||||
@@ -150,8 +150,7 @@ Color FadingRects::next_color() {
|
|||||||
return Color {hsb};
|
return Color {hsb};
|
||||||
}
|
}
|
||||||
|
|
||||||
void FadingRects::setup(cairo_t* context, const cairo_rectangle_t& rect) {
|
void FadingRects::configure() {
|
||||||
ScreensaverPlugin::setup(context, rect);
|
|
||||||
_hue = random_between(0.0, 360.0);
|
_hue = random_between(0.0, 360.0);
|
||||||
_rects.clear();
|
_rects.clear();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user