mirror of
https://github.com/storytold/designcraft.git
synced 2026-10-31 07:39:17 +00:00
egui 0.37: the renamed APIs in this branch's code
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e8b27c91f1
commit
2a01caf0de
2 files changed
+3
-3
No files matched your search
@@ -3075,7 +3075,7 @@ pub fn show(app: &mut DesignApp, ctx: &egui::Context) {
|
||||
style_options_preview(app, &mut d);
|
||||
}
|
||||
// A multi-line field with focus (set by the dialog this frame) takes Enter as a new line.
|
||||
let multiline = ui.ctx().data_mut(|m| m.remove_temp::<bool>(egui::Id::new(MULTILINE_FOCUS))).unwrap_or(false);
|
||||
let multiline = ui.ctx().data_mut(|m| m.remove_temp::<bool>(egui::Id::unique(MULTILINE_FOCUS))).unwrap_or(false);
|
||||
ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {
|
||||
if ui
|
||||
.add(
|
||||
|
||||
@@ -335,7 +335,7 @@ pub fn show_instructions(app: &DesignApp, ui: &mut egui::Ui, d: &mut Dialog) {
|
||||
}
|
||||
// Enter there makes a new line: the footer mustn't take it for Continue.
|
||||
if lines > 1 && resp.has_focus() {
|
||||
ui.ctx().data_mut(|m| m.insert_temp(egui::Id::new(crate::dialogs::MULTILINE_FOCUS), true));
|
||||
ui.ctx().data_mut(|m| m.insert_temp(egui::Id::unique(crate::dialogs::MULTILINE_FOCUS), true));
|
||||
}
|
||||
ui.end_row();
|
||||
}
|
||||
@@ -420,7 +420,7 @@ mod tests {
|
||||
fn harness(app: DesignApp) -> Harness<'static, DesignApp> {
|
||||
Harness::builder().with_size(egui::vec2(1100.0, 760.0)).build_ui_state(
|
||||
|ui, app: &mut DesignApp| {
|
||||
let key = egui::Id::new("package_test_fonts");
|
||||
let key = egui::Id::unique("package_test_fonts");
|
||||
if ui.data(|d| d.get_temp::<bool>(key)).is_none() {
|
||||
crate::theme::install_fonts(ui.ctx(), "");
|
||||
ui.data_mut(|d| d.insert_temp(key, true));
|
||||
|
||||
Reference in new issue
Block a user