Skip to content

Commit

Permalink
Merge branch 'main' into jleibs/notebook_asset_plumbing
Browse files Browse the repository at this point in the history
  • Loading branch information
jprochazk authored Jul 1, 2024
2 parents 10d28a8 + a9b8142 commit 8d1213b
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 38 deletions.
20 changes: 10 additions & 10 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1553,7 +1553,7 @@ checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30"
[[package]]
name = "ecolor"
version = "0.27.2"
source = "git+https://github.com/emilk/egui.git?rev=3b9f964aed36bc0028fa55c60cd0a1cd0179a13e#3b9f964aed36bc0028fa55c60cd0a1cd0179a13e"
source = "git+https://github.com/emilk/egui.git?rev=d4e8966aac9347965f8d02310ecf2c9f23bb9bbc#d4e8966aac9347965f8d02310ecf2c9f23bb9bbc"
dependencies = [
"bytemuck",
"emath",
Expand All @@ -1563,7 +1563,7 @@ dependencies = [
[[package]]
name = "eframe"
version = "0.27.2"
source = "git+https://github.com/emilk/egui.git?rev=3b9f964aed36bc0028fa55c60cd0a1cd0179a13e#3b9f964aed36bc0028fa55c60cd0a1cd0179a13e"
source = "git+https://github.com/emilk/egui.git?rev=d4e8966aac9347965f8d02310ecf2c9f23bb9bbc#d4e8966aac9347965f8d02310ecf2c9f23bb9bbc"
dependencies = [
"ahash",
"bytemuck",
Expand Down Expand Up @@ -1599,7 +1599,7 @@ dependencies = [
[[package]]
name = "egui"
version = "0.27.2"
source = "git+https://github.com/emilk/egui.git?rev=3b9f964aed36bc0028fa55c60cd0a1cd0179a13e#3b9f964aed36bc0028fa55c60cd0a1cd0179a13e"
source = "git+https://github.com/emilk/egui.git?rev=d4e8966aac9347965f8d02310ecf2c9f23bb9bbc#d4e8966aac9347965f8d02310ecf2c9f23bb9bbc"
dependencies = [
"accesskit",
"ahash",
Expand All @@ -1616,7 +1616,7 @@ dependencies = [
[[package]]
name = "egui-wgpu"
version = "0.27.2"
source = "git+https://github.com/emilk/egui.git?rev=3b9f964aed36bc0028fa55c60cd0a1cd0179a13e#3b9f964aed36bc0028fa55c60cd0a1cd0179a13e"
source = "git+https://github.com/emilk/egui.git?rev=d4e8966aac9347965f8d02310ecf2c9f23bb9bbc#d4e8966aac9347965f8d02310ecf2c9f23bb9bbc"
dependencies = [
"ahash",
"bytemuck",
Expand All @@ -1635,7 +1635,7 @@ dependencies = [
[[package]]
name = "egui-winit"
version = "0.27.2"
source = "git+https://github.com/emilk/egui.git?rev=3b9f964aed36bc0028fa55c60cd0a1cd0179a13e#3b9f964aed36bc0028fa55c60cd0a1cd0179a13e"
source = "git+https://github.com/emilk/egui.git?rev=d4e8966aac9347965f8d02310ecf2c9f23bb9bbc#d4e8966aac9347965f8d02310ecf2c9f23bb9bbc"
dependencies = [
"accesskit_winit",
"ahash",
Expand Down Expand Up @@ -1675,7 +1675,7 @@ dependencies = [
[[package]]
name = "egui_extras"
version = "0.27.2"
source = "git+https://github.com/emilk/egui.git?rev=3b9f964aed36bc0028fa55c60cd0a1cd0179a13e#3b9f964aed36bc0028fa55c60cd0a1cd0179a13e"
source = "git+https://github.com/emilk/egui.git?rev=d4e8966aac9347965f8d02310ecf2c9f23bb9bbc#d4e8966aac9347965f8d02310ecf2c9f23bb9bbc"
dependencies = [
"ahash",
"egui",
Expand All @@ -1691,7 +1691,7 @@ dependencies = [
[[package]]
name = "egui_glow"
version = "0.27.2"
source = "git+https://github.com/emilk/egui.git?rev=3b9f964aed36bc0028fa55c60cd0a1cd0179a13e#3b9f964aed36bc0028fa55c60cd0a1cd0179a13e"
source = "git+https://github.com/emilk/egui.git?rev=d4e8966aac9347965f8d02310ecf2c9f23bb9bbc#d4e8966aac9347965f8d02310ecf2c9f23bb9bbc"
dependencies = [
"ahash",
"bytemuck",
Expand All @@ -1709,7 +1709,7 @@ dependencies = [
[[package]]
name = "egui_plot"
version = "0.27.2"
source = "git+https://github.com/emilk/egui.git?rev=3b9f964aed36bc0028fa55c60cd0a1cd0179a13e#3b9f964aed36bc0028fa55c60cd0a1cd0179a13e"
source = "git+https://github.com/emilk/egui.git?rev=d4e8966aac9347965f8d02310ecf2c9f23bb9bbc#d4e8966aac9347965f8d02310ecf2c9f23bb9bbc"
dependencies = [
"ahash",
"egui",
Expand Down Expand Up @@ -1752,7 +1752,7 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
[[package]]
name = "emath"
version = "0.27.2"
source = "git+https://github.com/emilk/egui.git?rev=3b9f964aed36bc0028fa55c60cd0a1cd0179a13e#3b9f964aed36bc0028fa55c60cd0a1cd0179a13e"
source = "git+https://github.com/emilk/egui.git?rev=d4e8966aac9347965f8d02310ecf2c9f23bb9bbc#d4e8966aac9347965f8d02310ecf2c9f23bb9bbc"
dependencies = [
"bytemuck",
"serde",
Expand Down Expand Up @@ -1853,7 +1853,7 @@ dependencies = [
[[package]]
name = "epaint"
version = "0.27.2"
source = "git+https://github.com/emilk/egui.git?rev=3b9f964aed36bc0028fa55c60cd0a1cd0179a13e#3b9f964aed36bc0028fa55c60cd0a1cd0179a13e"
source = "git+https://github.com/emilk/egui.git?rev=d4e8966aac9347965f8d02310ecf2c9f23bb9bbc#d4e8966aac9347965f8d02310ecf2c9f23bb9bbc"
dependencies = [
"ab_glyph",
"ahash",
Expand Down
14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -481,13 +481,13 @@ missing_errors_doc = "allow"
# As a last resport, patch with a commit to our own repository.
# ALWAYS document what PR the commit hash is part of, or when it was merged into the upstream trunk.

ecolor = { git = "https://github.com/emilk/egui.git", rev = "3b9f964aed36bc0028fa55c60cd0a1cd0179a13e" } # egui master 2024-06-28
eframe = { git = "https://github.com/emilk/egui.git", rev = "3b9f964aed36bc0028fa55c60cd0a1cd0179a13e" } # egui master 2024-06-28
egui = { git = "https://github.com/emilk/egui.git", rev = "3b9f964aed36bc0028fa55c60cd0a1cd0179a13e" } # egui master 2024-06-28
egui_extras = { git = "https://github.com/emilk/egui.git", rev = "3b9f964aed36bc0028fa55c60cd0a1cd0179a13e" } # egui master 2024-06-28
egui_plot = { git = "https://github.com/emilk/egui.git", rev = "3b9f964aed36bc0028fa55c60cd0a1cd0179a13e" } # egui master 2024-06-28
egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "3b9f964aed36bc0028fa55c60cd0a1cd0179a13e" } # egui master 2024-06-28
emath = { git = "https://github.com/emilk/egui.git", rev = "3b9f964aed36bc0028fa55c60cd0a1cd0179a13e" } # egui master 2024-06-28
ecolor = { git = "https://github.com/emilk/egui.git", rev = "d4e8966aac9347965f8d02310ecf2c9f23bb9bbc" } # egui master 2024-06-28
eframe = { git = "https://github.com/emilk/egui.git", rev = "d4e8966aac9347965f8d02310ecf2c9f23bb9bbc" } # egui master 2024-06-28
egui = { git = "https://github.com/emilk/egui.git", rev = "d4e8966aac9347965f8d02310ecf2c9f23bb9bbc" } # egui master 2024-06-28
egui_extras = { git = "https://github.com/emilk/egui.git", rev = "d4e8966aac9347965f8d02310ecf2c9f23bb9bbc" } # egui master 2024-06-28
egui_plot = { git = "https://github.com/emilk/egui.git", rev = "d4e8966aac9347965f8d02310ecf2c9f23bb9bbc" } # egui master 2024-06-28
egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "d4e8966aac9347965f8d02310ecf2c9f23bb9bbc" } # egui master 2024-06-28
emath = { git = "https://github.com/emilk/egui.git", rev = "d4e8966aac9347965f8d02310ecf2c9f23bb9bbc" } # egui master 2024-06-28

# Useful while developing:
# ecolor = { path = "../../egui/crates/ecolor" }
Expand Down
9 changes: 4 additions & 5 deletions crates/re_edit_ui/src/datatype_editors/float_drag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ fn edit_f32_float_raw_impl(
let speed = (*value * 0.01).at_least(0.001);
ui.add(
egui::DragValue::new(value)
.clamp_range(range) // TODO(#6633): Don't change incoming values
.clamp_to_range(false)
.range(range)
.speed(speed),
)
}
Expand All @@ -55,12 +56,10 @@ pub fn edit_f32_zero_to_one(

/// Non monomorphized implementation of [`edit_f32_zero_to_one`].
fn edit_f32_zero_to_one_raw(ui: &mut egui::Ui, value: &mut f32) -> egui::Response {
// TODO(#6633): Pre-clamp the value, so the ui won't change the value if there's no interaction.
// This means we won't see the real value in the ui if it's outside the range.
*value = value.clamp(0.0, 1.0);
ui.add(
egui::DragValue::new(value)
.clamp_range(0.0..=1.0)
.clamp_to_range(false)
.range(0.0..=1.0)
.speed(0.005)
.fixed_decimals(2),
)
Expand Down
6 changes: 4 additions & 2 deletions crates/re_edit_ui/src/range1d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ pub fn edit_range1d(
ui.label("Min:");
let response_min = ui.add(
egui::DragValue::new(min)
.clamp_range(f64::NEG_INFINITY..=*max)
.clamp_to_range(false)
.range(f64::NEG_INFINITY..=*max)
.speed(speed),
);
ui.label("Max:");
let response_max = ui.add(
egui::DragValue::new(max)
.clamp_range(*min..=f64::INFINITY)
.clamp_to_range(false)
.range(*min..=f64::INFINITY)
.speed(speed),
);

Expand Down
18 changes: 12 additions & 6 deletions crates/re_edit_ui/src/visual_bounds2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ pub fn multiline_edit_visual_bounds2d(
.horizontal_centered(|ui| {
let response_min = ui.add(
egui::DragValue::new(x_range_start)
.clamp_range(f64::MIN..=*x_range_end)
.clamp_to_range(false)
.range(f64::MIN..=*x_range_end)
.max_decimals(2)
.speed(speed),
);
Expand All @@ -31,7 +32,8 @@ pub fn multiline_edit_visual_bounds2d(

let response_max = ui.add(
egui::DragValue::new(x_range_end)
.clamp_range(*x_range_start..=f64::MAX)
.clamp_to_range(false)
.range(*x_range_start..=f64::MAX)
.max_decimals(2)
.speed(speed),
);
Expand All @@ -55,7 +57,8 @@ pub fn multiline_edit_visual_bounds2d(
.horizontal_centered(|ui| {
let response_min = ui.add(
egui::DragValue::new(y_range_start)
.clamp_range(f64::MIN..=*y_range_end)
.clamp_to_range(false)
.range(f64::MIN..=*y_range_end)
.max_decimals(2)
.speed(speed),
);
Expand All @@ -64,7 +67,8 @@ pub fn multiline_edit_visual_bounds2d(

let response_max = ui.add(
egui::DragValue::new(y_range_end)
.clamp_range(*y_range_start..=f64::MAX)
.clamp_to_range(false)
.range(*y_range_start..=f64::MAX)
.max_decimals(2)
.speed(speed),
);
Expand Down Expand Up @@ -102,14 +106,16 @@ pub fn singleline_edit_visual_bounds2d(

let response_width = ui.add(
egui::DragValue::new(&mut width_edit)
.clamp_range(0.001..=f64::MAX)
.clamp_to_range(false)
.range(0.001..=f64::MAX)
.max_decimals(1)
.speed(speed_func(width)),
);
ui.label("×");
let response_height = ui.add(
egui::DragValue::new(&mut height_edit)
.clamp_range(0.001..=f64::MAX)
.clamp_to_range(false)
.range(0.001..=f64::MAX)
.max_decimals(1)
.speed(speed_func(height)),
);
Expand Down
4 changes: 2 additions & 2 deletions crates/re_selection_panel/src/visible_time_range_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ impl TimelineSpec {

ui.add(
egui::DragValue::new(&mut value.0)
.clamp_range(time_range)
.range(time_range)
.speed(speed),
)
}
Expand Down Expand Up @@ -757,7 +757,7 @@ impl TimelineSpec {

let drag_value_response = ui.add(
egui::DragValue::new(&mut time_unit)
.clamp_range(time_range)
.range(time_range)
.speed(speed)
.suffix(self.unit_symbol),
);
Expand Down
2 changes: 1 addition & 1 deletion crates/re_space_view_spatial/src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ fn size_ui(
.add(
egui::DragValue::new(&mut displayed_size)
.speed(drag_speed)
.clamp_range(clamp_range)
.range(clamp_range)
.max_decimals(4),
)
.changed()
Expand Down
2 changes: 1 addition & 1 deletion crates/re_space_view_tensor/src/space_view_class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ fn selectors_ui(
if ui
.add(
egui::DragValue::new(selector_value)
.clamp_range(0..=size - 1)
.range(0..=size - 1)
.speed(0.5),
)
.on_hover_text(format!(
Expand Down
2 changes: 1 addition & 1 deletion crates/re_time_panel/src/time_control_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl TimeControlUi {
egui::DragValue::new(&mut fps)
.suffix(" FPS")
.speed(1)
.clamp_range(0.0..=f32::INFINITY),
.range(0.0..=f32::INFINITY),
)
.on_hover_text("Frames per second");
});
Expand Down
7 changes: 4 additions & 3 deletions lychee.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,12 @@ exclude = [

# Not accessible from CI.
'.github/workflows/.*.yml', # GitHub action workflows cause issues on CI.
'https://9p.io/sys/doc/lexnames.html', # Works locally but on CI we get: `Failed: Network error: error:0A000152:SSL routines:final_renegotiate:unsafe legacy renegotiation disabled:ssl/statem/extensions.c:946:`
'https://pixabay.com/photos/brother-sister-girl-family-boy-977170/', # Gives 403 forbidden on CI.
'https://stackoverflow.com/.', # Stackoverflow links are no longer accessible from CI.
'https://www.tensorflow.org/', # tensorflow.org apparently blocks CI.
'https://9p.io/sys/doc/lexnames.html', # Works locally but on ci we get: `Failed: Network error: error:0A000152:SSL routines:final_renegotiate:unsafe legacy renegotiation disabled:ssl/statem/extensions.c:946:`
'https://vimeo.com/', # Gives 403 forbidden on CI.
'https://www.reddit.com/', # Gives 403 forbidden on CI.
'https://pixabay.com/photos/brother-sister-girl-family-boy-977170/', # Gives 403 forbidden on CI.
'https://www.tensorflow.org/', # tensorflow.org apparently blocks CI.

# Need GitHub login.
'https://github.com/rerun-io/landing',
Expand Down

0 comments on commit 8d1213b

Please sign in to comment.