summaryrefslogtreecommitdiffstats
path: root/glow/src
diff options
context:
space:
mode:
Diffstat (limited to 'glow/src')
-rw-r--r--glow/src/shader/quad.vert5
-rw-r--r--glow/src/widget.rs8
-rw-r--r--glow/src/widget/pane_grid.rs4
-rw-r--r--glow/src/widget/qr_code.rs2
4 files changed, 17 insertions, 2 deletions
diff --git a/glow/src/shader/quad.vert b/glow/src/shader/quad.vert
index d37b5c8d..82417856 100644
--- a/glow/src/shader/quad.vert
+++ b/glow/src/shader/quad.vert
@@ -29,6 +29,11 @@ void main() {
vec2 p_Pos = i_Pos * u_Scale;
vec2 p_Scale = i_Scale * u_Scale;
+ float i_BorderRadius = min(
+ i_BorderRadius,
+ min(i_Scale.x, i_Scale.y) / 2.0
+ );
+
mat4 i_Transform = mat4(
vec4(p_Scale.x + 1.0, 0.0, 0.0, 0.0),
vec4(0.0, p_Scale.y + 1.0, 0.0, 0.0),
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/pane_grid.rs b/glow/src/widget/pane_grid.rs
index 3c47b562..f594473f 100644
--- a/glow/src/widget/pane_grid.rs
+++ b/glow/src/widget/pane_grid.rs
@@ -11,8 +11,8 @@
use crate::Renderer;
pub use iced_native::pane_grid::{
- Axis, Configuration, Direction, DragEvent, Focus, KeyPressEvent, Node,
- Pane, ResizeEvent, Split, State,
+ Axis, Configuration, Direction, DragEvent, Node, Pane, ResizeEvent, Split,
+ State,
};
/// A collection of panes distributed using either vertical or horizontal splits
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::*;