summaryrefslogtreecommitdiffstats
path: root/examples/qr_code
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-06-29 10:51:01 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-06-29 10:51:01 +0200
commit1dd1a2f97fc747e15e12b5188dad6c41b0d052ea (patch)
treeba2b24b9c8dec02b9232068dee299ca27a4823ba /examples/qr_code
parentc807abdfd70c49b0c93868c12f142a2fb4c08036 (diff)
downloadiced-1dd1a2f97fc747e15e12b5188dad6c41b0d052ea.tar.gz
iced-1dd1a2f97fc747e15e12b5188dad6c41b0d052ea.tar.bz2
iced-1dd1a2f97fc747e15e12b5188dad6c41b0d052ea.zip
Introduce `StyleSheet` for `Text` widget
Diffstat (limited to 'examples/qr_code')
-rw-r--r--examples/qr_code/src/main.rs5
1 files changed, 3 insertions, 2 deletions
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<Message> {
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,