Open
Conversation
Refactored code and docs to distinguish "margins" from "shadows". Renamed `Margin.DrawMargins` to `Margin.DrawShadows` and updated all usages, comments, and test assertions. Expanded documentation in `View.md` and `drawing.md` to describe the two-pass shadow rendering process. Added new tests for shadow rendering in `MarginTests.cs` and improved code style for clarity and consistency. Enhanced comments to explain the shadow drawing workflow.
…lete comments - Add BorderTransparentTests with 3 tests for Issue gui-cs#4834: - Border_Transparent_Shows_Underlying_Content_In_Interior (Skip - not yet implemented) - Border_TransparentMouse_Interior_Clicks_Pass_Through (passes for wrong reason) - Border_TransparentMouse_BorderLine_Clicks_Are_Captured (Skip - not yet implemented) - Add implementation plan in plans/per-cell-transparent-mouse.md - Rewrite DoDrawComplete comments to explain the purpose and mechanics of clip exclusion, the Adornment guard, transparent vs opaque paths, and how DrawContext flows between parent and child views Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Moved Border_Is_Cleared_After_Margin_Thickness_Change from AdornmentTests.cs to BorderTests.cs for better test organization. - Updated object initializations in BorderTests.cs to use explicit types and target-typed new () per code style. - Replaced Rectangle assertions with new Rectangle(...) for clarity. - Standardized test string literals and output formatting. - Refactored TransparentTests.cs for style consistency; switched to triple-quoted strings for multiline output. - Simplified driver creation and variable declarations in ViewDrawingFlowTests.cs; ensured base.OnXxx() is called in TestView overrides. - Added DoDrawCompleteTests.cs with comprehensive unit tests for DoDrawComplete, covering clip exclusion, border/padding, adornment, and DrawContext. - Added spelling/grammar exceptions for "border line" and "border lines" in Terminal.sln.DotSettings.
This change means: - Border adds lines to its own LineCanvas - Border's `RenderLineCanvas` is skipped (because `SuperViewRendersLineCanvas = true`) - Parent's draw loop merges Border's LineCanvas into its own - Parent's `RenderLineCanvas` renders all lines and reports the drawn region to the parent's context - Border's own DrawContext tracks what IT drew (title text, etc.)
- Relax Adornment guard in DoDrawComplete: transparent adornments now participate in clip exclusion so only their drawn cells are excluded - Skip viewport clearing when Border has Transparent set, allowing underlying content to show through the border interior - Parent views with a transparent Border use the transparent clip exclusion path (exclude only drawn cells, not entire frame) - Enable Border_Transparent_Shows_Underlying_Content_In_Interior test Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix Border title occlusion: report title rect to DrawContext so it participates in clip exclusion for transparent borders - Fix clip region clamping: use Border.FrameToScreen() instead of ViewportToScreen() when Border is transparent, so border lines and title outside the viewport are included in clip exclusion - Add occlusion tests verifying border lines and title occlude underlying peer subviews - Add Border SubView AnchorEnd rendering and resize tests - Add Adornment ContentSize tracking test - Fix ViewportSettingsEditor.ContentSizeValueChanging (gui-cs#4837) - Update Adornments scenario and editors from tabview branch - Update plan status Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
Bordershould supportViewportSettings.Transparent&ViewportSettings.TransparentMouse#4834Summary
Make
BordersupportViewportSettingsFlags.TransparentandViewportSettingsFlags.TransparentMouse. This is a prerequisite for the Border-based TabView redesign (#4183).Plan
See
plans/per-cell-transparent-mouse.mdfor the full implementation plan including root cause analysis and detailed implementation steps.Progress
Proposed Changes
Phase 1: Visual Transparency for Border
Parent.LineCanvasinstead of its own)DrawContextclip exclusion whenTransparentis set (relax the Adornment guard inDoDrawComplete)Phase 2: Drawn-Region-Aware TransparentMouse
Regionafter drawingTest plan
DoDrawCompleteTests— 8 baseline tests for existing clip exclusion behaviorBorderTransparentTests— 3 tests for Border transparency (2 skipped pending implementation)Skipfrom Border transparency tests once implementation is completeTransparentandArrangementscenarios