diff --git a/tools/packet_inspector/src/app.rs b/tools/packet_inspector/src/app.rs index 0646db2ef..87e4dc31d 100644 --- a/tools/packet_inspector/src/app.rs +++ b/tools/packet_inspector/src/app.rs @@ -58,14 +58,18 @@ impl GuiApp { let ctx = cc.egui_ctx.clone(); // Default Application Layout - let mut tree: DockState> = DockState::new(vec![Box::new(connection::Connection::new())]); + let mut tree: DockState> = + DockState::new(vec![Box::new(connection::Connection::new())]); - let [a, b] = tree.main_surface_mut().split_right( NodeIndex::root(), + let [a, b] = tree.main_surface_mut().split_right( + NodeIndex::root(), 0.3, vec![Box::new(packet_list::PacketList::new())], ); - let [_, _] = tree.main_surface_mut().split_below(a, 0.25, vec![Box::new(filter::Filter::new())]); + let [_, _] = + tree.main_surface_mut() + .split_below(a, 0.25, vec![Box::new(filter::Filter::new())]); let [_, _] = tree.main_surface_mut().split_below( b, 0.5, diff --git a/tools/packet_inspector/src/app/packet_list.rs b/tools/packet_inspector/src/app/packet_list.rs index 2d675d8bc..574e5f963 100644 --- a/tools/packet_inspector/src/app/packet_list.rs +++ b/tools/packet_inspector/src/app/packet_list.rs @@ -1,7 +1,6 @@ use eframe::epaint::PathShape; use egui::{ - Color32, Pos2, Rect, Response, Rgba, Sense, Shape, Stroke, TextStyle, Ui, Vec2, - WidgetText, + Color32, Pos2, Rect, Response, Rgba, Sense, Shape, Stroke, TextStyle, Ui, Vec2, WidgetText, }; use packet_inspector::Packet; use valence_protocol::PacketSide; @@ -148,7 +147,8 @@ fn draw_packet_widget(ui: &mut Ui, packet: &Packet, selected: bool) -> Response }; if ui.is_rect_visible(rect) { - ui.painter().rect(rect, 0.0, fill, Stroke::new(1.0, Rgba::BLACK)); + ui.painter() + .rect(rect, 0.0, fill, Stroke::new(1.0, Rgba::BLACK)); let shape = get_triangle(packet.side, &rect); ui.painter().add(Shape::Path(shape)); diff --git a/tools/packet_inspector/src/tri_checkbox.rs b/tools/packet_inspector/src/tri_checkbox.rs index 5835c3896..7b57a3cff 100644 --- a/tools/packet_inspector/src/tri_checkbox.rs +++ b/tools/packet_inspector/src/tri_checkbox.rs @@ -96,7 +96,6 @@ impl<'a> Widget for TriCheckbox<'a> { visuals.bg_stroke, )); - match *checked { TriCheckboxState::Enabled => { // Check mark: @@ -128,7 +127,6 @@ impl<'a> Widget for TriCheckbox<'a> { ); ui.painter().galley(text_pos, text, visuals.text_color()); - } }