Remove sandbox by making application more generic 🎉
This commit is contained in:
parent
0a24611ccd
commit
28a27f08ed
23 changed files with 80 additions and 111 deletions
|
|
@ -7,7 +7,7 @@ use iced::widget::canvas::{
|
|||
use iced::{Element, Length, Point, Rectangle, Renderer, Subscription, Theme};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::sandbox("Arc - Iced", Arc::update, Arc::view)
|
||||
iced::application("Arc - Iced", Arc::update, Arc::view)
|
||||
.subscription(Arc::subscription)
|
||||
.theme(|_| Theme::Dark)
|
||||
.antialiased()
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use iced::widget::{button, column, text};
|
|||
use iced::{Alignment, Element, Length};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::sandbox("Bezier Tool - Iced", Example::update, Example::view)
|
||||
iced::application("Bezier Tool - Iced", Example::update, Example::view)
|
||||
.antialiased()
|
||||
.run()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use iced::{Element, Font, Length};
|
|||
const ICON_FONT: Font = Font::with_name("icons");
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::sandbox("Checkbox - Iced", Example::update, Example::view)
|
||||
iced::application("Checkbox - Iced", Example::update, Example::view)
|
||||
.font(include_bytes!("../fonts/icons.ttf").as_slice())
|
||||
.run()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use iced::{
|
|||
};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::sandbox("Clock - Iced", Clock::update, Clock::view)
|
||||
iced::application("Clock - Iced", Clock::update, Clock::view)
|
||||
.subscription(Clock::subscription)
|
||||
.theme(Clock::theme)
|
||||
.antialiased()
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use std::marker::PhantomData;
|
|||
use std::ops::RangeInclusive;
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::sandbox(
|
||||
iced::application(
|
||||
"Color Palette - Iced",
|
||||
ColorPalette::update,
|
||||
ColorPalette::view,
|
||||
|
|
|
|||
|
|
@ -9,9 +9,13 @@ use iced::window;
|
|||
use iced::{Alignment, Color, Element, Length, Subscription};
|
||||
|
||||
fn main() -> iced::Result {
|
||||
iced::sandbox("Custom Shader - Iced", IcedCubes::update, IcedCubes::view)
|
||||
.subscription(IcedCubes::subscription)
|
||||
.run()
|
||||
iced::application(
|
||||
"Custom Shader - Iced",
|
||||
IcedCubes::update,
|
||||
IcedCubes::view,
|
||||
)
|
||||
.subscription(IcedCubes::subscription)
|
||||
.run()
|
||||
}
|
||||
|
||||
struct IcedCubes {
|
||||
|
|
|
|||
|
|
@ -4,9 +4,13 @@ use iced::widget::{button, column, container, progress_bar, text, Column};
|
|||
use iced::{Alignment, Element, Length, Subscription};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::sandbox("Download Progress - Iced", Example::update, Example::view)
|
||||
.subscription(Example::subscription)
|
||||
.run()
|
||||
iced::application(
|
||||
"Download Progress - Iced",
|
||||
Example::update,
|
||||
Example::view,
|
||||
)
|
||||
.subscription(Example::subscription)
|
||||
.run()
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ use iced::{Element, Length};
|
|||
use rainbow::rainbow;
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::run("Custom 2D Geometry - Iced", |_, _| {}, view)
|
||||
iced::run("Custom 2D Geometry - Iced", |_: &mut _, _| {}, view)
|
||||
}
|
||||
|
||||
fn view(_state: &()) -> Element<'_, ()> {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use iced::{
|
|||
};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::sandbox(Layout::title, Layout::update, Layout::view)
|
||||
iced::application(Layout::title, Layout::update, Layout::view)
|
||||
.subscription(Layout::subscription)
|
||||
.theme(Layout::theme)
|
||||
.run()
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ use circular::Circular;
|
|||
use linear::Linear;
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::sandbox(
|
||||
iced::application(
|
||||
"Loading Spinners - Iced",
|
||||
LoadingSpinners::update,
|
||||
LoadingSpinners::view,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use std::collections::HashMap;
|
|||
pub fn main() -> iced::Result {
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
iced::sandbox("Multitouch - Iced", Multitouch::update, Multitouch::view)
|
||||
iced::application("Multitouch - Iced", Multitouch::update, Multitouch::view)
|
||||
.antialiased()
|
||||
.centered()
|
||||
.run()
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use iced::widget::{
|
|||
use iced::{Color, Element, Length, Size, Subscription};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::sandbox("Pane Grid - Iced", Example::update, Example::view)
|
||||
iced::application("Pane Grid - Iced", Example::update, Example::view)
|
||||
.subscription(Example::subscription)
|
||||
.run()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use iced::widget::{
|
|||
use iced::{Alignment, Element, Length, Theme};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::sandbox(
|
||||
iced::application(
|
||||
"QR Code Generator - Iced",
|
||||
QRGenerator::update,
|
||||
QRGenerator::view,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use rand::Rng;
|
|||
use std::fmt::Debug;
|
||||
|
||||
fn main() -> iced::Result {
|
||||
iced::sandbox(
|
||||
iced::application(
|
||||
"Sierpinski Triangle - Iced",
|
||||
SierpinskiEmulator::update,
|
||||
SierpinskiEmulator::view,
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ use std::time::Instant;
|
|||
pub fn main() -> iced::Result {
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
iced::sandbox(
|
||||
iced::application(
|
||||
"Solar System - Iced",
|
||||
SolarSystem::update,
|
||||
SolarSystem::view,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use iced::{Alignment, Element, Length, Subscription, Theme};
|
|||
use std::time::{Duration, Instant};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::sandbox("Stopwatch - Iced", Stopwatch::update, Stopwatch::view)
|
||||
iced::application("Stopwatch - Iced", Stopwatch::update, Stopwatch::view)
|
||||
.subscription(Stopwatch::subscription)
|
||||
.theme(Stopwatch::theme)
|
||||
.run()
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use iced::widget::{
|
|||
use iced::{Alignment, Element, Length, Theme};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::sandbox("Styling - Iced", Styling::update, Styling::view)
|
||||
iced::application("Styling - Iced", Styling::update, Styling::view)
|
||||
.theme(Styling::theme)
|
||||
.run()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ pub fn main() -> iced::Result {
|
|||
#[cfg(not(target_arch = "wasm32"))]
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
iced::sandbox(Tour::title, Tour::update, Tour::view)
|
||||
iced::application(Tour::title, Tour::update, Tour::view)
|
||||
.centered()
|
||||
.run()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use iced::widget::{container, text};
|
|||
use iced::{Element, Length, Subscription};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::sandbox("URL Handler - Iced", App::update, App::view)
|
||||
iced::application("URL Handler - Iced", App::update, App::view)
|
||||
.subscription(App::subscription)
|
||||
.run()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use iced::widget::{
|
|||
use iced::{Element, Length, Point, Rectangle, Renderer, Theme, Vector};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::sandbox(
|
||||
iced::application(
|
||||
"Vectorial Text - Iced",
|
||||
VectorialText::update,
|
||||
VectorialText::view,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue