mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-12 21:34:11 +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
9eb11f3eee
commit
cd84bd903a
2 files changed
+4
-4
No files matched your search
@@ -3305,7 +3305,7 @@ const FORMAT_SECTIONS: &[(&str, &str)] = &[
|
||||
fn info_icon(ui: &mut egui::Ui, tip: &str) {
|
||||
let (r, resp) = ui.allocate_exact_size(egui::vec2(16.0, 16.0), egui::Sense::hover());
|
||||
crate::icons::paint(ui.painter(), r, "info", crate::theme::Tokens::get(ui.ctx()).icon);
|
||||
resp.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Label, true, tip));
|
||||
resp.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Label, true, tip));
|
||||
resp.on_hover_text(tip);
|
||||
}
|
||||
|
||||
@@ -3383,7 +3383,7 @@ fn format_settings(app: &mut DesignApp, ctx: &egui::Context, d: &mut Dialog) {
|
||||
let find = fd.s("for") == "find";
|
||||
let popup_open = egui::Popup::is_any_open(ctx);
|
||||
let mut result = None;
|
||||
let host = egui::Id::new("format_settings");
|
||||
let host = egui::Id::unique("format_settings");
|
||||
crate::modal_drag::modal(ctx, host, host).backdrop_color(egui::Color32::TRANSPARENT).show(ctx, |ui| {
|
||||
let title_top = ui.cursor().top();
|
||||
let title = if find { "Find Format Settings" } else { "Change Format Settings" };
|
||||
|
||||
@@ -3542,7 +3542,7 @@ fn find_change_gives_the_found_text_a_change_format() {
|
||||
}
|
||||
let mut h = Harness::builder().with_size(egui::vec2(1200.0, 900.0)).build_ui_state(
|
||||
|ui, app: &mut DesignApp| {
|
||||
let key = egui::Id::new("change_format_test_fonts");
|
||||
let key = egui::Id::unique("change_format_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));
|
||||
@@ -3632,7 +3632,7 @@ fn find_format_finds_only_text_with_it() {
|
||||
}
|
||||
let mut h = Harness::builder().with_size(egui::vec2(1200.0, 900.0)).build_ui_state(
|
||||
|ui, app: &mut DesignApp| {
|
||||
let key = egui::Id::new("find_format_test_fonts");
|
||||
let key = egui::Id::unique("find_format_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