Skip to content

Add three-state toggle for Markdown Panel (docked → fullscreen → hidden)#174

Open
letreset wants to merge 1 commit into
mohzy83:masterfrom
letreset:feature/three-state-toggle
Open

Add three-state toggle for Markdown Panel (docked → fullscreen → hidden)#174
letreset wants to merge 1 commit into
mohzy83:masterfrom
letreset:feature/three-state-toggle

Conversation

@letreset

Copy link
Copy Markdown

Implements a three-state cycle for the "Toggle Markdown Panel" button:

Click Transition Result
1st Hidden → Docked Panel opens docked on the right (existing behavior)
2nd Docked → Fullscreen Panel expands to nearly full width, covering the editor
3rd Fullscreen → Hidden Panel closes, editor layout restored

Implementation

  • Replaced isPanelVisible bool with PanelState enum (Hidden, Docked, FullScreen)
  • Fullscreen expansion uses DMM_MOVE_SPLITTER message to the Notepad++ DockingManager
  • Original panel width saved as ratio of client area, enabling correct restoration after resize
  • ToolWindowCloseAction and AutoShowOrHidePanel updated for the new state model

Closes #138

- Replace isPanelVisible bool with PanelState enum (Hidden, Docked, FullScreen)
- Cycle through states on each button click:
  1st click: Show panel docked on the right
  2nd click: Expand to fullscreen via DMM_MOVE_SPLITTER
  3rd click: Restore original size and hide panel
- Splitter position restored proportionally via saved width ratio
- ToolWindowCloseAction and AutoShowOrHidePanel updated for new state model
- Added Win32 APIs: GetClientRect, GetWindowRect, GetParent, FindWindowEx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Allow show/hide of source pane and not just rendered view pane

2 participants