diff --git a/core/flyout_button.ts b/core/flyout_button.ts index 63f19e7a0..c3ad6cdaa 100644 --- a/core/flyout_button.ts +++ b/core/flyout_button.ts @@ -32,6 +32,10 @@ export class FlyoutButton { /** The vertical margin around the text in the button. */ static TEXT_MARGIN_Y = 2; + + /** The radius of the flyout button's borders. */ + static BORDER_RADIUS = 4; + private readonly text_: string; private readonly position_: Coordinate; private readonly callbackKey_: string; @@ -102,8 +106,8 @@ export class FlyoutButton { shadow = dom.createSvgElement( Svg.RECT, { 'class': 'blocklyFlyoutButtonShadow', - 'rx': 4, - 'ry': 4, + 'rx': FlyoutButton.BORDER_RADIUS, + 'ry': FlyoutButton.BORDER_RADIUS, 'x': 1, 'y': 1, }, @@ -114,8 +118,8 @@ export class FlyoutButton { Svg.RECT, { 'class': this.isLabel_ ? 'blocklyFlyoutLabelBackground' : 'blocklyFlyoutButtonBackground', - 'rx': 4, - 'ry': 4, + 'rx': FlyoutButton.BORDER_RADIUS, + 'ry': FlyoutButton.BORDER_RADIUS, }, this.svgGroup_!);