| | @@ -157,15 +157,19 @@ pub fn action(ui: &mut egui::Ui, text: &str, primary: bool, enabled: bool) -> eg |
| 157 | 157 | |
| 158 | 158 | pub const STATUS_HEIGHT: f32 = 34.0; |
| 159 | 159 | |
| 160 | | -삭제: /// 입력란 모양의 테두리를 그림. 초점이 있으면 파란 테두리. |
| 160 | +추가: /// 경로 줄 높이를 꽉 채우는 입력란을 그림. 모서리는 각지게 하고, |
| 161 | +추가: /// 위 테두리는 상단 메뉴의 구분선이 대신해 선이 겹쳐 보이지 않게 함. 초점이 있으면 파란 테두리. |
| 161 | 162 | pub fn field_frame(ui: &egui::Ui, rect: egui::Rect, focused: bool) { |
| 162 | | -삭제: ui.painter().rect( |
| 163 | | -삭제: rect, |
| 164 | | -삭제: 6, |
| 165 | | -삭제: PANEL, |
| 166 | | -삭제: Stroke::new(1.0, if focused { BLUE } else { BORDER }), |
| 167 | | -삭제: egui::StrokeKind::Inside, |
| 168 | | -삭제: ); |
| 163 | +추가: let painter = ui.painter(); |
| 164 | +추가: painter.rect_filled(rect, 0, PANEL); |
| 165 | +추가: if focused { |
| 166 | +추가: painter.rect_stroke(rect, 0, Stroke::new(1.0, BLUE), egui::StrokeKind::Inside); |
| 167 | +추가: return; |
| 168 | +추가: } |
| 169 | +추가: let stroke = Stroke::new(1.0, BORDER); |
| 170 | +추가: painter.vline(rect.left() + 0.5, rect.y_range(), stroke); |
| 171 | +추가: painter.vline(rect.right() - 0.5, rect.y_range(), stroke); |
| 172 | +추가: painter.hline(rect.x_range(), rect.bottom() - 0.5, stroke); |
| 169 | 173 | } |
| 170 | 174 | |
| 171 | 175 | /// 상태 줄 글자를 칸의 세로 가운데에 그림. 넘치면 줄이고 전체 글자는 툴팁으로 보여 줌. |