1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 13:50:04 -04:00

Move code from egui_demo_lib to egui_demo_app (#1540)

Also clean up feature names and dependencies
This commit is contained in:
Emil Ernerfeldt
2022-04-28 11:23:34 +02:00
committed by GitHub
parent 39917bec26
commit 355d70d2b9
46 changed files with 213 additions and 174 deletions

View File

@@ -5,6 +5,7 @@ All notable changes to the `egui_extras` integration will be noted in this file.
## Unreleased
* Added `Strip`, `Table` and `DatePicker` ([#963](https://github.com/emilk/egui/pull/963)).
* MSRV (Minimum Supported Rust Version) is now `1.60.0` ([#1467](https://github.com/emilk/egui/pull/1467)).
* Renamed feature "persistence" to "serde" ([#1540](https://github.com/emilk/egui/pull/1540)).
## 0.17.0 - 2022-02-22

View File

@@ -26,14 +26,13 @@ all-features = true
[features]
default = []
# Support loading svg images
svg = ["resvg", "tiny-skia", "usvg"]
# Datepicker widget
datepicker = ["chrono"]
# Persistence
persistence = ["serde"]
serde = ["dep:serde"]
# Support loading svg images
svg = ["resvg", "tiny-skia", "usvg"]
# Log warnings using `tracing` crate
tracing = ["dep:tracing", "egui/tracing"]
@@ -57,7 +56,7 @@ resvg = { version = "0.22", optional = true }
tiny-skia = { version = "0.6", optional = true }
usvg = { version = "0.22", optional = true }
# feature "persistence":
# feature "serde":
serde = { version = "1", features = ["derive"], optional = true }
# feature "tracing"

View File

@@ -3,7 +3,7 @@ use chrono::{Date, Utc};
use egui::{Area, Button, Frame, Key, Order, RichText, Ui, Widget};
#[derive(Default, Clone)]
#[cfg_attr(feature = "persistence", derive(serde::Deserialize, serde::Serialize))]
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
pub(crate) struct DatePickerButtonState {
pub picker_visible: bool,
}

View File

@@ -4,7 +4,7 @@ use chrono::{Date, Datelike, NaiveDate, Utc, Weekday};
use egui::{Align, Button, Color32, ComboBox, Direction, Id, Layout, RichText, Ui, Vec2};
#[derive(Default, Clone)]
#[cfg_attr(feature = "persistence", derive(serde::Deserialize, serde::Serialize))]
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
struct DatePickerPopupState {
year: i32,
month: u32,