summaryrefslogtreecommitdiffstats
path: root/examples/component/src/main.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2022-07-09 02:28:52 +0200
committerLibravatar GitHub <noreply@github.com>2022-07-09 02:28:52 +0200
commite053e25d2ccb17f7a162685a106a8bbd915a873f (patch)
tree5304f3ea2712e8889c7278ec5e57418f484d8f6c /examples/component/src/main.rs
parent66eb6263003c1bbedd1fd14d6b12f172d20a6211 (diff)
parent7105db97a53d90adf429091298f31c90974d8f08 (diff)
downloadiced-e053e25d2ccb17f7a162685a106a8bbd915a873f.tar.gz
iced-e053e25d2ccb17f7a162685a106a8bbd915a873f.tar.bz2
iced-e053e25d2ccb17f7a162685a106a8bbd915a873f.zip
Merge pull request #1362 from iced-rs/theming
Theming
Diffstat (limited to 'examples/component/src/main.rs')
-rw-r--r--examples/component/src/main.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/component/src/main.rs b/examples/component/src/main.rs
index 39335cf1..b6ff0600 100644
--- a/examples/component/src/main.rs
+++ b/examples/component/src/main.rs
@@ -54,7 +54,7 @@ mod numeric_input {
use iced_native::text;
use iced_native::widget::button::{self, Button};
use iced_native::widget::text_input::{self, TextInput};
- use iced_native::widget::{Row, Text};
+ use iced_native::widget::{self, Row, Text};
use iced_native::{Element, Length};
pub struct NumericInput<'a, Message> {
@@ -95,6 +95,9 @@ mod numeric_input {
for NumericInput<'a, Message>
where
Renderer: 'a + text::Renderer,
+ Renderer::Theme: button::StyleSheet
+ + text_input::StyleSheet
+ + widget::text::StyleSheet,
{
type Event = Event;
@@ -172,6 +175,9 @@ mod numeric_input {
where
Message: 'a,
Renderer: text::Renderer + 'a,
+ Renderer::Theme: button::StyleSheet
+ + text_input::StyleSheet
+ + widget::text::StyleSheet,
{
fn from(numeric_input: NumericInput<'a, Message>) -> Self {
component::view(numeric_input)