team-ljyzipelo

공개

선택 사각형을 반투명 파란색으로 바꿈

작성자
호시노 히나타
작성 시각
커밋
2df993b19cff18b5d988232abf0ca7e22967022c
부모
d6b5358
이 시점의 파일 보기

변경된 파일 2개

+18-3
수정experiments/rust-ui-memory-app/src/archive_screen.rs+7-1
@@ -967,7 +967,13 @@ impl ArchiveApp {
967967 );
968968 ui.painter()
969969 .with_clip_rect(clip)
970삭제: .rect_filled(rect, 0, theme::BLUE);
970추가: .rect(
971추가: rect,
972추가: 0,
973추가: theme::BLUE.gamma_multiply(0.16),
974추가: egui::Stroke::new(1.0, theme::BLUE),
975추가: egui::StrokeKind::Inside,
976추가: );
971977 }
972978 });
973979 self.list_offset = next_offset.unwrap_or(output.state.clamped_offset().y);
수정tests/rust-app-ui/explorer_selection.rs+11-2
@@ -247,7 +247,7 @@ fn explorer_double_click_opens_only_folders_and_resets_selection() {
247247}
248248
249249#[test]
250삭제: fn explorer_marquee_selects_intersections_and_ctrl_adds_with_an_opaque_blue_rectangle() {
250추가: fn explorer_marquee_selects_intersections_and_ctrl_adds_with_a_translucent_blue_rectangle() {
251251 let scratch = Folder::new();
252252 let mut s = Explorer::new(&scratch);
253253 s.click("docs", egui::Modifiers::NONE);
@@ -257,7 +257,16 @@ fn explorer_marquee_selects_intersections_and_ctrl_adds_with_an_opaque_blue_rect
257257 s.pointer(start, true, explorer_ctrl());
258258 let output = s.frame(explorer_ctrl(), vec![egui::Event::PointerMoved(end)]);
259259 s.selected(&[0, 1, 2, 3, 4, 5]);
260삭제: assert!(output.shapes.iter().any(|shape| matches!(&shape.shape, Shape::Rect(rect) if rect.fill == zipelo_ui_memory_app::archive_theme::BLUE && rect.rect.height() > 100.0 && rect.fill.a() == 255)));
260추가: assert!(output.shapes.iter().any(|shape| matches!(
261추가: &shape.shape,
262추가: Shape::Rect(rect)
263추가: if rect.fill == zipelo_ui_memory_app::archive_theme::BLUE.gamma_multiply(0.16)
264추가: && rect.rect.height() > 100.0
265추가: && rect.fill.a() > 0
266추가: && rect.fill.a() < 255
267추가: && rect.stroke == egui::Stroke::new(1.0, zipelo_ui_memory_app::archive_theme::BLUE)
268추가: && rect.stroke_kind == egui::StrokeKind::Inside
269추가: )));
261270 s.pointer(end, false, explorer_ctrl());
262271 s.selected(&[0, 1, 2, 3, 4, 5]);
263272 let start = egui::pos2(row.right() + 8.0, s.body().bottom() - 5.0);