summaryrefslogtreecommitdiffstats
path: root/src/sandbox.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-05-25 05:01:18 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-05-25 05:01:18 +0200
commit03eda9b162012c503ead649e5ccb95b7ef1d10ed (patch)
treea134dbab97011c0a465f4527d2ae0bb771f51554 /src/sandbox.rs
parent2cfb307f8c3927a0876c6b754a5d7d673b9edfee (diff)
downloadiced-03eda9b162012c503ead649e5ccb95b7ef1d10ed.tar.gz
iced-03eda9b162012c503ead649e5ccb95b7ef1d10ed.tar.bz2
iced-03eda9b162012c503ead649e5ccb95b7ef1d10ed.zip
Let a `Theme` control the background color of an application
... and remove `Application::background_color`
Diffstat (limited to 'src/sandbox.rs')
-rw-r--r--src/sandbox.rs13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/sandbox.rs b/src/sandbox.rs
index 16819569..f03562fb 100644
--- a/src/sandbox.rs
+++ b/src/sandbox.rs
@@ -1,5 +1,5 @@
use crate::{
- Application, Color, Command, Element, Error, Settings, Subscription, Theme,
+ Application, Command, Element, Error, Settings, Subscription, Theme,
};
/// A sandboxed [`Application`].
@@ -121,13 +121,6 @@ pub trait Sandbox {
Theme::default()
}
- /// Returns the background color of the [`Sandbox`].
- ///
- /// By default, it returns [`Color::WHITE`].
- fn background_color(&self) -> Color {
- Color::WHITE
- }
-
/// Returns the scale factor of the [`Sandbox`].
///
/// It can be used to dynamically control the size of the UI at runtime
@@ -197,10 +190,6 @@ where
Subscription::none()
}
- fn background_color(&self) -> Color {
- T::background_color(self)
- }
-
fn scale_factor(&self) -> f64 {
T::scale_factor(self)
}