diff --git a/luda-editor/new-client/src/episode_editor/speaker_selector.rs b/luda-editor/new-client/src/episode_editor/speaker_selector.rs index 6e55986ba..41340c6e0 100644 --- a/luda-editor/new-client/src/episode_editor/speaker_selector.rs +++ b/luda-editor/new-client/src/episode_editor/speaker_selector.rs @@ -86,17 +86,16 @@ impl Component for SpeakerSelector<'_> { if let Some(speakers) = speakers.as_ref() { for (speaker_id, name) in speakers { items.push(table::fixed(16.px(), |_wh, _ctx| {})); - items.push(table::fit(table::FitAlign::LeftTop, |ctx| { - ctx.add(button::TextButtonFit { - height: wh.height, + items.push(table::ratio(1, |wh, ctx| { + ctx.add(button::TextButton { + rect: wh.to_rect(), text: name.as_ref().unwrap_or(&"N/A".to_string()), text_color: Color::WHITE, stroke_color: Color::WHITE, stroke_width: 1.px(), fill_color: Color::BLACK, - side_padding: 8.px(), mouse_buttons: vec![MouseButton::Left], - on_mouse_up_in: &|_event| { + on_mouse_up_in: |_event| { select_speaker(speaker_id); }, }); @@ -105,17 +104,17 @@ impl Component for SpeakerSelector<'_> { } items.push(table::ratio(1, |_wh, _ctx| {})); - items.push(table::fit(table::FitAlign::LeftTop, |ctx| { - ctx.add(button::TextButtonFit { - height: wh.height, + // TODO: Fix table::fit + items.push(table::fixed(96.px(), |wh, ctx| { + ctx.add(button::TextButton { + rect: wh.to_rect(), text: "설정", text_color: Color::WHITE, stroke_color: Color::WHITE, stroke_width: 1.px(), fill_color: Color::BLACK, - side_padding: 8.px(), mouse_buttons: vec![MouseButton::Left], - on_mouse_up_in: &|_event| todo!(), + on_mouse_up_in: |_event| todo!(), }); }));