Conversation
Add Editor only, Split view and Preview only buttons to the VCL studio toolbar. The three buttons share a GroupIndex and leave AllowAllUp false, so the VCL keeps exactly one of them pressed. ApplyViewMode now syncs the pressed button, so it also follows the other ways the mode can change: Ctrl+1/2/3, the command palette, session restore and leaving zen mode. Glyph and hint constants go in the shared defines unit next to the existing toolbar glyphs. The code points are present in both Segoe Fluent Icons and the Segoe MDL2 Assets fallback.
This was referenced Sep 16, 2026
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.
I found this repository and decided to try it as I searched for a Delphi implementation of Markdown editor.
Generally it looks good but found some things I want to change. These a separated in PR's.
What
Adds three toolbar buttons to the VCL studio example for switching the view mode: Editor only, Split view and Preview only.
The modes themselves already existed, reachable through
Ctrl+1/Ctrl+2/Ctrl+3and the command palette. This only puts them on the toolbar, between the formatting group and the theme button.How
The three buttons share a
GroupIndexand leaveAllowAllUpatFalse, so the VCL keeps exactly one of them pressed: clicking one releases the other two, and clicking the active one leaves it down.ApplyViewModecalls the newUpdateViewModeButtons, so the pressed button stays correct no matter how the mode was changed. That covers the toolbar, the keyboard shortcuts, the command palette, session restore on startup and leaving zen mode.Glyph and hint constants live in
Examples/Shared/Markdown4DStudio.Defines.pasnext to the existing toolbar glyphs. The chosen code points (E70Fpencil,E89Atwo page,E890eye) are present in both Segoe Fluent Icons and the Segoe MDL2 Assets fallback, which matters becauseResolveIconFontNamefalls back to MDL2 on machines without the Fluent font.Scope
VCL example only. The shared defines change is additive, so the FMX studio is unaffected; it could adopt the same buttons in a follow-up.
Testing
Markdown4DStudioVCLandMarkdown4DStudioFMXbuild clean on Win32 Debug with Delphi 12 Athens.Ctrl+1/Ctrl+2/Ctrl+3and across toolbar clicks.