Browse Source

Replace some `...` with `…`

pull/4577/head
Emil Ernerfeldt 5 months ago
parent
commit
5eee463851
  1. 2
      crates/egui/src/style.rs
  2. 6
      crates/egui_demo_app/src/backend_panel.rs
  3. 10
      crates/egui_demo_lib/src/demo/context_menu.rs
  4. 2
      crates/egui_plot/src/items/values.rs
  5. 4
      examples/user_attention/src/main.rs

2
crates/egui/src/style.rs

@ -232,7 +232,7 @@ pub struct Style {
}
impl Style {
// TODO(emilk): rename style.interact() to maybe... `style.interactive` ?
// TODO(emilk): rename style.interact() to maybe `style.interactive` ?
/// Use this style for interactive things.
/// Note that you must already have a response,
/// i.e. you must allocate space and interact BEFORE painting the widget!

6
crates/egui_demo_app/src/backend_panel.rs

@ -154,10 +154,10 @@ impl BackendPanel {
.button("Wait 2s, then request repaint after another 3s")
.clicked()
{
log::info!("Waiting 2s before requesting repaint...");
log::info!("Waiting 2s before requesting repaint");
let ctx = ui.ctx().clone();
call_after_delay(std::time::Duration::from_secs(2), move || {
log::info!("Request a repaint in 3s...");
log::info!("Request a repaint in 3s");
ctx.request_repaint_after(std::time::Duration::from_secs(3));
});
}
@ -298,7 +298,7 @@ fn integration_ui(ui: &mut egui::Ui, _frame: &mut eframe::Frame) {
let mut size = None;
egui::ComboBox::from_id_source("viewport-size-combo")
.selected_text("Resize to...")
.selected_text("Resize to")
.show_ui(ui, |ui| {
ui.selectable_value(
&mut size,

10
crates/egui_demo_lib/src/demo/context_menu.rs

@ -156,24 +156,24 @@ impl ContextMenus {
}
fn nested_menus(ui: &mut egui::Ui) {
if ui.button("Open...").clicked() {
if ui.button("Open").clicked() {
ui.close_menu();
}
ui.menu_button("SubMenu", |ui| {
ui.menu_button("SubMenu", |ui| {
if ui.button("Open...").clicked() {
if ui.button("Open").clicked() {
ui.close_menu();
}
let _ = ui.button("Item");
});
ui.menu_button("SubMenu", |ui| {
if ui.button("Open...").clicked() {
if ui.button("Open").clicked() {
ui.close_menu();
}
let _ = ui.button("Item");
});
let _ = ui.button("Item");
if ui.button("Open...").clicked() {
if ui.button("Open").clicked() {
ui.close_menu();
}
});
@ -182,7 +182,7 @@ impl ContextMenus {
let _ = ui.button("Item2");
let _ = ui.button("Item3");
let _ = ui.button("Item4");
if ui.button("Open...").clicked() {
if ui.button("Open").clicked() {
ui.close_menu();
}
});

2
crates/egui_plot/src/items/values.rs

@ -426,7 +426,7 @@ impl ExplicitGenerator {
/// Result of [`super::PlotItem::find_closest()`] search, identifies an element inside the item for immediate use
pub struct ClosestElem {
/// Position of hovered-over value (or bar/box-plot/...) in `PlotItem`
/// Position of hovered-over value (or bar/box-plot/) in `PlotItem`
pub index: usize,
/// Squared distance from the mouse cursor (needed to compare against other `PlotItems`, which might be nearer)

4
examples/user_attention/src/main.rs

@ -103,9 +103,9 @@ impl eframe::App for Application {
None => "Unfocus the window, fast!".to_owned(),
Some(t) => {
if let Ok(elapsed) = t.duration_since(SystemTime::now()) {
format!("Resetting attention in {} s...", elapsed.as_secs())
format!("Resetting attention in {} s", elapsed.as_secs())
} else {
"Resetting attention...".to_owned()
"Resetting attention".to_owned()
}
}
}

Loading…
Cancel
Save