Skip to content

Commit

Permalink
Release 0.7.0, Removed IconText
Browse files Browse the repository at this point in the history
  • Loading branch information
genusistimelord committed Aug 30, 2023
1 parent f02f321 commit dc18fca
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 253 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.7.0] - 2023-08-30

### Added
- DynamicHeight to menu bar @latidoremi .
- [Breaking] Custom Style Options for all widgets.
Expand All @@ -14,10 +16,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed
- Changed current width to content_width for `NumberInput`.
- (Breaking) Removed `Icon_text`, Use `Iced::widget::Text` instead.

### Fixed
- TabBars hieght issue within container.
- number input buttons not rendering correctly when they are oversized.
- Fixed SFUIRounded family name to be correct.
- number input scrolling to be normal scrolling instead of inversed scrolling @Redhawk18.

## [0.6.0] - 2023-07-28

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "iced_aw"
version = "0.6.0"
version = "0.7.0"
authors = ["Kaiden42 <[email protected]>", "Andrew Wheeler <[email protected]>"]
edition = "2021"
description = "Additional widgets for the Iced GUI library"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Include `iced_aw` as a dependency in your `Cargo.toml`:
```toml
[dependencies]
iced = "0.10.0"
iced_aw = { version = "0.6.0", default-features = false, features = [...] }
iced_aw = { version = "0.7.0", default-features = false, features = [...] }
```

## Versioning
Expand All @@ -23,7 +23,7 @@ iced_aw = { version = "0.6.0", default-features = false, features = [...] }
| -------------- | ----------------- |
| 0.8 | 0.4 |
| 0.9 | 0.5 |
| 0.10 | 0.6 |
| 0.10 | 0.6, 0.7 |

## Widgets

Expand Down
4 changes: 0 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ mod platform {
#[cfg(feature = "icons")]
pub use {crate::graphics::icons::Icon, crate::graphics::icons::ICON_FONT};

#[doc(no_inline)]
#[cfg(feature = "icon_text")]
pub use {crate::native::icon_text, crate::native::icon_text::IconText};

#[doc(no_inline)]
#[cfg(feature = "badge")]
pub use {crate::native::badge, crate::style::BadgeStyles, badge::Badge};
Expand Down
12 changes: 0 additions & 12 deletions src/native/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,18 +238,6 @@ where
crate::Wrap::with_elements_vertical(children)
}

#[cfg(feature = "icon_text")]
/// Shortcut helper to create an [`IconText`] Widget.
///
/// [`IconText`]: crate::IconText
#[must_use]
pub fn icon_text<Renderer>(label: impl Into<String>) -> crate::IconText<Renderer>
where
Renderer: core::text::Renderer<Font = core::Font>,
{
crate::IconText::new(label)
}

#[cfg(feature = "modal")]
/// Shortcut helper to create a [`Modal`] Widget.
///
Expand Down
205 changes: 0 additions & 205 deletions src/native/icon_text.rs

This file was deleted.

6 changes: 0 additions & 6 deletions src/native/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@ pub type Grid<'a, Message, Renderer> = grid::Grid<'a, Message, Renderer>;
#[cfg(feature = "grid")]
pub use grid::Strategy;

#[cfg(feature = "icon_text")]
pub mod icon_text;
#[cfg(feature = "icon_text")]
/// Text widget with icon font.
pub type IconText<Renderer> = crate::native::icon_text::IconText<Renderer>;

#[cfg(feature = "modal")]
pub mod modal;
#[cfg(feature = "modal")]
Expand Down
2 changes: 0 additions & 2 deletions src/native/overlay/color_picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ use crate::{
overlay::Position,
},
graphics::icons::{icon_to_char, Icon},
//native::IconText,
style::{
color_picker::{Appearance, StyleSheet},
style_state::StyleState,
Expand Down Expand Up @@ -101,7 +100,6 @@ where
)
.width(Length::Fill)
.on_press(on_cancel.clone()),
//IconText
submit_button: Button::new(
iced_widget::Text::new(icon_to_char(Icon::Check).to_string())
.horizontal_alignment(alignment::Horizontal::Center)
Expand Down
44 changes: 32 additions & 12 deletions src/native/overlay/date_picker.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
//! Use a date picker as an input element for picking dates.
//!
//! *This API requires the following crate features to be activated: `date_picker`*
use std::collections::HashMap;
use chrono::{Datelike, Local, NaiveDate};

use iced_widget::{
button, container,
core::{
Expand All @@ -23,15 +21,15 @@ use iced_widget::{
renderer::Renderer,
text, Button, Column, Container, Row, Text,
};
use std::collections::HashMap;

use crate::{
core::{
date::{Date, IsInMonth},
overlay::Position,
},
date_picker,
graphics::icons::{Icon, ICON_FONT},
native::IconText,
graphics::icons::{icon_to_char, Icon, ICON_FONT},
style::style_state::StyleState,
};

Expand Down Expand Up @@ -89,12 +87,22 @@ where

DatePickerOverlay {
state: overlay_state,
cancel_button: Button::new(IconText::new(Icon::X).width(Length::Fill))
.width(Length::Fill)
.on_press(on_cancel.clone()),
submit_button: Button::new(IconText::new(Icon::Check).width(Length::Fill))
.width(Length::Fill)
.on_press(on_cancel), // Sending a fake message
cancel_button: Button::new(
text::Text::new(icon_to_char(Icon::X).to_string())
.font(ICON_FONT)
.horizontal_alignment(Horizontal::Center)
.width(Length::Fill),
)
.width(Length::Fill)
.on_press(on_cancel.clone()),
submit_button: Button::new(
text::Text::new(icon_to_char(Icon::Check).to_string())
.font(ICON_FONT)
.horizontal_alignment(Horizontal::Center)
.width(Length::Fill),
)
.width(Length::Fill)
.on_press(on_cancel), // Sending a fake message
on_submit,
position,
style,
Expand Down Expand Up @@ -909,8 +917,20 @@ where
{
fn default() -> Self {
Self {
cancel_button: Button::new(IconText::new(Icon::X)).into(),
submit_button: Button::new(IconText::new(Icon::Check)).into(),
cancel_button: Button::new(
text::Text::new(icon_to_char(Icon::X).to_string())
.font(ICON_FONT)
.horizontal_alignment(Horizontal::Center)
.width(Length::Fill),
)
.into(),
submit_button: Button::new(
text::Text::new(icon_to_char(Icon::Check).to_string())
.font(ICON_FONT)
.horizontal_alignment(Horizontal::Center)
.width(Length::Fill),
)
.into(),
}
}
}
Expand Down
Loading

0 comments on commit dc18fca

Please sign in to comment.