diff --git a/crates/op-host-native/src/widget_host/press_helpers.rs b/crates/op-host-native/src/widget_host/press_helpers.rs index 54b63a23f..f7755f65b 100644 --- a/crates/op-host-native/src/widget_host/press_helpers.rs +++ b/crates/op-host-native/src/widget_host/press_helpers.rs @@ -3,6 +3,7 @@ //! agent-settings modal press dispatcher. use super::WidgetHostNative; +use op_editor_ui::util::format_panel_number; use op_editor_ui::Point2D; fn create_initial_size_for_tool(tool: op_editor_core::Tool) -> (f64, f64) { @@ -843,14 +844,6 @@ pub(in crate::widget_host) fn property_focus_initial( } } -fn format_panel_number(value: f32) -> String { - if value.fract().abs() < f32::EPSILON { - format!("{}", value.round() as i32) - } else { - format!("{value:.2}") - } -} - /// Translate a shell-core `ColorTarget` into op-editor-core's — used /// by `press.rs`'s `OpenColorPicker` branch. pub(in crate::widget_host) fn color_target(