-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: revert Yew legacy for compatibility (#74)
- Loading branch information
Showing
19 changed files
with
1,790 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pub mod properties; | ||
pub mod utils; | ||
pub mod widgets; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
//! Components properties. | ||
|
||
mod align; | ||
mod color; | ||
|
||
pub use align::{Align, VAlign}; | ||
pub use color::Color; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/// Horizontal align. | ||
#[derive(Clone, Default, PartialEq)] | ||
pub enum Align { | ||
/// Left horizontal align. | ||
Left, | ||
/// Center horizontal align. | ||
#[default] | ||
Center, | ||
/// Right horizontal align. | ||
Right, | ||
/// Fill all horizontal space. | ||
Fill, | ||
} | ||
|
||
/// Vertical align. | ||
#[derive(Clone, Default, PartialEq)] | ||
pub enum VAlign { | ||
/// Top vertical align. | ||
Top, | ||
/// Middle vertical align. | ||
#[default] | ||
Middle, | ||
/// Bottom vertical align. | ||
Bottom, | ||
/// Fill all vertical space. | ||
Fill, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,310 @@ | ||
use derive_more::Display; | ||
|
||
// TODO: Define all colors | ||
|
||
/// Helper type to work with colors. | ||
#[derive(Clone, Copy, Default, Display, PartialEq)] | ||
pub enum Color { | ||
/// No color. | ||
#[default] | ||
None, | ||
/// Arbitrary color with the string value. | ||
#[display(fmt = "{_0}")] | ||
Value(&'static str), | ||
|
||
/// Alice Blue color. | ||
AliceBlue, | ||
/// Antique White color. | ||
AntiqueWhite, | ||
/// | ||
Aqua, | ||
/// | ||
Aquamarine, | ||
/// | ||
Azure, | ||
/// | ||
Aeige, | ||
/// | ||
Bisque, | ||
/// | ||
Black, | ||
/// | ||
BlanchedAlmond, | ||
/// | ||
Blue, | ||
/// | ||
BlueViolet, | ||
/// | ||
Brown, | ||
/// | ||
BurlyWood, | ||
/// | ||
CadetBlue, | ||
/// | ||
Chartreuse, | ||
/// | ||
Chocolate, | ||
/// | ||
Coral, | ||
/// | ||
CornflowerBlue, | ||
/// | ||
Cornsilk, | ||
/// | ||
Crimson, | ||
/// | ||
Cyan, | ||
/// | ||
DarkBlue, | ||
/// | ||
DarkCyan, | ||
/// | ||
DarkGoldenrod, | ||
/// | ||
DarkGray, | ||
/// | ||
DarkGreen, | ||
/// | ||
DarkGrey, | ||
/// | ||
DarkKhaki, | ||
/// | ||
DarkMagenta, | ||
/// | ||
DarkOliveGreen, | ||
/// | ||
DarkOrange, | ||
/// | ||
DarkOrchid, | ||
/// | ||
DarkRed, | ||
/// | ||
DarkSalmon, | ||
/// | ||
DarkSeaGreen, | ||
/// | ||
DarkSlateBlue, | ||
/// | ||
DarkSlateGray, | ||
/// | ||
DarkSlateGrey, | ||
/// | ||
/// | ||
DarkTurquoise, | ||
/// | ||
DarkViolet, | ||
/// | ||
DeepPink, | ||
/// | ||
DeepSkyBlue, | ||
/// | ||
DimGray, | ||
/// | ||
DimGrey, | ||
/// | ||
DodgerBlue, | ||
/// | ||
Firebrick, | ||
/// | ||
FloralWhite, | ||
/// | ||
ForestGreen, | ||
/// | ||
Fuchsia, | ||
/// | ||
Gainsboro, | ||
/// | ||
GhostWhite, | ||
/// | ||
Gold, | ||
/// | ||
Goldenrod, | ||
/// | ||
Gray, | ||
/// | ||
Green, | ||
/// | ||
GreenYellow, | ||
/// | ||
Grey, | ||
/// | ||
Honeydew, | ||
/// | ||
HotPink, | ||
/// | ||
IndianRed, | ||
/// | ||
Indigo, | ||
/// | ||
Ivory, | ||
/// | ||
Khaki, | ||
/// | ||
Lavender, | ||
/// | ||
LavenderBlush, | ||
/// | ||
LawnGreen, | ||
/// | ||
Lemonchiffon, | ||
/// | ||
LightBlue, | ||
/// | ||
LightCoral, | ||
/// | ||
LightCyan, | ||
/// | ||
LightGoldenrodYellow, | ||
/// | ||
LightGray, | ||
/// | ||
LightGreen, | ||
/// | ||
LightGrey, | ||
/// | ||
LightPink, | ||
/// | ||
LightSalmon, | ||
/// | ||
LightSeaGreen, | ||
/// | ||
LightSkyBlue, | ||
/// | ||
LightSlateGray, | ||
/// | ||
LightSlateGrey, | ||
/// | ||
LightsteelBlue, | ||
/// | ||
LightYellow, | ||
/// | ||
Lime, | ||
/// | ||
LimeGreen, | ||
/// | ||
Linen, | ||
/// | ||
Magenta, | ||
/// | ||
Maroon, | ||
/// | ||
MediumAquamarine, | ||
/// | ||
MediumBlue, | ||
/// | ||
MediumOrchid, | ||
/// | ||
MediumPurple, | ||
/// | ||
MediumSeaGreen, | ||
/// | ||
MediumSlateBlue, | ||
/// | ||
MediumSpringGreen, | ||
/// | ||
MediumTurquoise, | ||
/// | ||
MediumVioletRed, | ||
/// | ||
MidnightBlue, | ||
/// | ||
MintCream, | ||
/// | ||
MistyRose, | ||
/// | ||
Moccasin, | ||
/// | ||
NavajoWhite, | ||
/// | ||
Navy, | ||
/// | ||
Oldlace, | ||
/// | ||
Olive, | ||
/// | ||
Olivedrab, | ||
/// | ||
Orange, | ||
/// | ||
OrangeRed, | ||
/// | ||
Orchid, | ||
/// | ||
PaleGoldenrod, | ||
/// | ||
PaleGreen, | ||
/// | ||
PaleTurquoise, | ||
/// | ||
PaleVioletRed, | ||
/// | ||
Papayawhip, | ||
/// | ||
Peachpuff, | ||
/// | ||
Peru, | ||
/// | ||
Pink, | ||
/// | ||
Plum, | ||
/// | ||
PowderBlue, | ||
/// | ||
Purple, | ||
/// | ||
Red, | ||
/// | ||
RosyBrown, | ||
/// | ||
RoyalBlue, | ||
/// | ||
SaddleBrown, | ||
/// | ||
Salmon, | ||
/// | ||
SandyBrown, | ||
/// | ||
SeaGreen, | ||
/// | ||
Seashell, | ||
/// | ||
Sienna, | ||
/// | ||
Silver, | ||
/// | ||
SkyBlue, | ||
/// | ||
SlateBlue, | ||
/// | ||
SlateGray, | ||
/// | ||
SlateGrey, | ||
/// | ||
Snow, | ||
/// | ||
SpringGreen, | ||
/// | ||
SteelBlue, | ||
/// | ||
Tan, | ||
/// | ||
Teal, | ||
/// | ||
Thistle, | ||
/// | ||
Tomato, | ||
/// | ||
Turquoise, | ||
/// | ||
Violet, | ||
/// | ||
Wheat, | ||
/// | ||
White, | ||
/// | ||
WhiteSmoke, | ||
/// | ||
Yellow, | ||
/// Yellow Green color | ||
YellowGreen, | ||
} |
Oops, something went wrong.