From 1dd1a2f97fc747e15e12b5188dad6c41b0d052ea Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 29 Jun 2022 10:51:01 +0200 Subject: Introduce `StyleSheet` for `Text` widget --- examples/qr_code/src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'examples/qr_code') diff --git a/examples/qr_code/src/main.rs b/examples/qr_code/src/main.rs index 92c82d45..3e9ba921 100644 --- a/examples/qr_code/src/main.rs +++ b/examples/qr_code/src/main.rs @@ -1,7 +1,8 @@ use iced::qr_code::{self, QRCode}; use iced::text_input::{self, TextInput}; use iced::{ - Alignment, Column, Container, Element, Length, Sandbox, Settings, Text, + Alignment, Color, Column, Container, Element, Length, Sandbox, Settings, + Text, }; pub fn main() -> iced::Result { @@ -48,7 +49,7 @@ impl Sandbox for QRGenerator { fn view(&mut self) -> Element { let title = Text::new("QR Code Generator") .size(70) - .color([0.5, 0.5, 0.5]); + .style(Color::from([0.5, 0.5, 0.5])); let input = TextInput::new( &mut self.input, -- cgit