Skip to content

Commit

Permalink
Fix comments line and remove serialize/deserialize on WindowAction
Browse files Browse the repository at this point in the history
  • Loading branch information
Norlock committed Jul 17, 2024
1 parent 6d5e2ac commit 6f8437d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/egui/src/containers/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use std::sync::Arc;
use crate::collapsing_header::CollapsingState;
use crate::*;
use epaint::*;
use serde::{Deserialize, Serialize};

use super::*;

Expand Down Expand Up @@ -46,14 +45,16 @@ pub struct Window<'open> {
fade_out: bool,
}

#[derive(Debug, Clone, Copy, Deserialize, Serialize)]
#[derive(Debug, Clone, Copy)]
pub enum WindowAction {
Expand,
Collapse,
Show,
Hide,

/// Toggles between show and hide
ToggleShow,

/// Toggles between expand and collapse
ToggleExpand,
}
Expand Down
1 change: 1 addition & 0 deletions crates/egui_demo_lib/src/demo/demo_app_windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ fn set_open(open: &mut BTreeSet<String>, key: &'static str, is_open: bool) {
#[cfg_attr(feature = "serde", serde(default))]
pub struct DemoWindows {
about_is_open: bool,
#[serde(skip)]
about_window_action: Option<WindowAction>,
about: About,
demos: Demos,
Expand Down

0 comments on commit 6f8437d

Please sign in to comment.