diff options
Diffstat (limited to 'native/src')
-rw-r--r-- | native/src/renderer/null.rs | 2 | ||||
-rw-r--r-- | native/src/widget/button.rs | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/native/src/renderer/null.rs b/native/src/renderer/null.rs index df261cdc..3e02e73a 100644 --- a/native/src/renderer/null.rs +++ b/native/src/renderer/null.rs @@ -138,6 +138,8 @@ impl text_input::Renderer for Null { } impl button::Renderer for Null { + const DEFAULT_PADDING: u16 = 0; + type Style = (); fn draw<Message>( diff --git a/native/src/widget/button.rs b/native/src/widget/button.rs index 51b02172..5b0d3e41 100644 --- a/native/src/widget/button.rs +++ b/native/src/widget/button.rs @@ -61,7 +61,7 @@ where height: Length::Shrink, min_width: 0, min_height: 0, - padding: 0, + padding: Renderer::DEFAULT_PADDING, style: Renderer::Style::default(), } } @@ -249,6 +249,11 @@ where /// [`Button`]: struct.Button.html /// [renderer]: ../../renderer/index.html pub trait Renderer: crate::Renderer + Sized { + /// The default padding of a [`Button`]. + /// + /// [`Button`]: struct.Button.html + const DEFAULT_PADDING: u16; + /// The style supported by this renderer. type Style: Default; |