mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-26 11:46:49 -06:00
Merge g2 into g3
This commit is contained in:
@@ -356,7 +356,7 @@ pub const SEQUENCES: &[(&str, Entry)] = &[
|
||||
("WVH", Entry::Finish(Action::Command("view.headings"))), // Excel: Toggle Headings; containment(Headings)
|
||||
("WVN", Entry::Finish(Action::Pending("view.navigation"))), // pending; Excel: Navigation; Navigation pane; reserved until the command lands
|
||||
("WVR", Entry::Finish(Action::Command("view.ruler"))), // Excel: Ruler
|
||||
("WW", Entry::Finish(Action::Command("view.switchWindows"))), // Excel: Switch Windows
|
||||
("WW", Entry::Finish(Action::Control("view.switchWindows"))), // Excel: Switch Windows
|
||||
("JAM", Entry::Finish(Action::Command("chart.formatSelection"))), // Excel: Chart format: Format Selection pane; containment(Format Selection)
|
||||
("JCA", Entry::Finish(Action::Command("chart.addElement"))), // Excel: Chart: Add Chart Element; containment(Add Chart Element)
|
||||
("JCC", Entry::Finish(Action::Command("chart.changeType"))), // Excel: Chart: Change Chart Type; containment(Change Chart Type)
|
||||
|
||||
@@ -2471,7 +2471,7 @@
|
||||
},
|
||||
{
|
||||
"seq": "WW",
|
||||
"kind": "command",
|
||||
"kind": "control",
|
||||
"target": "view.switchWindows",
|
||||
"excel": "Switch Windows",
|
||||
"note": ""
|
||||
|
||||
@@ -2602,7 +2602,7 @@ fn switch_windows(app: &mut SheetApp, ui: &mut Ui) {
|
||||
let anchor = big_button(ui, Icon::Book, "Switch\nWindows", "Switch Windows", true);
|
||||
anchor.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Button, ui.is_enabled(), "Switch Windows"));
|
||||
control_keytip(app, ui, &anchor, "view.switchWindows");
|
||||
let forced = std::mem::take(&mut app.open_switch_windows);
|
||||
let forced = std::mem::take(&mut app.open_switch_windows) | invoke(app, "view.switchWindows");
|
||||
egui::Popup::menu(&anchor).open_memory(popup_command(forced, anchor.clicked())).show(|ui| {
|
||||
for w in app.open_windows() {
|
||||
let label = theme::available_text(ui, &format!("{}{}", if w.active { "✓ " } else { " " }, w.label()));
|
||||
|
||||
@@ -2647,7 +2647,8 @@ fn keytip_wvr_() {
|
||||
fn keytip_ww_() {
|
||||
let mut h = harness(blank());
|
||||
sequence(&mut h, "WW", false);
|
||||
assert!(h.state().session.journal.iter().any(|(id, _)| id == "view.switchWindows"), "WW must journal view.switchWindows");
|
||||
assert!(h.state().message.is_none() && h.state().toast.is_none(), "WW must route to its control without an error box");
|
||||
assert_eq!(h.state().keytips.prefix(), None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user