Rename `Settings::use_antialiasing` to `antialiasing`
This commit is contained in:
parent
9c067562fa
commit
6f7247ca13
|
@ -287,7 +287,7 @@ use iced::{
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
Example::run(Settings {
|
Example::run(Settings {
|
||||||
use_antialiasing: true,
|
antialiasing: true,
|
||||||
..Settings::default()
|
..Settings::default()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ use iced::{
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
Clock::run(Settings {
|
Clock::run(Settings {
|
||||||
use_antialiasing: true,
|
antialiasing: true,
|
||||||
..Settings::default()
|
..Settings::default()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ use std::time::Instant;
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
SolarSystem::run(Settings {
|
SolarSystem::run(Settings {
|
||||||
use_antialiasing: true,
|
antialiasing: true,
|
||||||
..Settings::default()
|
..Settings::default()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,7 +178,7 @@ pub trait Application: Sized {
|
||||||
_settings.into(),
|
_settings.into(),
|
||||||
iced_wgpu::Settings {
|
iced_wgpu::Settings {
|
||||||
default_font: _settings.default_font,
|
default_font: _settings.default_font,
|
||||||
antialiasing: if _settings.use_antialiasing {
|
antialiasing: if _settings.antialiasing {
|
||||||
Some(iced_wgpu::settings::Antialiasing::MSAAx4)
|
Some(iced_wgpu::settings::Antialiasing::MSAAx4)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
|
|
|
@ -17,14 +17,14 @@ pub struct Settings {
|
||||||
// TODO: Add `name` for web compatibility
|
// TODO: Add `name` for web compatibility
|
||||||
pub default_font: Option<&'static [u8]>,
|
pub default_font: Option<&'static [u8]>,
|
||||||
|
|
||||||
/// If set to true, the renderer will try to use antialiasing for some
|
/// If set to true, the renderer will try to perform antialiasing for some
|
||||||
/// primitives.
|
/// primitives.
|
||||||
///
|
///
|
||||||
/// Enabling it can produce a smoother result in some widgets, like the
|
/// Enabling it can produce a smoother result in some widgets, like the
|
||||||
/// `Canvas`, at a performance cost.
|
/// `Canvas`, at a performance cost.
|
||||||
///
|
///
|
||||||
/// By default, it is disabled.
|
/// By default, it is disabled.
|
||||||
pub use_antialiasing: bool,
|
pub antialiasing: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
|
|
Loading…
Reference in New Issue