clean up some compiler warnings

This commit is contained in:
Skyler Lehmkuhl
2025-12-03 06:39:26 -05:00
parent 346baac840
commit c35b7a31de
10 changed files with 76 additions and 50 deletions
@@ -1093,7 +1093,7 @@ impl AssetLibraryPane {
// Use egui's built-in ScrollArea for scrolling
let scroll_area_rect = rect;
ui.allocate_ui_at_rect(scroll_area_rect, |ui| {
ui.allocate_new_ui(egui::UiBuilder::new().max_rect(scroll_area_rect), |ui| {
egui::ScrollArea::vertical()
.id_salt(("asset_list_scroll", path))
.auto_shrink([false, false])
@@ -1423,7 +1423,7 @@ impl AssetLibraryPane {
let total_height = GRID_SPACING + rows as f32 * (item_height + GRID_SPACING);
// Use egui's built-in ScrollArea for scrolling
ui.allocate_ui_at_rect(rect, |ui| {
ui.allocate_new_ui(egui::UiBuilder::new().max_rect(rect), |ui| {
egui::ScrollArea::vertical()
.id_salt(("asset_grid_scroll", path))
.auto_shrink([false, false])
@@ -829,7 +829,7 @@ impl egui_wgpu::CallbackTrait for VelloCallback {
// 7. Draw path drawing preview
if let lightningbeam_core::tool::ToolState::DrawingPath { ref points, .. } = self.tool_state {
use vello::kurbo::{BezPath, Point};
use vello::kurbo::BezPath;
if points.len() >= 2 {
// Build a simple line path from the raw points for preview
@@ -1175,15 +1175,15 @@ impl egui_wgpu::CallbackTrait for VelloCallback {
// Copy the pixel from texture to staging buffer
encoder.copy_texture_to_buffer(
wgpu::ImageCopyTexture {
wgpu::TexelCopyTextureInfo {
texture,
mip_level: 0,
origin: wgpu::Origin3d { x: tex_x, y: tex_y, z: 0 },
aspect: wgpu::TextureAspect::All,
},
wgpu::ImageCopyBuffer {
wgpu::TexelCopyBufferInfo {
buffer: &staging_buffer,
layout: wgpu::ImageDataLayout {
layout: wgpu::TexelCopyBufferLayout {
offset: 0,
bytes_per_row: Some(bytes_per_row),
rows_per_image: Some(1),
@@ -1554,7 +1554,6 @@ impl StagePane {
use std::collections::HashMap;
// Separate shape instances from clip instances
use lightningbeam_core::object::Transform;
let mut shape_instance_positions = HashMap::new();
let mut clip_instance_transforms = HashMap::new();
@@ -1795,7 +1794,7 @@ impl StagePane {
// Create and execute action immediately
let action = AddShapeAction::new(active_layer_id, shape, object);
shared.action_executor.execute(Box::new(action));
let _ = shared.action_executor.execute(Box::new(action));
// Clear tool state to stop preview rendering
*shared.tool_state = ToolState::Idle;
@@ -1923,7 +1922,7 @@ impl StagePane {
// Create and execute action immediately
let action = AddShapeAction::new(active_layer_id, shape, object);
shared.action_executor.execute(Box::new(action));
let _ = shared.action_executor.execute(Box::new(action));
// Clear tool state to stop preview rendering
*shared.tool_state = ToolState::Idle;
@@ -2015,7 +2014,7 @@ impl StagePane {
// Create and execute action immediately
let action = AddShapeAction::new(active_layer_id, shape, object);
shared.action_executor.execute(Box::new(action));
let _ = shared.action_executor.execute(Box::new(action));
// Clear tool state to stop preview rendering
*shared.tool_state = ToolState::Idle;
@@ -2106,7 +2105,7 @@ impl StagePane {
// Create and execute action immediately
let action = AddShapeAction::new(active_layer_id, shape, object);
shared.action_executor.execute(Box::new(action));
let _ = shared.action_executor.execute(Box::new(action));
// Clear tool state to stop preview rendering
*shared.tool_state = ToolState::Idle;
@@ -2390,7 +2389,7 @@ impl StagePane {
// Create and execute action immediately
let action = AddShapeAction::new(active_layer_id, shape, object);
shared.action_executor.execute(Box::new(action));
let _ = shared.action_executor.execute(Box::new(action));
}
}
@@ -2449,7 +2448,7 @@ impl StagePane {
2.0, // tolerance - could be made configurable
lightningbeam_core::gap_handling::GapHandlingMode::BridgeSegment,
);
shared.action_executor.execute(Box::new(action));
let _ = shared.action_executor.execute(Box::new(action));
println!("Paint bucket action executed");
}
}
@@ -3937,7 +3936,6 @@ impl StagePane {
if delta.x.abs() > 0.01 || delta.y.abs() > 0.01 {
if let Some(active_layer_id) = shared.active_layer_id {
use std::collections::HashMap;
use lightningbeam_core::object::Transform;
let mut shape_instance_positions = HashMap::new();
let mut clip_instance_transforms = HashMap::new();
@@ -4273,7 +4271,7 @@ impl PaneRenderer for StagePane {
let mut add_layer_action = lightningbeam_core::actions::AddLayerAction::new(new_layer);
// Execute immediately to get the layer ID
add_layer_action.execute(shared.action_executor.document_mut());
let _ = add_layer_action.execute(shared.action_executor.document_mut());
target_layer_id = add_layer_action.created_layer_id();
// Update active layer to the new layer
@@ -165,7 +165,7 @@ impl TimelinePane {
let layers: Vec<_> = document.root.children.iter().rev().collect();
let layer = layers.get(hovered_layer_index)?;
let layer_data = layer.layer();
let _layer_data = layer.layer();
let clip_instances = match layer {
lightningbeam_core::layer::AnyLayer::Vector(vl) => &vl.clip_instances,
@@ -848,7 +848,7 @@ impl TimelinePane {
// Mute button
// TODO: Replace with SVG icon (volume-up-fill.svg / volume-mute.svg)
let mute_response = ui.allocate_ui_at_rect(mute_button_rect, |ui| {
let mute_response = ui.allocate_new_ui(egui::UiBuilder::new().max_rect(mute_button_rect), |ui| {
let mute_text = if is_muted { "🔇" } else { "🔊" };
let button = egui::Button::new(mute_text)
.fill(if is_muted {
@@ -872,7 +872,7 @@ impl TimelinePane {
// Solo button
// TODO: Replace with SVG headphones icon
let solo_response = ui.allocate_ui_at_rect(solo_button_rect, |ui| {
let solo_response = ui.allocate_new_ui(egui::UiBuilder::new().max_rect(solo_button_rect), |ui| {
let button = egui::Button::new("🎧")
.fill(if is_soloed {
egui::Color32::from_rgba_unmultiplied(100, 200, 100, 100)
@@ -895,7 +895,7 @@ impl TimelinePane {
// Lock button
// TODO: Replace with SVG lock/lock-open icons
let lock_response = ui.allocate_ui_at_rect(lock_button_rect, |ui| {
let lock_response = ui.allocate_new_ui(egui::UiBuilder::new().max_rect(lock_button_rect), |ui| {
let lock_text = if is_locked { "🔒" } else { "🔓" };
let button = egui::Button::new(lock_text)
.fill(if is_locked {
@@ -918,7 +918,7 @@ impl TimelinePane {
}
// Volume slider (nonlinear: 0-70% slider = 0-100% volume, 70-100% slider = 100-200% volume)
let volume_response = ui.allocate_ui_at_rect(volume_slider_rect, |ui| {
let volume_response = ui.allocate_new_ui(egui::UiBuilder::new().max_rect(volume_slider_rect), |ui| {
// Map volume (0.0-2.0) to slider position (0.0-1.0)
let slider_value = if current_volume <= 1.0 {
// 0.0-1.0 volume maps to 0.0-0.7 slider (70%)
@@ -1086,7 +1086,7 @@ impl TimelinePane {
// Instance positioned on the layer's timeline using timeline_start
// The layer itself has start_time, so the absolute timeline position is:
// layer.start_time + instance.timeline_start
let layer_data = layer.layer();
let _layer_data = layer.layer();
let mut instance_start = clip_instance.timeline_start;
// Apply drag offset preview for selected clips with snapping
@@ -1428,7 +1428,7 @@ impl TimelinePane {
if clicked_layer_index < layer_count {
let layers: Vec<_> = document.root.children.iter().rev().collect();
if let Some(layer) = layers.get(clicked_layer_index) {
let layer_data = layer.layer();
let _layer_data = layer.layer();
// Get clip instances for this layer
let clip_instances = match layer {
@@ -1605,7 +1605,7 @@ impl TimelinePane {
// Iterate through all layers to find selected clip instances
for layer in &document.root.children {
let layer_id = layer.id();
let layer_data = layer.layer();
let _layer_data = layer.layer();
let clip_instances = match layer {
lightningbeam_core::layer::AnyLayer::Vector(vl) => {