Skip to content

Commit

Permalink
Merge branch 'New_Iced' of github.com:iced-rs/iced_aw into New_Iced
Browse files Browse the repository at this point in the history
  • Loading branch information
genusistimelord committed Jul 19, 2023
2 parents 403efbe + 8a3049f commit 2e09dc2
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
components: clippy
- uses: actions/checkout@master
- name: Lint with clippy
run: cargo clippy --all
run: cargo clippy --all -- -D warnings --verbose
2 changes: 1 addition & 1 deletion examples/cupertino/cupertino_alert/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ edition = "2021"
publish = false

[dependencies]
iced = { version = "0.8.0", features = [] }
iced = { version = "0.9.0", features = [] }
iced_aw = { path = "../../../", features = ["cupertino"] }

17 changes: 7 additions & 10 deletions examples/cupertino/cupertino_alert/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ enum Message {
ShowModal,
}

#[cfg_attr(rustfmt, rustfmt_skip)]
#[rustfmt::skip]
mod constants {
pub static PRIMARY_TEXT: &'static str = "Allow \"Maps\" to access your location while using the app?";
pub static SECONDARY_TEXT: &'static str = "Your current location will be displayed on the map and used for directions, nearby search results, and estimated travel times. ";
pub static ALLOW: &'static str = "Allow";
pub static DONT_ALLOW: &'static str = "Don't Allow";
pub static PRIMARY_TEXT: &str = "Allow \"Maps\" to access your location while using the app?";
pub static SECONDARY_TEXT: &str = "Your current location will be displayed on the map and used for directions, nearby search results, and estimated travel times. ";
pub static ALLOW: &str = "Allow";
pub static DONT_ALLOW: &str = "Don't Allow";
}

use constants::*;

// `cargo fmt` becomes unreadable for this example, so switching off //
#[cfg_attr(rustfmt, rustfmt_skip)]
#[rustfmt::skip]
impl Application for Alert {
type Executor = executor::Default;
type Message = Message;
Expand Down Expand Up @@ -69,10 +69,7 @@ impl Application for Alert {
}

fn view(&self) -> Element<Message> {
let modal_hidden: bool = match self {
Alert::ShowModal => false,
_ => true,
};
let modal_hidden = !matches!(self, Alert::ShowModal);

match self {
Alert::CancelEvent => println!("Received click for the cancel button"),
Expand Down
2 changes: 1 addition & 1 deletion examples/cupertino/cupertino_button/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ edition = "2021"
publish = false

[dependencies]
iced = { version = "0.8.0", features = [] }
iced = { version = "0.9.0", features = [] }
iced_aw = { path = "../../../", features = ["cupertino"] }

2 changes: 1 addition & 1 deletion examples/cupertino/cupertino_button/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ enum Message {
}

// `cargo fmt` becomes unreadable for this example, so switching off //
#[cfg_attr(rustfmt, rustfmt_skip)]
#[rustfmt::skip]
impl Application for ButtonApp {
type Executor = executor::Default;
type Message = Message;
Expand Down
2 changes: 1 addition & 1 deletion examples/cupertino/cupertino_switch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ edition = "2021"
publish = false

[dependencies]
iced = { version = "0.8.0", features = [] }
iced = { version = "0.9.0", features = [] }
iced_aw = { path = "../../../", features = ["cupertino"] }

2 changes: 1 addition & 1 deletion examples/cupertino/cupertino_switch/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ enum Message {
}

// `cargo fmt` becomes unreadable for this example, so switching off //
#[cfg_attr(rustfmt, rustfmt_skip)]
#[rustfmt::skip]
impl Application for Switch {
type Executor = executor::Default;
type Message = Message;
Expand Down
3 changes: 2 additions & 1 deletion src/native/tab_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ use iced_native::{
};

pub mod tab_label;
pub use crate::style::tab_bar::{Appearance, StyleSheet};
pub use tab_label::TabLabel;

use crate::{graphics::icons, style::tab_bar::StyleSheet};
use crate::graphics::icons;

use std::marker::PhantomData;
/// The default icon size.
Expand Down

0 comments on commit 2e09dc2

Please sign in to comment.