summaryrefslogtreecommitdiffstats
path: root/wgpu/src/defaults.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-01-11 00:44:56 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-01-11 00:44:56 +0100
commitde71776e02495df5dc962fb8b8853f666ab8be4f (patch)
tree1f87cc68dc554783c6102f3587377f9956bcddba /wgpu/src/defaults.rs
parente879982cfdf0c6a1c6781a9bc46e0a77839de88f (diff)
parent84f1a936db93c16255a07f079c47e351635586f4 (diff)
downloadiced-de71776e02495df5dc962fb8b8853f666ab8be4f.tar.gz
iced-de71776e02495df5dc962fb8b8853f666ab8be4f.tar.bz2
iced-de71776e02495df5dc962fb8b8853f666ab8be4f.zip
Merge branch 'master' into paint-example
Diffstat (limited to 'wgpu/src/defaults.rs')
-rw-r--r--wgpu/src/defaults.rs32
1 files changed, 32 insertions, 0 deletions
diff --git a/wgpu/src/defaults.rs b/wgpu/src/defaults.rs
new file mode 100644
index 00000000..11718a87
--- /dev/null
+++ b/wgpu/src/defaults.rs
@@ -0,0 +1,32 @@
+//! Use default styling attributes to inherit styles.
+use iced_native::Color;
+
+/// Some default styling attributes.
+#[derive(Debug, Clone, Copy)]
+pub struct Defaults {
+ /// Text styling
+ pub text: Text,
+}
+
+impl Default for Defaults {
+ fn default() -> Defaults {
+ Defaults {
+ text: Text::default(),
+ }
+ }
+}
+
+/// Some default text styling attributes.
+#[derive(Debug, Clone, Copy)]
+pub struct Text {
+ /// The default color of text
+ pub color: Color,
+}
+
+impl Default for Text {
+ fn default() -> Text {
+ Text {
+ color: Color::BLACK,
+ }
+ }
+}