From 15d1ffb372a3eae313cbbc09caf26b6610b0f293 Mon Sep 17 00:00:00 2001 From: ninhhaidang Date: Wed, 11 Nov 2026 18:51:43 +0700 Subject: [PATCH 1/2] UI: name the Drawing colour button Fill on polygon and point layers (#1298) The button changes a polygon's fill and a marker's fill, never the outline colour, but 'Color' sat above 'Outline' and 'No Fill'. A line layer keeps 'Color': there the button sets the line's colour. --- crates/ui-egui/src/ribbon.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/ribbon.rs b/crates/ui-egui/src/ribbon.rs index e1fe525e09..3a37b4cb50 100644 --- a/crates/ui-egui/src/ribbon.rs +++ b/crates/ui-egui/src/ribbon.rs @@ -4402,7 +4402,9 @@ fn drawing_group(app: &mut RustGisApp, ui: &mut Ui, layer: &rustgis_engine::map: crate::widgets::one_step_per_press(app, &resp); let _ = app.run("layer.color", json!({"color": crate::theme::rgba(c).hex8()})); } - ui.label(egui::RichText::new(tl!("Color")).size(11.5)); + // A line has no inside: its colour is the line's (the outline is the "Outline" width below). + let name = if layer.geometry_type() == GeometryType::Polyline { tl!("Color") } else { tl!("Fill") }; + ui.label(egui::RichText::new(name).size(11.5)); }); let mut w = layer.renderer.base_symbol().stroke_width; ui.horizontal(|ui| { @@ -5291,6 +5293,17 @@ mod tests { assert!(h.query_by_label("No Fill").is_some()); } + #[test] + fn drawing_names_the_colour_by_what_it_changes() { + let mut h = drawing_harness(); + for (layer, fill) in [("Countries", true), ("Cities", true), ("Rivers", false)] { + h.state_mut().run("layer.select", json!({"layer": layer})).unwrap(); + h.run(); + // The colour well itself is also labelled "Color", so only "Fill" tells the two apart. + assert_eq!(h.query_by_label("Fill").is_some(), fill, "{layer}"); + } + } + /// Drags a number of the harness from `at` by 16, 32 and 48 points, calling `each` between. fn drag_by(h: &mut egui_kittest::Harness<'static, RustGisApp>, at: egui::Pos2, mut each: impl FnMut(&RustGisApp)) { h.hover_at(at); From d99238d1a924868a1e4d16593bd7a08feb2f8cc6 Mon Sep 17 00:00:00 2001 From: ninhhaidang Date: Wed, 11 Nov 2026 19:54:59 +0700 Subject: [PATCH 2/2] UI: the Symbology pane names the fill colour Fill, as the ribbon does (#1298) The pane's Symbol box called the layer.color button 'Color' next to 'Outline color', while the ribbon's Drawing group now says 'Fill'. The contributing guide asks for one name per command across ribbon, panes and Command Search. Command Search still says 'Symbol Color'. --- crates/ui-egui/src/panes.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/panes.rs b/crates/ui-egui/src/panes.rs index c72c86035d..b426d09f33 100644 --- a/crates/ui-egui/src/panes.rs +++ b/crates/ui-egui/src/panes.rs @@ -5209,7 +5209,8 @@ fn symbol_editor(app: &mut RustGisApp, ui: &mut Ui, s: Symbol, g: GeometryType, }); egui::Grid::new("symbol_grid").num_columns(2).spacing(vec2(10.0, 6.0)).show(ui, |ui| { if g != GeometryType::Polyline { - ui.label(tl!("Color")); + // The same name as the ribbon's Drawing group gives this `layer.color` button. + ui.label(tl!("Fill")); let mut c = c32(s.fill); let resp = crate::widgets::color_button(ui, &mut c); if resp.changed() {