diff options
author | 2020-11-20 10:13:58 +0100 | |
---|---|---|
committer | 2020-11-20 10:29:33 +0100 | |
commit | 3296be845c1f03bd481e10912ffdea74ac5ab1f6 (patch) | |
tree | 36a576c31534e2f14d2691553d0e49768ffc9423 /glow | |
parent | 209056e1cd0fd74f508e11de2233123cc951640b (diff) | |
download | iced-3296be845c1f03bd481e10912ffdea74ac5ab1f6.tar.gz iced-3296be845c1f03bd481e10912ffdea74ac5ab1f6.tar.bz2 iced-3296be845c1f03bd481e10912ffdea74ac5ab1f6.zip |
Implement `QRCode` widget
Diffstat (limited to 'glow')
-rw-r--r-- | glow/Cargo.toml | 1 | ||||
-rw-r--r-- | glow/src/widget.rs | 8 | ||||
-rw-r--r-- | glow/src/widget/qr_code.rs | 2 |
3 files changed, 11 insertions, 0 deletions
diff --git a/glow/Cargo.toml b/glow/Cargo.toml index 8c15be04..0178f9f7 100644 --- a/glow/Cargo.toml +++ b/glow/Cargo.toml @@ -9,6 +9,7 @@ repository = "https://github.com/hecrj/iced" [features] canvas = ["iced_graphics/canvas"] +qr_code = ["iced_graphics/qr_code"] default_system_font = ["iced_graphics/font-source"] # Not supported yet! image = [] diff --git a/glow/src/widget.rs b/glow/src/widget.rs index 0e33909d..b5c84c56 100644 --- a/glow/src/widget.rs +++ b/glow/src/widget.rs @@ -52,6 +52,14 @@ pub mod canvas; #[doc(no_inline)] pub use canvas::Canvas; +#[cfg(feature = "qr_code")] +#[cfg_attr(docsrs, doc(cfg(feature = "qr_code")))] +pub mod qr_code; + +#[cfg(feature = "qr_code")] +#[doc(no_inline)] +pub use qr_code::QRCode; + pub use iced_native::{Image, Space}; /// A container that distributes its contents vertically. diff --git a/glow/src/widget/qr_code.rs b/glow/src/widget/qr_code.rs new file mode 100644 index 00000000..7b1c2408 --- /dev/null +++ b/glow/src/widget/qr_code.rs @@ -0,0 +1,2 @@ +//! Encode and display information in a QR code. +pub use iced_graphics::qr_code::*; |