pyfigures 0.2.3__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyfigures-0.2.3/pyfigures.egg-info → pyfigures-0.2.4}/PKG-INFO +1 -1
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/assistant/figure_state.py +13 -1
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/assistant/partner_gui.py +30 -2
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/assistant/session.py +17 -5
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/autolettering_widget.py +42 -1
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/drag_sketch.py +23 -4
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/editable_export.py +2 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/ezfig.py +137 -4
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/pfgui.py +46 -3
- pyfigures-0.2.4/pyfigures/gui/row_letters.py +134 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/mcp_tools/annotations.py +138 -5
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/mcp_tools/export.py +34 -3
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/mcp_tools/qc.py +16 -5
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/mcp_tools/structure.py +9 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/mcp_tools/workflow.py +3 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/recipe.py +20 -1
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/version.py +1 -1
- {pyfigures-0.2.3 → pyfigures-0.2.4/pyfigures.egg-info}/PKG-INFO +1 -1
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures.egg-info/SOURCES.txt +2 -0
- pyfigures-0.2.4/tests/test_row_letters_gui.py +414 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/LICENSE +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/README.md +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/images/__init__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/__init__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/__main__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/album/__init__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/album/__main__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/arrowheads.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/assistant/__init__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/assistant/advanced_annotations.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/assistant/assistant_actions.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/assistant/categorized_mcp.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/assistant/existing_tools.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/assistant/gui_selection.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/assistant/launch.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/assistant/letter_sequence.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/assistant/live_mcp.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/assistant/live_structure.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/assistant/manual_help.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/assistant/manual_help_verified.json +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/assistant/native_gui.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/assistant/original_registry.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/assistant/plot_lifecycle.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/assistant/pointer_context.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/assistant/readability.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/assistant/recovery.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/assistant/result_evidence.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/assistant/submission_review.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/atomic_io.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/burned_text.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/colorbar_script.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/constant_panels.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/cvd.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/equations.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/extras.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/flip.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/__init__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/about_dialog_pzf.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/annotation_editor.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/asingleoraspanel.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/bg_color_selection.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/bug_recorder.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/caption_dialog.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/colorassistant.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/ctrl_key.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/deckcraft_blank.json +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/dimchooser.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/drop_sketch.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/editor_interaction.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/emptyimagedialog.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/equation_dialog.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/fonts/README.md +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/fontselectorgui.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/group_builder_GUI.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/headless_ops.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/integrity_ops.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/journal_style_editor.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/keep_tst_images_for_pzf.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/label_rows.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/latex_code_dialog.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/latex_support.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/lutmultiselector.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/mcp_server_dialog.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/pagelimitswidget.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/panelcreationwidget.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/pdf_support.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/portable_fonts.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/qc_reports.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/region_picker.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/render_headless.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/review/__init__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/review/_template.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/review/dialog.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/review/html_export.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/review/send.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/scalebareditor.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/scrollableEZFIG.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/show_me_how.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/show_me_where.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/simple_text_editor.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/spaceselector.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/style_text_headless.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/svg_painter.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/textEditWatcher.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/theme.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/tipdialog.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/tutorial.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/user_extra_translation.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/user_prefs.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/video_support.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/widget_for_inset.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/gui/zoom_links.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/guides.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/history.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/icons/__init__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/icons/pyfigures.png +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/icons/pyfigures_album.png +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/icons/pyfigures_poster.png +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/image_search.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/journal_styles.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/latex_document.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/layout_formula.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/layout_picture.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/mcp_control.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/mcp_server.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/mcp_tools/__init__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/mcp_tools/app.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/mcp_tools/content.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/mcp_tools/core.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/mcp_tools/guidance.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/mcp_tools/image_search.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/mcp_tools/journal.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/mcp_tools/overlays.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/mcp_tools/poster.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/mcp_tools/stacks.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/mcp_tools/upkeep.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/office_math.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/offscreen.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/panel_source_preview.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/path_resolution.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/poster/__init__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/poster/__main__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/poster/page_presets.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/poster/poster_align.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/poster/poster_canvas.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/poster/poster_headless.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/poster/poster_layout_dialog.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/poster/poster_layouts.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/poster/poster_recipe.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/poster/poster_shapes.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/poster/poster_source_data.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/poster/poster_templates.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/poster/poster_text_dialog.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/poster/poster_web_export.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/poster/poster_window.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/poster/serialization.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/qt_exit.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/script_helpers.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/self_test.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/source_snapshot.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/stack_info.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures/zoom_geometry.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures.egg-info/dependency_links.txt +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures.egg-info/requires.txt +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/pyfigures.egg-info/top_level.txt +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/setup.cfg +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/setup.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_advanced_edit_tools.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_arrow_tip.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_arrowheads.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_assistant_live.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_atomic_io.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_audit_fixes.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_audit_fixes_20261008.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_backgrounds.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_bug_recorder.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_bugs_found_by_gui_e2e.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_canvas_context_menu.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_canvas_keyboard_and_clicks.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_channels_property_20261105.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_codex_trial_findings.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_colour_bar_gui.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_consolidate_download.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_constant_panels.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_data_plots_and_stats.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_deserialization.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_dnd_canvas_more.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_dnd_combine_with_target.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_dnd_main_editor.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_draft_figure.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_drop_sketches.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_editable_export.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_editable_plot_text.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_editor_interaction.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_editor_rotate_and_tool_20261105.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_equations.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_exception_handler.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_export_waits_for_images.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_fig_rect_cache.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_figure_colors.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_figure_diff.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_fiji_formats.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_file_io_encoding.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_file_state_tracking.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_flip.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_folder_drag_and_drop.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_fonts_available.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_forbidden_files.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_gui_e2e_context_menu.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_gui_e2e_coverage.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_gui_e2e_dnd.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_gui_e2e_image_editor.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_gui_e2e_menus.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_gui_e2e_monkey.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_gui_e2e_tutorials.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_gui_e2e_visual.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_gui_menus_and_toolbar.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_gui_more_actions.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_gui_workflow_actions.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_guide_routing.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_image_opacity_reload.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_image_search.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_integrity_and_stats.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_interactive_tools.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_internal_dnd_group_placement.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_inverted_luts.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_journal_styles.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_latex_code.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_latex_documents.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_latex_extras.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_latex_full.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_latex_stress_findings.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_launchers.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_layout_canvas_geometry.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_layout_formula.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_layout_stability_gui.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_lazy_reflow.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_lettering_restore.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_licensing.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_lif_series_reading.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_llm_feedback_20261020.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_lut_remove_20261105.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_max_height.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_mcp_audit_findings.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_mcp_control.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_mcp_history.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_mcp_server.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_mcp_stdio_protocol.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_mcp_text_arguments.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_missing_images_gui.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_normalization.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_offscreen_env.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_ome_zarr.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_omero.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_open_perf.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_panel_editor.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_panel_editor_more.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_panel_preview.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_parity_mcp.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_path_resolution.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_pdf_panels.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_placeholder_grid.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_portability.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_poster_files_and_recipe.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_poster_gui.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_poster_mcp.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_poster_stress_findings.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_poster_vector_figures.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_property_setters_validate.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_pyf_loader_thread_deadlock.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_pyf_loading.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_pymupdf_offer.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_qc_gui.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_qc_mcp_tools.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_qc_reports.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_qt_exit.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_recipe.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_recipe_checks_bundles.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_recipe_extra_keys.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_recipe_for_llms.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_recipe_more_keys.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_recordings.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_render_export.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_restyle_texts.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_review_and_library.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_ruler_labels.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_save_reminder.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_scale_bar_calibration.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_scale_consistency.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_schema_sweep_findings.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_self_test.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_send_to_poster.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_shapes.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_show_me_how.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_show_me_where_20261105.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_source_data.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_stack_tools.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_stack_tools_gui.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_stack_with_image.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_stress_findings.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_stress_findings_20261028.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_stress_findings_20261029.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_style_audit_calbar.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_svg_clipping_and_pdf_pages.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_svg_empty_glyph.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_tex_install.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_text_editor_and_widgets.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_tutorial_controller.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_tutorials.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_typography_tidy.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_uneven_rows_20261105.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_user_chat_findings_20261104.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_user_findings_20261022.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_user_gui_findings_20261021.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_user_guide_menus.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_video_support.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_zarr_stress_findings.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_zoom_callout_gui.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.4}/tests/test_zoom_callout_lut.py +0 -0
|
@@ -11,10 +11,22 @@ def specification(state):
|
|
|
11
11
|
for field in FIELDS[1:]:
|
|
12
12
|
values = [a.get(field) for a in letters]
|
|
13
13
|
uniform[field] = values[0] if values and all(v == values[0] for v in values) else 'mixed' if values else None
|
|
14
|
-
|
|
14
|
+
spec = {'image_panels': len(state['panels']), 'visible_letters': len(letters),
|
|
15
15
|
'duplicate_letter_references':state.get('duplicate_letter_references',{}),
|
|
16
16
|
'uniform_letter_style': uniform, 'unlettered_panel_ids': state['unlettered_panel_ids'],
|
|
17
|
+
'letter_layout': state.get('letter_layout', 'panel'),
|
|
17
18
|
'source': 'Actual GUI readback; preserve unspecified properties on follow-up edits.'}
|
|
19
|
+
if spec['letter_layout'] == 'row':
|
|
20
|
+
# one letter per ROW, outside the rows on the left (drawn by the canvas):
|
|
21
|
+
# the panels carry none on purpose
|
|
22
|
+
row_letters = state.get('row_letters') or []
|
|
23
|
+
spec.update(visible_letters=len(row_letters),
|
|
24
|
+
row_letters=[r['text'] for r in row_letters],
|
|
25
|
+
row_letter_align=state.get('row_letter_align', 'top'),
|
|
26
|
+
letter_layout_note='One letter per row, outside the rows on the left; change it '
|
|
27
|
+
'with set_panel_letter_layout (letter_layout="panel" puts a '
|
|
28
|
+
'letter back in each panel).')
|
|
29
|
+
return spec
|
|
18
30
|
|
|
19
31
|
|
|
20
32
|
def changes(before, after):
|
|
@@ -164,10 +164,20 @@ def state(window):
|
|
|
164
164
|
for annotation in entry['letters']:
|
|
165
165
|
references.setdefault(annotation['text'].casefold(),[]).append(entry['panel_id'])
|
|
166
166
|
duplicates={text:ids for text,ids in references.items() if len(ids)>1}
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
canvas = window.paint.EZFIG_panel
|
|
168
|
+
from pyfigures.gui.row_letters import normalise_layout, normalise_align
|
|
169
|
+
layout = normalise_layout(getattr(canvas, 'letter_layout', None))
|
|
170
|
+
# one letter per row, outside the rows (drawn by the canvas, not on a panel)
|
|
171
|
+
row_letters = [{'row': k, 'text': t.getPlainText()}
|
|
172
|
+
for k, t in enumerate(canvas.row_letter_items())] if layout == 'row' else []
|
|
173
|
+
return {'duplicate_letter_references':duplicates,
|
|
174
|
+
'visible_letter_count': sum(len(p['letters']) for p in entries) + len(row_letters),
|
|
175
|
+
'unlettered_panel_ids': [p['panel_id'] for p in entries if not p['letters']] if layout != 'row' else [],
|
|
169
176
|
'auto_lettering': window.auto_lettering_checkbox.isChecked(),
|
|
170
177
|
'first_letter': window.letter_line_edit.text(),
|
|
178
|
+
'letter_layout': layout,
|
|
179
|
+
'row_letter_align': normalise_align(getattr(canvas, 'row_letter_align', None)),
|
|
180
|
+
'row_letters': row_letters,
|
|
171
181
|
'default_position': str(window.serializable_font.placement), 'panels': entries}
|
|
172
182
|
|
|
173
183
|
|
|
@@ -413,6 +423,24 @@ class PartnerGUI(BaseGUI):
|
|
|
413
423
|
raise ValueError('CLARIFICATION_REQUIRED: This canvas is not a flat list of horizontal rows')
|
|
414
424
|
if validate_only:
|
|
415
425
|
return
|
|
426
|
+
from pyfigures.gui.row_letters import normalise_layout
|
|
427
|
+
if normalise_layout(getattr(canvas, 'letter_layout', None)) == 'row':
|
|
428
|
+
# one letter per row, outside the rows: the letters follow the row
|
|
429
|
+
# order by themselves and the panels carry none (recording "no
|
|
430
|
+
# letter" policies on them hid their letters for good once the
|
|
431
|
+
# figure went back to a letter in each panel)
|
|
432
|
+
a, b = first_row - 1, second_row - 1
|
|
433
|
+
roots[a], roots[b] = roots[b], roots[a]
|
|
434
|
+
canvas.update()
|
|
435
|
+
canvas.repack_all()
|
|
436
|
+
canvas.update_letters_required.emit()
|
|
437
|
+
canvas.update_text_rows.emit()
|
|
438
|
+
canvas.update_size()
|
|
439
|
+
canvas.repaint()
|
|
440
|
+
return dict(action='swap_rows', changed=int(a != b), matched_panel_ids=[], changed_panel_ids=[],
|
|
441
|
+
first_row=first_row, second_row=second_row, completion_verified=True,
|
|
442
|
+
lettering_mode='row_letters',
|
|
443
|
+
row_letters=[t.getPlainText() for t in canvas.row_letter_items()])
|
|
416
444
|
automatic = self.auto_lettering_checkbox.isChecked() and bool(self.letter_line_edit.text())
|
|
417
445
|
before = state(self)
|
|
418
446
|
original = [p for _, _, p in panels(roots)]
|
|
@@ -104,12 +104,14 @@ class Session:
|
|
|
104
104
|
for index,a in enumerate(p.annotations or [])
|
|
105
105
|
if type(a).__name__ in ('Rectangle2D','Rect2D','Ellipse2D','Circle2D','Square2D','Line2D','Polygon2D','PolyLine2D','Freehand2D')]
|
|
106
106
|
objects = self.window.paint.EZFIG_panel.shapes_to_draw
|
|
107
|
-
|
|
107
|
+
letter_state = lettering_state(self.window)
|
|
108
|
+
return {'figure_summary': figure_summary(objects, references, missing | unreadable,
|
|
109
|
+
row_letters=[r['text'] for r in letter_state.get('row_letters') or []]),
|
|
108
110
|
'session_id': self.id, 'revision': self.revision,
|
|
109
111
|
'text_annotations': annotations,
|
|
110
112
|
'roi_annotations': rois,
|
|
111
113
|
'selection': selection_state(self.window),
|
|
112
|
-
'verified_letter_specification': specification(
|
|
114
|
+
'verified_letter_specification': specification(letter_state),
|
|
113
115
|
'panel_references': references,
|
|
114
116
|
**({'missing_source_files': {
|
|
115
117
|
'not_found': sorted(missing), 'could_not_be_read': sorted(unreadable),
|
|
@@ -131,6 +133,10 @@ class Session:
|
|
|
131
133
|
'recovery_error': self.recovery.error},
|
|
132
134
|
'lettering': {'automatic': self.window.auto_lettering_checkbox.isChecked(),
|
|
133
135
|
'default_position': str(self.window.serializable_font.placement),
|
|
136
|
+
# 'row': one letter per row, outside the rows on the left
|
|
137
|
+
'layout': getattr(self.window.paint.EZFIG_panel, 'letter_layout', 'panel'),
|
|
138
|
+
'row_letter_align': getattr(self.window.paint.EZFIG_panel, 'row_letter_align', 'top'),
|
|
139
|
+
'layout_operation': 'set_panel_letter_layout',
|
|
134
140
|
'bulk_operation': 'edit_panel_letters'},
|
|
135
141
|
'objects': [{'id': str(i), 'type': type(obj).__name__,
|
|
136
142
|
'image_count': count_images(obj),
|
|
@@ -587,7 +593,10 @@ class Session:
|
|
|
587
593
|
if annotation.findtext('is_letter') == 'True':
|
|
588
594
|
annotation.find('is_letter').text = 'False'
|
|
589
595
|
settings = root.find('SerializableGUIparameters')
|
|
590
|
-
|
|
596
|
+
# row letters (one per row, outside) are drawn from the figure
|
|
597
|
+
# settings, never from panel annotations: lettering stays on
|
|
598
|
+
per_row = settings is not None and (settings.findtext('letter_layout') or '').strip().strip('"') == 'row'
|
|
599
|
+
if settings is not None and not per_row:
|
|
591
600
|
field = settings.find('auto_lettering')
|
|
592
601
|
if field is None:
|
|
593
602
|
field = ET.SubElement(settings, 'auto_lettering')
|
|
@@ -835,14 +844,17 @@ ADD_CONTENT = ('Ask for images to be added (tool add_image with each file\'s ful
|
|
|
835
844
|
'or File > Open a saved .pyf figure.')
|
|
836
845
|
|
|
837
846
|
|
|
838
|
-
def figure_summary(objects, references, missing=()):
|
|
847
|
+
def figure_summary(objects, references, missing=(), row_letters=()):
|
|
839
848
|
if not objects:
|
|
840
849
|
return {'empty': True,
|
|
841
850
|
'answer': 'The figure is empty: no images, plots or text yet. Nothing to preview or describe.',
|
|
842
851
|
'how_to_add_content': ADD_CONTENT}
|
|
843
852
|
letters = [l for r in references for l in r['letters'] if l]
|
|
844
853
|
text = f"{len(references)} image panel(s) in {len(objects)} top-level object(s)"
|
|
845
|
-
if
|
|
854
|
+
if row_letters:
|
|
855
|
+
# one letter per row, drawn outside the rows: the panels carry none
|
|
856
|
+
text += ', one letter per row (outside, on the left): ' + ', '.join(row_letters)
|
|
857
|
+
elif letters:
|
|
846
858
|
text += ', letters ' + ', '.join(letters)
|
|
847
859
|
if missing:
|
|
848
860
|
text += f'; {len(missing)} image file(s) missing (see missing_source_files)'
|
|
@@ -10,7 +10,7 @@ from qtpy.QtGui import QColor, QFont
|
|
|
10
10
|
from qtpy.QtCore import Qt
|
|
11
11
|
|
|
12
12
|
class AutoLetteringOptions(QWidget):
|
|
13
|
-
def __init__(self, font=None,parent=None):
|
|
13
|
+
def __init__(self, font=None,parent=None, letter_layout='panel', row_letter_align='top'):
|
|
14
14
|
super().__init__(parent)
|
|
15
15
|
|
|
16
16
|
# Create a vertical box layout to hold the widgets
|
|
@@ -93,6 +93,28 @@ class AutoLetteringOptions(QWidget):
|
|
|
93
93
|
|
|
94
94
|
vbox.addLayout(hbox2)
|
|
95
95
|
|
|
96
|
+
# one letter in each panel (at the position above), or one letter per
|
|
97
|
+
# row drawn outside the row, in a margin on its left (row_letters.py)
|
|
98
|
+
layout_label = QLabel("Letters:")
|
|
99
|
+
self.layout_combo = QComboBox()
|
|
100
|
+
self.layout_combo.addItem("One in each panel", 'panel')
|
|
101
|
+
self.layout_combo.addItem("One per row, outside on the left", 'row')
|
|
102
|
+
self.layout_combo.setToolTip('"One per row": a single letter for each row of the figure, '
|
|
103
|
+
'in a margin left of the row (the rows are narrowed so the '
|
|
104
|
+
'figure keeps its width). The panels then carry no letter.')
|
|
105
|
+
self.row_align_combo = QComboBox()
|
|
106
|
+
self.row_align_combo.addItem("Top of the row", 'top')
|
|
107
|
+
self.row_align_combo.addItem("Middle of the row", 'center')
|
|
108
|
+
self.row_align_combo.setToolTip('Where the row letter sits next to its row: level with the '
|
|
109
|
+
'top of the row (and of its column titles), or its middle.')
|
|
110
|
+
hbox3 = QHBoxLayout()
|
|
111
|
+
hbox3.addWidget(layout_label)
|
|
112
|
+
hbox3.addWidget(self.layout_combo)
|
|
113
|
+
hbox3.addWidget(self.row_align_combo)
|
|
114
|
+
vbox.addLayout(hbox3)
|
|
115
|
+
self.set_letter_layout(letter_layout, row_letter_align)
|
|
116
|
+
self.layout_combo.currentIndexChanged.connect(self._layout_changed)
|
|
117
|
+
|
|
96
118
|
# Set initial values for the options
|
|
97
119
|
|
|
98
120
|
# self.font_family = 'Arial'
|
|
@@ -149,6 +171,25 @@ class AutoLetteringOptions(QWidget):
|
|
|
149
171
|
# self.font.setWeight(QFont.Normal)
|
|
150
172
|
|
|
151
173
|
|
|
174
|
+
def set_letter_layout(self, letter_layout='panel', row_letter_align='top'):
|
|
175
|
+
from pyfigures.gui.row_letters import normalise_layout, normalise_align
|
|
176
|
+
self.layout_combo.setCurrentIndex(max(0, self.layout_combo.findData(normalise_layout(letter_layout))))
|
|
177
|
+
self.row_align_combo.setCurrentIndex(max(0, self.row_align_combo.findData(normalise_align(row_letter_align))))
|
|
178
|
+
self._layout_changed()
|
|
179
|
+
|
|
180
|
+
def _layout_changed(self, *args):
|
|
181
|
+
# the corner is for letters in the panels, the alignment for row letters
|
|
182
|
+
per_row = self.get_letter_layout() == 'row'
|
|
183
|
+
self.row_align_combo.setEnabled(per_row)
|
|
184
|
+
self.vertical_combo.setEnabled(not per_row)
|
|
185
|
+
self.horizontal_combo.setEnabled(not per_row)
|
|
186
|
+
|
|
187
|
+
def get_letter_layout(self):
|
|
188
|
+
return self.layout_combo.currentData() or 'panel'
|
|
189
|
+
|
|
190
|
+
def get_row_letter_align(self):
|
|
191
|
+
return self.row_align_combo.currentData() or 'top'
|
|
192
|
+
|
|
152
193
|
def choose_bg_color(self):
|
|
153
194
|
"""
|
|
154
195
|
Opens a QColorDialog to choose the background color.
|
|
@@ -266,9 +266,27 @@ def _place(shapes, gap):
|
|
|
266
266
|
y += r.height() + gap
|
|
267
267
|
|
|
268
268
|
|
|
269
|
-
def
|
|
269
|
+
def row_letter_names(canvas):
|
|
270
|
+
"""{id(panel): its row letter} when the figure has one letter per row
|
|
271
|
+
(outside the rows: the panels carry none), {} otherwise. The sketch then
|
|
272
|
+
names each panel by its row's letter, as it names lettered panels."""
|
|
273
|
+
if getattr(canvas, "letter_layout", "panel") != "row":
|
|
274
|
+
return {}
|
|
275
|
+
try:
|
|
276
|
+
names = {}
|
|
277
|
+
for row, text in canvas._row_letter_texts():
|
|
278
|
+
letter = text.getPlainText().strip()
|
|
279
|
+
for leaf in _leaves(row):
|
|
280
|
+
names[id(leaf)] = letter
|
|
281
|
+
return names
|
|
282
|
+
except Exception:
|
|
283
|
+
return {}
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
def sketch(shapes, moved, target, dpr=1.0, letters=None):
|
|
270
287
|
"""QIcon of *shapes* (sandbox result): grey boxes, *moved* panels blue,
|
|
271
|
-
*target* panels orange, letters inside
|
|
288
|
+
*target* panels orange, letters inside (*letters* {id(panel): letter}
|
|
289
|
+
for panels whose letter is not on them: one letter per row)."""
|
|
272
290
|
# getRect(all=True): the size drawn on the canvas (getRect() ignores the fit to width)
|
|
273
291
|
_place(shapes, gap=max(s.getRect(all=True).height() for s in shapes) * 0.08 if shapes else 0)
|
|
274
292
|
leaves = [x for s in shapes for x in _leaves(s)]
|
|
@@ -296,7 +314,7 @@ def sketch(shapes, moved, target, dpr=1.0):
|
|
|
296
314
|
p.setPen(QPen(colour.darker(140), 1))
|
|
297
315
|
p.setBrush(colour)
|
|
298
316
|
p.drawRect(box)
|
|
299
|
-
letter = letter_of(src)
|
|
317
|
+
letter = letter_of(src) or (letters or {}).get(id(src), "")
|
|
300
318
|
if letter and box.width() >= 7 and box.height() >= 9:
|
|
301
319
|
p.setPen(Qt.GlobalColor.white)
|
|
302
320
|
p.drawText(box, Qt.AlignmentFlag.AlignCenter, letter[:2])
|
|
@@ -383,6 +401,7 @@ def finish_drag_menu(canvas, menu, entries):
|
|
|
383
401
|
except Exception:
|
|
384
402
|
pass
|
|
385
403
|
seen = {}
|
|
404
|
+
row_names = row_letter_names(canvas)
|
|
386
405
|
# an entry that would leave the layout as it is does nothing: not offered
|
|
387
406
|
first = entries[0]
|
|
388
407
|
now = simulate(canvas, None, (), [x for x in (first[4], first[5]) if x is not None])
|
|
@@ -406,7 +425,7 @@ def finish_drag_menu(canvas, menu, entries):
|
|
|
406
425
|
seen[k] = act
|
|
407
426
|
moved_ids = {id(x) for x in _leaves(moved)} if moved is not None else set()
|
|
408
427
|
target_ids = {id(x) for x in _leaves(target)} if target is not None else set()
|
|
409
|
-
icon = sketch(result, moved_ids, target_ids, dpr)
|
|
428
|
+
icon = sketch(result, moved_ids, target_ids, dpr, letters=row_names)
|
|
410
429
|
if icon is not None:
|
|
411
430
|
act.setIcon(icon)
|
|
412
431
|
_drop_empty_separators(menu)
|
|
@@ -67,6 +67,8 @@ def capture_scene(panel, movies=False) -> dict:
|
|
|
67
67
|
|
|
68
68
|
if hasattr(panel, "wait_for_pending_images"):
|
|
69
69
|
panel.wait_for_pending_images()
|
|
70
|
+
if hasattr(panel, "prepare_export"):
|
|
71
|
+
panel.prepare_export() # row letters laid out (headless)
|
|
70
72
|
bounds = panel.updateBounds()
|
|
71
73
|
width = float(bounds.width())
|
|
72
74
|
height = float(bounds.height())
|
|
@@ -123,6 +123,8 @@ from batoolset.pyqts.tools import distance
|
|
|
123
123
|
from pyfigures.gui.ctrl_key import getCtrlModifier
|
|
124
124
|
from pyfigures.gui.group_builder_GUI import PanelOrRow
|
|
125
125
|
from pyfigures.gui.label_rows import fit_label_rows
|
|
126
|
+
from pyfigures.gui import row_letters as _row_letters
|
|
127
|
+
from batoolset.strings.tools import increment_letter as _increment_letter
|
|
126
128
|
from pyfigures.gui.emptyimagedialog import EmptyImageParametersWidget
|
|
127
129
|
from pyfigures.gui.simple_text_editor import TextEditor
|
|
128
130
|
from batoolset.serializations.tools import deserialize_to_dict
|
|
@@ -239,6 +241,14 @@ class MyWidget(QWidget):
|
|
|
239
241
|
# figure-wide background (0xRRGGBB) behind the panels and the gaps
|
|
240
242
|
# between them; None = transparent (PNG/TIFF) or white (JPG)
|
|
241
243
|
self.page_background = None
|
|
244
|
+
# panel letters: 'panel' (one inside each panel) or 'row' (one per row,
|
|
245
|
+
# outside it in a left margin, drawn by this canvas: row_letters.py);
|
|
246
|
+
# row_letters is what to draw then ({'font', 'first'}), set by the
|
|
247
|
+
# window's update_letters, None when no row letters are shown
|
|
248
|
+
self.letter_layout = _row_letters.DEFAULT_LAYOUT
|
|
249
|
+
self.row_letter_align = _row_letters.DEFAULT_ALIGN
|
|
250
|
+
self.row_letters = None
|
|
251
|
+
self._row_letter_cache = {}
|
|
242
252
|
self.contextMenu = QMenu(self)
|
|
243
253
|
self._EXTRA_PADDING = 50 # extra padding to place a ruler or alike
|
|
244
254
|
# self.freeze = False # somehow I failed at freezing shape changes --> no clue why
|
|
@@ -361,6 +371,9 @@ class MyWidget(QWidget):
|
|
|
361
371
|
return kept
|
|
362
372
|
self.shapes_to_draw = _prune(self.shapes_to_draw)
|
|
363
373
|
if self.shapes_to_draw:
|
|
374
|
+
# row letters (one per row, outside on the left): the rows give up
|
|
375
|
+
# the margin they need, so the figure keeps its width
|
|
376
|
+
margin = self.row_letter_margin()
|
|
364
377
|
# each image row laid out as opening the figure lays it out
|
|
365
378
|
# (Group.__init__): an action that left a row otherwise (a drag
|
|
366
379
|
# 'Take H into the dragged row') came back different after undo +
|
|
@@ -368,12 +381,15 @@ class MyWidget(QWidget):
|
|
|
368
381
|
for s in self.shapes_to_draw:
|
|
369
382
|
if isinstance(s, Group) and not getattr(s, 'isText', False) and s.content \
|
|
370
383
|
and getattr(s, 'size', None):
|
|
384
|
+
target = s.size
|
|
385
|
+
width = target - margin if margin and target - margin > 1 else target
|
|
371
386
|
try:
|
|
372
|
-
s.set_to_size(
|
|
373
|
-
set_to_width(s,
|
|
387
|
+
s.set_to_size(width)
|
|
388
|
+
set_to_width(s, width)
|
|
374
389
|
except (ArithmeticError, ValueError):
|
|
375
390
|
pass # squeezed to nothing: kept as it is (as on load)
|
|
376
|
-
|
|
391
|
+
s.size = target # the width asked for, letters included
|
|
392
|
+
self.shapes_to_draw[0].setTopLeft(self._EXTRA_PADDING + margin, self._EXTRA_PADDING)
|
|
377
393
|
align2(align_positions[2], *self.shapes_to_draw)
|
|
378
394
|
pack2(self.space, 'Y', False, *self.shapes_to_draw)
|
|
379
395
|
# Align label rows with the row they label — done here so positions are always final
|
|
@@ -381,6 +397,109 @@ class MyWidget(QWidget):
|
|
|
381
397
|
fit_label_rows(self.shapes_to_draw)
|
|
382
398
|
self.update_size()
|
|
383
399
|
|
|
400
|
+
# ---- row letters (row_letters.py) -----------------------------------
|
|
401
|
+
def _row_letter_texts(self):
|
|
402
|
+
"""[(row, TAText2D)] in row order, not placed yet; [] when the figure
|
|
403
|
+
has no row letters."""
|
|
404
|
+
# (getattr: the drag-menu sketch runs these methods on a stand-in canvas)
|
|
405
|
+
cfg = getattr(self, 'row_letters', None)
|
|
406
|
+
if not cfg or not self.shapes_to_draw:
|
|
407
|
+
return []
|
|
408
|
+
font = cfg.get('font')
|
|
409
|
+
letter = cfg.get('first') or 'A'
|
|
410
|
+
if font is None:
|
|
411
|
+
return []
|
|
412
|
+
colour = _row_letters.letter_colour(font, self.page_background)
|
|
413
|
+
style = (font.toString(), getattr(font, 'background', None), colour)
|
|
414
|
+
if len(self._row_letter_cache) > 500:
|
|
415
|
+
self._row_letter_cache.clear()
|
|
416
|
+
out = []
|
|
417
|
+
for row in _row_letters.lettered_rows(self.shapes_to_draw):
|
|
418
|
+
key = (letter,) + style
|
|
419
|
+
text = self._row_letter_cache.get(key)
|
|
420
|
+
if text is None:
|
|
421
|
+
text = _row_letters.make_letter(font, letter, colour)
|
|
422
|
+
self._row_letter_cache[key] = text
|
|
423
|
+
out.append((row, text))
|
|
424
|
+
letter = _increment_letter(letter)
|
|
425
|
+
return out
|
|
426
|
+
|
|
427
|
+
def row_letter_margin(self):
|
|
428
|
+
"""Width kept free left of the rows for their letters (0 without)."""
|
|
429
|
+
texts = self._row_letter_texts()
|
|
430
|
+
if not texts:
|
|
431
|
+
return 0.
|
|
432
|
+
widest = max(t.getRect(all=True).width() for _, t in texts)
|
|
433
|
+
return _row_letters.edge_pad(widest) + widest + _row_letters.gap(widest)
|
|
434
|
+
|
|
435
|
+
def row_letter_extent(self, text):
|
|
436
|
+
"""What a placed row letter takes on the page: its box without the
|
|
437
|
+
empty line space above a top-aligned letter (so the figure does not
|
|
438
|
+
start with a blank band), with a little room on its left (its ink
|
|
439
|
+
starts at the box edge: anti-aliasing was cut at the figure edge)."""
|
|
440
|
+
r = text.getRect(all=True)
|
|
441
|
+
shift = getattr(text, '_row_top_shift', 0.)
|
|
442
|
+
pad = _row_letters.edge_pad(r.width())
|
|
443
|
+
return QRectF(r.left() - pad, r.top() + shift, r.width() + pad, r.height() - shift)
|
|
444
|
+
|
|
445
|
+
def row_letter_items(self):
|
|
446
|
+
"""The row letters placed next to their rows (TAText2D, drawn by
|
|
447
|
+
paint): in the margin left of the rows, level with the top of each
|
|
448
|
+
row (and of the label rows above it) or with its middle."""
|
|
449
|
+
texts = self._row_letter_texts()
|
|
450
|
+
if not texts:
|
|
451
|
+
return []
|
|
452
|
+
try:
|
|
453
|
+
left = min(r.getRect(all=True).left() for r, _ in texts)
|
|
454
|
+
except Exception:
|
|
455
|
+
return []
|
|
456
|
+
widest = max(t.getRect(all=True).width() for _, t in texts)
|
|
457
|
+
x = left - self.row_letter_margin() + _row_letters.edge_pad(widest)
|
|
458
|
+
centre = _row_letters.normalise_align(self.row_letter_align) == 'center'
|
|
459
|
+
items = []
|
|
460
|
+
for row, text in texts:
|
|
461
|
+
rect = text.getRect(all=True)
|
|
462
|
+
row_rect = row.getRect(all=True)
|
|
463
|
+
if centre:
|
|
464
|
+
y = row_rect.center().y() - rect.height() / 2.
|
|
465
|
+
text._row_top_shift = 0.
|
|
466
|
+
else:
|
|
467
|
+
shift = self._row_letter_ink_shift(text)
|
|
468
|
+
y = _row_letters.block_top(self.shapes_to_draw, row) - shift
|
|
469
|
+
text._row_top_shift = shift
|
|
470
|
+
text.setTopLeft(x, y)
|
|
471
|
+
items.append(text)
|
|
472
|
+
return items
|
|
473
|
+
|
|
474
|
+
@staticmethod
|
|
475
|
+
def _row_letter_ink_shift(text):
|
|
476
|
+
"""How far above the row top the letter box starts, so that the ink
|
|
477
|
+
of the letter (not the line box above it) is level with the row top,
|
|
478
|
+
as for letters in a panel corner (TAText2D._letter_ink_shift)."""
|
|
479
|
+
shift = getattr(text, '_row_ink_shift', None)
|
|
480
|
+
if shift is None:
|
|
481
|
+
from batoolset.drawings.shapes.Position import Position
|
|
482
|
+
text.placement = Position('top-left')
|
|
483
|
+
try:
|
|
484
|
+
shift = float(text._letter_ink_shift())
|
|
485
|
+
except Exception:
|
|
486
|
+
shift = 0.
|
|
487
|
+
finally:
|
|
488
|
+
text.placement = None
|
|
489
|
+
text._row_ink_shift = shift
|
|
490
|
+
return shift
|
|
491
|
+
|
|
492
|
+
def _draw_row_letters(self, painter):
|
|
493
|
+
for text in self.row_letter_items():
|
|
494
|
+
text.draw(painter)
|
|
495
|
+
|
|
496
|
+
def prepare_export(self):
|
|
497
|
+
"""Exports first lay the figure out as the canvas shows it when its
|
|
498
|
+
letters are drawn by the canvas (row letters): a figure opened
|
|
499
|
+
without a window (headless render, MCP export) was never painted."""
|
|
500
|
+
if _row_letters.normalise_layout(getattr(self, 'letter_layout', None)) == 'row':
|
|
501
|
+
self.ensure_layout()
|
|
502
|
+
|
|
384
503
|
def _compute_help_arrow_x(self):
|
|
385
504
|
"""Compute and cache the x position of the Help menu button in this widget's coords.
|
|
386
505
|
Must be called outside paintEvent to avoid Wayland global-coord call restrictions."""
|
|
@@ -468,6 +587,7 @@ class MyWidget(QWidget):
|
|
|
468
587
|
except Exception:
|
|
469
588
|
pass
|
|
470
589
|
shape.draw(painter) # BUG SOMEHOW THIS SETS A CLIP RECT THAT IS NOT RESET AND SO SELECTION AND STUFF ALIKE CANNOT BE PAINTED !!! --> BIG PB --> NEED CLEAN THE CODE --> BUG FIXED IT WAS DUE TO too late painter.save IN IMAGE2D !!!
|
|
590
|
+
self._draw_row_letters(painter)
|
|
471
591
|
|
|
472
592
|
# painter.setClipRect(QRect()) # I need reset the clip rect
|
|
473
593
|
# painter.setClipRect(None) # I need reset the clip rect
|
|
@@ -720,6 +840,7 @@ class MyWidget(QWidget):
|
|
|
720
840
|
logger.error('please provide a valide path to save the image "' + str(path) + '"')
|
|
721
841
|
return
|
|
722
842
|
self.wait_for_pending_images()
|
|
843
|
+
self.prepare_export()
|
|
723
844
|
if filetype is None:
|
|
724
845
|
if path.lower().endswith('.svg'):
|
|
725
846
|
filetype = 'svg'
|
|
@@ -987,6 +1108,7 @@ class MyWidget(QWidget):
|
|
|
987
1108
|
Static (non-video) panels are drawn identically in every frame.
|
|
988
1109
|
"""
|
|
989
1110
|
self.wait_for_pending_images()
|
|
1111
|
+
self.prepare_export()
|
|
990
1112
|
from batoolset.img import write_video
|
|
991
1113
|
import numpy as np
|
|
992
1114
|
|
|
@@ -1070,6 +1192,8 @@ class MyWidget(QWidget):
|
|
|
1070
1192
|
rect = rect.united(shape.getRect(all=True))
|
|
1071
1193
|
except Exception:
|
|
1072
1194
|
traceback.print_exc()
|
|
1195
|
+
for text in self.row_letter_items(): # the letter margin too
|
|
1196
|
+
rect = rect.united(self.row_letter_extent(text))
|
|
1073
1197
|
if not rect.isEmpty():
|
|
1074
1198
|
painter.fillRect(rect, QColor(int(bg) & 0xFFFFFF))
|
|
1075
1199
|
|
|
@@ -1078,6 +1202,7 @@ class MyWidget(QWidget):
|
|
|
1078
1202
|
self._paint_page_background(painter)
|
|
1079
1203
|
for shape in self.shapes_to_draw:
|
|
1080
1204
|
shape.draw(painter)
|
|
1205
|
+
self._draw_row_letters(painter)
|
|
1081
1206
|
painter.restore()
|
|
1082
1207
|
|
|
1083
1208
|
# ------------------------------------------------------------------
|
|
@@ -1114,6 +1239,7 @@ class MyWidget(QWidget):
|
|
|
1114
1239
|
|
|
1115
1240
|
for s in self.shapes_to_draw:
|
|
1116
1241
|
rec(s)
|
|
1242
|
+
out.extend(self.row_letter_items()) # row letters, drawn by the canvas
|
|
1117
1243
|
return out
|
|
1118
1244
|
|
|
1119
1245
|
@staticmethod
|
|
@@ -1246,6 +1372,7 @@ class MyWidget(QWidget):
|
|
|
1246
1372
|
"""
|
|
1247
1373
|
import os as _os
|
|
1248
1374
|
self.wait_for_pending_images()
|
|
1375
|
+
self.prepare_export()
|
|
1249
1376
|
stem = _os.path.splitext(path)[0]
|
|
1250
1377
|
image_format = image_format.lower().lstrip('.')
|
|
1251
1378
|
img_path = f"{stem}.{image_format}"
|
|
@@ -1367,7 +1494,13 @@ class MyWidget(QWidget):
|
|
|
1367
1494
|
# in fact upon
|
|
1368
1495
|
# do not override this because it's needed actually
|
|
1369
1496
|
def updateBounds(self):
|
|
1370
|
-
|
|
1497
|
+
bounds = get_master_bounds2(self.shapes_to_draw)
|
|
1498
|
+
items = self.row_letter_items() if getattr(self, 'row_letters', None) else []
|
|
1499
|
+
if items:
|
|
1500
|
+
# the row letters sit left of the rows: exported, never cut
|
|
1501
|
+
for text in items:
|
|
1502
|
+
bounds = QRectF(bounds).united(self.row_letter_extent(text))
|
|
1503
|
+
return bounds
|
|
1371
1504
|
# # loop over shape to get bounds to be able to draw an image
|
|
1372
1505
|
# bounds = QRectF()
|
|
1373
1506
|
# max_width = 0
|
|
@@ -27,6 +27,8 @@ from batoolset.xmls.tools import _replace_filename_tags, _update_filename_of_con
|
|
|
27
27
|
from pyfigures.gui.user_extra_translation import ExtraTranslationWidget
|
|
28
28
|
from batoolset.strings.tools import increment_letter
|
|
29
29
|
from pyfigures.gui.autolettering_widget import AutoLetteringOptions
|
|
30
|
+
from pyfigures.gui import row_letters as _row_letters
|
|
31
|
+
_row_letters.install_gui_params_fields() # letter_layout survives reopen / undo
|
|
30
32
|
from batoolset.drawings.shapes.Position import Position
|
|
31
33
|
from batoolset.drawings.shapes.serializablefont import SerializableQFont
|
|
32
34
|
from batoolset.lists.tools import find_all_objects_of_type, find_first_index, find_first_object_of_type, \
|
|
@@ -4912,11 +4914,18 @@ class EZFIG_GUI(QMainWindow):
|
|
|
4912
4914
|
ensure() # save what the canvas shows, not the geometry before its repack
|
|
4913
4915
|
neo_list = list(self.paint.EZFIG_panel.shapes_to_draw)
|
|
4914
4916
|
neo_list.append(self.serializable_font)
|
|
4915
|
-
|
|
4917
|
+
gui_params = SerializableGUIparameters(
|
|
4916
4918
|
space=self.main_space_spinner.value(),
|
|
4917
4919
|
background=self.paint.EZFIG_panel.page_background,
|
|
4918
4920
|
first_letter=self.letter_line_edit.text() or None,
|
|
4919
|
-
auto_lettering=self.auto_lettering_checkbox.isChecked())
|
|
4921
|
+
auto_lettering=self.auto_lettering_checkbox.isChecked()) # add GUI parameters
|
|
4922
|
+
canvas = self.paint.EZFIG_panel
|
|
4923
|
+
if _row_letters.normalise_layout(getattr(canvas, 'letter_layout', None)) == 'row':
|
|
4924
|
+
# (only then: figures lettered per panel are saved as before)
|
|
4925
|
+
gui_params.letter_layout = 'row'
|
|
4926
|
+
gui_params.row_letter_align = _row_letters.normalise_align(
|
|
4927
|
+
getattr(canvas, 'row_letter_align', None))
|
|
4928
|
+
neo_list.append(gui_params)
|
|
4920
4929
|
xml_string = object_to_xml(neo_list, is_list=True)
|
|
4921
4930
|
# atomic: an interrupted save leaves the previous .pyf intact
|
|
4922
4931
|
from pyfigures.atomic_io import write_atomic
|
|
@@ -6765,6 +6774,12 @@ class EZFIG_GUI(QMainWindow):
|
|
|
6765
6774
|
or the MCP server) it is read from the letters the panels carry."""
|
|
6766
6775
|
first = getattr(gui_params, 'first_letter', None) if gui_params is not None else None
|
|
6767
6776
|
auto = getattr(gui_params, 'auto_lettering', None) if gui_params is not None else None
|
|
6777
|
+
# one letter per row outside the rows, or one per panel (row_letters.py)
|
|
6778
|
+
canvas = self.paint.EZFIG_panel
|
|
6779
|
+
canvas.letter_layout = _row_letters.normalise_layout(getattr(gui_params, 'letter_layout', None))
|
|
6780
|
+
canvas.row_letter_align = _row_letters.normalise_align(getattr(gui_params, 'row_letter_align', None))
|
|
6781
|
+
if canvas.letter_layout == 'row' and auto is None:
|
|
6782
|
+
auto = True # (the panels carry no letter to read it from)
|
|
6768
6783
|
if first is None or auto is None:
|
|
6769
6784
|
try:
|
|
6770
6785
|
_, images = self.paint.EZFIG_panel.get_full_list_ofimages2D_for_consolidation(
|
|
@@ -6794,6 +6809,14 @@ class EZFIG_GUI(QMainWindow):
|
|
|
6794
6809
|
def update_letters(self):
|
|
6795
6810
|
letter = self.letter_line_edit.text()
|
|
6796
6811
|
shall_add_letter = self.auto_lettering_checkbox.isChecked() and letter
|
|
6812
|
+
# one letter per row, outside on the left (row_letters.py): drawn by
|
|
6813
|
+
# the canvas, the panels carry none
|
|
6814
|
+
canvas = self.paint.EZFIG_panel
|
|
6815
|
+
per_row = _row_letters.normalise_layout(getattr(canvas, 'letter_layout', None)) == 'row'
|
|
6816
|
+
canvas.row_letters = {'font': self.serializable_font, 'first': letter} \
|
|
6817
|
+
if (shall_add_letter and per_row) else None
|
|
6818
|
+
if per_row:
|
|
6819
|
+
shall_add_letter = False
|
|
6797
6820
|
# TODO prevent dupes and see why it does not get the virtual ones
|
|
6798
6821
|
_, all_images = self.paint.EZFIG_panel.get_full_list_ofimages2D_for_consolidation(
|
|
6799
6822
|
exclude_images_without_filename=False, include_insets=False)
|
|
@@ -7021,7 +7044,10 @@ class EZFIG_GUI(QMainWindow):
|
|
|
7021
7044
|
def change_lettering_parameters(self):
|
|
7022
7045
|
# start from the current lettering (it used to always open on the
|
|
7023
7046
|
# defaults, so Ok silently reset colours/font/position)
|
|
7024
|
-
|
|
7047
|
+
canvas = self.paint.EZFIG_panel
|
|
7048
|
+
main = AutoLetteringOptions(font=getattr(self, 'serializable_font', None),
|
|
7049
|
+
letter_layout=getattr(canvas, 'letter_layout', 'panel'),
|
|
7050
|
+
row_letter_align=getattr(canvas, 'row_letter_align', 'top'))
|
|
7025
7051
|
|
|
7026
7052
|
custom_dialog = CustomDialog(title="Auto lettering",
|
|
7027
7053
|
message=None,
|
|
@@ -7029,9 +7055,26 @@ class EZFIG_GUI(QMainWindow):
|
|
|
7029
7055
|
|
|
7030
7056
|
if custom_dialog.exec_() == QDialog.Accepted:
|
|
7031
7057
|
self.serializable_font = main.get_serializable_font()
|
|
7058
|
+
self.set_letter_layout(main.get_letter_layout(), main.get_row_letter_align(), checkpoint=False)
|
|
7032
7059
|
self.paint.EZFIG_panel.update()
|
|
7033
7060
|
self.save_state(show_popup=True)
|
|
7034
7061
|
|
|
7062
|
+
def set_letter_layout(self, letter_layout='panel', row_letter_align=None, checkpoint=True):
|
|
7063
|
+
"""'panel': a letter in each panel; 'row': one letter per row, outside
|
|
7064
|
+
the row on the left (row_letters.py; recipe/MCP: letter_layout)."""
|
|
7065
|
+
canvas = self.paint.EZFIG_panel
|
|
7066
|
+
canvas.letter_layout = _row_letters.normalise_layout(letter_layout)
|
|
7067
|
+
if row_letter_align is not None:
|
|
7068
|
+
canvas.row_letter_align = _row_letters.normalise_align(row_letter_align)
|
|
7069
|
+
if canvas.letter_layout == 'row' and not self.auto_lettering_checkbox.isChecked():
|
|
7070
|
+
# asking for row letters means letters: they were silently off
|
|
7071
|
+
self.auto_lettering_checkbox.blockSignals(True)
|
|
7072
|
+
self.auto_lettering_checkbox.setChecked(True)
|
|
7073
|
+
self.auto_lettering_checkbox.blockSignals(False)
|
|
7074
|
+
canvas.update()
|
|
7075
|
+
if checkpoint:
|
|
7076
|
+
self.save_state(show_popup=False)
|
|
7077
|
+
|
|
7035
7078
|
def export_source_data_action(self):
|
|
7036
7079
|
"""Export a journal-style Source Data bundle for the figure
|
|
7037
7080
|
(MCP: export_source_data)."""
|