Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,8 @@ resolver = "2"
publish = false

[dependencies]
kas = "0.15.0"
kas = "0.16.0"
chrono = "0.4"
env_logger = "0.11.8"
pest = "2.1"
pest_derive = "2.1"

[patch.crates-io.kas]
git = "https://github.com/kas-gui/kas.git"
rev = "4bf71367f6a57c727a689097302de40274f5830a"

[patch.crates-io.kas-text]
git = "https://github.com/kas-gui/kas-text.git"
rev = "0bc2629df690ecfd562a7bf7b6ac096ad0d8f1a9"
9 changes: 8 additions & 1 deletion src/cells.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use kas::widgets::{EditBox, EditField, EditGuard, ScrollBars};
use kas::{prelude::*, TextOrSource};
use std::collections::HashMap;
use std::fmt;
use std::ops::Range;

#[derive(Copy, Clone, Eq, PartialEq, Debug, Default, Hash)]
pub struct ColKey(u8);
Expand Down Expand Up @@ -343,7 +344,13 @@ impl DataClerk<GridIndex> for Clerk {
type Item = Cell;
type Token = Key;

fn update(&mut self, _: &mut ConfigCx<'_>, _: Id, _: &Self::Data) -> DataChanges {
fn update(
&mut self,
_: &mut ConfigCx<'_>,
_: Id,
_: Range<GridIndex>,
_: &Self::Data,
) -> DataChanges<GridIndex> {
DataChanges::Any
}

Expand Down
2 changes: 1 addition & 1 deletion src/counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ pub fn window() -> Window<()> {
Button::label_msg("&Count", Incr).map_any(),
];
let ui = ui.with_state(0).on_message(|_, count, Incr| *count += 1);
Window::new(ui, "Counter")
Window::new(ui, "Counter").escapable()
}
10 changes: 9 additions & 1 deletion src/crud.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

//! Create Read Update Delete

use std::ops::Range;

use kas::dir::Down;
use kas::view::filter::{ContainsCaseInsensitive, Filter, FilterValue, KeystrokeGuard, SetFilter};
use kas::view::{DataChanges, DataClerk, DataLen, Driver, ListView, SelectionMsg, TokenChanges};
Expand Down Expand Up @@ -128,7 +130,13 @@ impl DataClerk<usize> for EntriesClerk {
type Item = Entry;
type Token = usize;

fn update(&mut self, _: &mut ConfigCx, _: Id, filter: &Self::Data) -> DataChanges {
fn update(
&mut self,
_: &mut ConfigCx,
_: Id,
_: Range<usize>,
filter: &Self::Data,
) -> DataChanges<usize> {
// TODO(opt) determine when updates are a no-op and return DataChanges::None

self.filtered_entries = self
Expand Down
2 changes: 1 addition & 1 deletion src/flight_booker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,5 +179,5 @@ pub fn window() -> Window<()> {
cx.add_window::<()>(MessageBox::new(msg).into_window("Booker result"));
});

Window::new(ui, "Flight Booker")
Window::new(ui, "Flight Booker").escapable()
}
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fn main() -> Result<(), kas::runner::Error> {
}
}
};
let window = Window::new(ui, "7GUIs Launcher");
let window = Window::new(ui, "7GUIs Launcher").escapable();

let theme = kas::theme::FlatTheme::new();
kas::runner::Runner::with_theme(theme)
Expand Down
2 changes: 1 addition & 1 deletion src/temp_conv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ pub fn window() -> Window<()> {
"Fahrenheit",
];
let ui = Adapt::new(ui, Temperature::default()).on_message(|_, temp, msg| temp.handle(msg));
Window::new(ui, "Temperature Converter")
Window::new(ui, "Temperature Converter").escapable()
}
2 changes: 1 addition & 1 deletion src/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@ pub fn window() -> Window<()> {
cx.request_timer(TIMER_ID, TIMER_SLEEP);
});

Window::new(ui, "Timer")
Window::new(ui, "Timer").escapable()
}
Loading