Skip to content

Commit c288138

Browse files
committed
gui: update to egui 0.31
1 parent d8aec26 commit c288138

File tree

5 files changed

+18
-8
lines changed

5 files changed

+18
-8
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ clap_complete = "4.5"
2525
crossbeam = "0.8"
2626
dirs = "6.0"
2727
dunce = "1.0"
28-
eframe = "0.30"
29-
egui = "0.30"
30-
egui_extras = "0.30"
28+
eframe = "0.31"
29+
egui = "0.31"
30+
egui_extras = "0.31"
3131
function_name = "0.3.0"
3232
fuzzy-matcher = "0.3.7"
3333
glob = "0.3"

deny.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ allow = [
1919
"MPL-2.0",
2020
# indexmap -> hashbrown
2121
"Unicode-3.0",
22+
# egui (fonts)
23+
"Ubuntu-font-1.0",
2224
# egui
2325
"Zlib",
2426
]

doc/src/changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ their changes.
3333

3434
- The `yaml-rust2` dependency was upgraded to v0.10.
3535

36+
- The `egui` dependency was upgraded to v0.31.
37+
3638
**Documentation**:
3739

3840
- Windows support was improved in `v1.10.1` to the point where we can now consider

gui/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,9 @@ where
251251
text_field.replace_with(match_result);
252252
}
253253
state.selected_index = None;
254-
text_response.changed = true;
254+
text_response
255+
.flags
256+
.set(egui::response::Flags::CHANGED, true);
255257
}
256258
egui::popup::popup_below_widget(
257259
ui,

gui/src/main.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -777,10 +777,12 @@ impl GardenApp<'_> {
777777
ui.label("Click to copy path. Right-click to copy the tree name.");
778778
});
779779
if copy_button.clicked() {
780-
ui.output_mut(|output| output.copied_text = path.to_string());
780+
let copy_text = egui::OutputCommand::CopyText(path.to_string());
781+
ui.output_mut(|output| output.commands.push(copy_text));
781782
}
782783
if copy_button.secondary_clicked() {
783-
ui.output_mut(|output| output.copied_text = tree_ctx.tree.to_string());
784+
let copy_text = egui::OutputCommand::CopyText(tree_ctx.tree.to_string());
785+
ui.output_mut(|output| output.commands.push(copy_text));
784786
}
785787
ui.monospace(&tree_ctx.tree);
786788
},
@@ -832,7 +834,8 @@ impl GardenApp<'_> {
832834
if ui.monospace(path).on_hover_ui(|ui| {
833835
ui.label("Right-click to copy path.");
834836
}).secondary_clicked() {
835-
ui.output_mut(|output| output.copied_text = path.to_string());
837+
let copy_text = eframe::egui::OutputCommand::CopyText(path.to_string());
838+
ui.output_mut(|output| output.commands.push(copy_text));
836839
}
837840
} else if ui.label(
838841
egui::RichText::new(path)
@@ -841,7 +844,8 @@ impl GardenApp<'_> {
841844
).on_hover_ui(|ui| {
842845
ui.label("Right-click to copy path.");
843846
}).secondary_clicked() {
844-
ui.output_mut(|output| output.copied_text = path.to_string());
847+
let copy_text = eframe::egui::OutputCommand::CopyText(path.to_string());
848+
ui.output_mut(|output| output.commands.push(copy_text));
845849
}
846850
},
847851
);

0 commit comments

Comments
 (0)