29 text_ = std::make_unique<PlainTextComponent>(
"text",
"This Beta has expired");
30 text_->setTextSize(14.0f);
34 link_ = std::make_unique<OpenGlHyperlink>(
"Download a new version", URL(
""));
35 link_->setFont(
Fonts::instance()->proportional_light().withPointHeight(14.0f),
36 false, Justification::centred);
37 addAndMakeVisible(link_.get());
47 body_.setBounds(expired_rect);
49 expired_rect.getWidth() - 2 *
kPaddingX, 22);
50 link_->setBounds(expired_rect.getX(), expired_rect.getY() +
kPaddingY + 22, expired_rect.getWidth(), 22);
52 text_->redrawImage(
false);
58 if (should_be_visible) {
60 Image image(Image::ARGB, 1, 1,
false);
static constexpr int kPaddingX
The horizontal padding within the overlay.
Definition expired_section.h:29
static constexpr int kPaddingY
The vertical padding within the overlay.
Definition expired_section.h:34
void setVisible(bool should_be_visible) override
Sets the visibility of this overlay.
Definition expired_section.cpp:57
static constexpr int kExpiredHeight
The fixed height of the expired section overlay.
Definition expired_section.h:24
static constexpr int kExpiredWidth
The fixed width of the expired section overlay.
Definition expired_section.h:19
ExpiredSection(String name)
Constructs an ExpiredSection overlay.
Definition expired_section.cpp:26
Rectangle< int > getExpiredRect()
Computes the rectangle area occupied by the expired message section.
Definition expired_section.cpp:68
void resized() override
Called when the component is resized.
Definition expired_section.cpp:41
static Fonts * instance()
Gets the singleton instance of the Fonts class.
Definition fonts.h:52
A template class that wraps a given ComponentType and automatically redraws an OpenGlImageComponent o...
Definition open_gl_image_component.h:153
OpenGlImageComponent image_component_
Definition open_gl_image_component.h:199
A hyperlink button rendered with OpenGL support.
Definition expired_section.cpp:14
OpenGlHyperlink(String text, URL url)
Constructs an OpenGlHyperlink.
Definition expired_section.cpp:21
void setComponent(Component *component)
Sets the component to be drawn into the OpenGL image. If not set, uses this component.
Definition open_gl_image_component.h:83
force_inline void setColor(Colour color)
Sets the base color for the quads.
Definition open_gl_multi_quad.h:102
void setRounding(float rounding)
Sets the rounding radius of the quads.
Definition open_gl_multi_quad.h:347
A SynthSection that displays an overlay with a background and optional listeners.
Definition overlay.h:180
virtual void resized() override
Called when the overlay is resized. Updates background color and size.
Definition overlay.h:237
void setVisible(bool should_be_visible) override
Sets the visibility of the overlay and notifies listeners.
Definition overlay.h:224
@ kLight
Definition open_gl_image_component.h:309
Manages and provides access to vertex and fragment shaders used by the OpenGL rendering pipeline.
Definition shaders.h:19
@ kBodyRounding
Definition skin.h:71
@ kBodyText
Definition skin.h:133
@ kBody
Definition skin.h:129
void paintOpenGlChildrenBackgrounds(Graphics &g)
Paints the backgrounds for all OpenGL child components.
Definition synth_section.cpp:267
float findValue(Skin::ValueId value_id) const
Finds a value in the skin overrides or from the parent if not found locally.
Definition synth_section.cpp:18
void addOpenGlComponent(OpenGlComponent *open_gl_component, bool to_beginning=false)
Definition synth_section.cpp:489