Files
gridcraft/crates/ui-egui/tests/it/scrollbar_column_fill.rs
T
skylar taylor-barrick 41769f1d16 Migrate GridCraft to egui 0.37 (#2543)
* E37: migrate GridCraft to egui 0.37

Pin the reviewed fork and shared dependencies, adapt input and rendering to the
new frame lifecycle, and preserve bounded capture handling and font notices.
Add representative accessibility checks and meaningful control labels.

Validation: full repository CI passed all ten stages, with 2,249 tests passed,
zero failed and one existing timing test ignored. Native workflows and paired
performance qualification remain documented separately.

* egui037: record final published pins and local qualification

* M0.37: fix RTL clipping and preserve screenshot budgets

* test: share migrated GridCraft UI harness setup

* egui037: document migrated UI and regression contracts

* egui-037: align popup test fonts and avoid redundant tooltip probes
2026-10-25 14:55:00 -04:00

30 lines
1.2 KiB
Rust

//! The strip beside the column headings, above the vertical scrollbar, takes the bar colour in
//! dark mode instead of showing a light square (#2086).
use egui::{Shape, pos2};
use gridcraft_engine::Session;
use gridcraft_ui_egui::{SheetApp, theme::Tokens};
use serde_json::json;
#[test]
/// Dark mode paints the tab-bar fill over the strip beside the final column heading.
fn dark_theme_fills_the_strip_right_of_the_last_column_heading() {
let mut session = Session::new();
session.new_workbook();
let mut h = crate::common::builder().with_size(egui::vec2(1200.0, 800.0)).build_ui_state(
|ui, app: &mut SheetApp| {
app.logic(ui.ctx());
app.ui(ui);
},
crate::common::app(session),
);
h.state_mut().run("view.theme", json!({"mode": "dark"})).unwrap();
h.run_steps(6);
let grid = h.state().grid.rect.expect("grid rect");
// Inside the scrollbar column, at the height of the column headings.
let probe = pos2(grid.right() + 7.0, grid.top() + 5.0);
let fill = Tokens::dark().tab_bar;
let covered = h.output().shapes.iter().any(|s| matches!(&s.shape, Shape::Rect(r) if r.fill == fill && r.rect.contains(probe)));
assert!(covered, "no tab_bar fill covers {probe:?}");
}