From 65eb218d3d7ba52b2869a586a1480eeb3c8f84e4 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 21 Nov 2019 13:47:20 +0100 Subject: Move widgets from `core` to `native` and `web` Also made fields private and improved `Renderer` traits. --- core/src/align.rs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'core/src/align.rs') diff --git a/core/src/align.rs b/core/src/align.rs index d6915086..8b571db4 100644 --- a/core/src/align.rs +++ b/core/src/align.rs @@ -16,3 +16,29 @@ pub enum Align { /// Align at the end of the cross axis. End, } + +/// The horizontal alignment of some resource. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum HorizontalAlignment { + /// Align left + Left, + + /// Horizontally centered + Center, + + /// Align right + Right, +} + +/// The vertical alignment of some resource. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum VerticalAlignment { + /// Align top + Top, + + /// Vertically centered + Center, + + /// Align bottom + Bottom, +} -- cgit From a7dba612f03e58d7bd9527499d893987986b347c Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 22 Nov 2019 19:36:57 +0100 Subject: Write docs for `iced` and `iced_native` --- core/src/align.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'core/src/align.rs') diff --git a/core/src/align.rs b/core/src/align.rs index 8b571db4..05bd5e63 100644 --- a/core/src/align.rs +++ b/core/src/align.rs @@ -1,10 +1,4 @@ -/// Alignment on the cross axis of a container. -/// -/// * On a [`Column`], it describes __horizontal__ alignment. -/// * On a [`Row`], it describes __vertical__ alignment. -/// -/// [`Column`]: widget/struct.Column.html -/// [`Row`]: widget/struct.Row.html +/// Alignment on an unspecified axis of a container. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub enum Align { /// Align at the start of the cross axis. -- cgit From 3a678561f2da92e089390ee79bd4f9efc2c1a8c7 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 23 Nov 2019 12:00:50 +0100 Subject: Fix documentation for `Axis` --- core/src/align.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/src/align.rs') diff --git a/core/src/align.rs b/core/src/align.rs index 05bd5e63..8a59afa1 100644 --- a/core/src/align.rs +++ b/core/src/align.rs @@ -1,13 +1,13 @@ -/// Alignment on an unspecified axis of a container. +/// Alignment on an axis of a container. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub enum Align { - /// Align at the start of the cross axis. + /// Align at the start of the axis. Start, - /// Align at the center of the cross axis. + /// Align at the center of the axis. Center, - /// Align at the end of the cross axis. + /// Align at the end of the axis. End, } -- cgit