@@ -190,7 +190,7 @@ define(function (require, exports, module) {
190190 $modeBtn ,
191191 $modeBtnGroup ,
192192 $previewBtn ,
193- $designModeBtn ;
193+ $fullScreenBtn ;
194194
195195 let customLivePreviewBannerShown = false ;
196196
@@ -800,7 +800,7 @@ define(function (require, exports, module) {
800800 livePreview : Strings . LIVE_DEV_STATUS_TIP_OUT_OF_SYNC ,
801801 clickToReload : Strings . LIVE_DEV_CLICK_TO_RELOAD_PAGE ,
802802 clickToToggleEdit : Strings . LIVE_PREVIEW_MODE_TOGGLE_EDIT ,
803- switchToDesignMode : Strings . CCB_SWITCH_TO_DESIGN_MODE ,
803+ fullScreenLivePreview : Strings . LIVE_PREVIEW_FULL_SCREEN ,
804804 livePreviewSettings : Strings . LIVE_DEV_SETTINGS ,
805805 livePreviewConfigureModes : Strings . LIVE_PREVIEW_CONFIGURE_MODES ,
806806 clickToPopout : Strings . LIVE_DEV_CLICK_POPOUT ,
@@ -833,7 +833,7 @@ define(function (require, exports, module) {
833833 $modeBtn = $panel . find ( "#livePreviewModeBtn" ) ;
834834 $modeBtnGroup = $panel . find ( "#lpModeBtnGroup" ) ;
835835 $previewBtn = $panel . find ( "#previewModeLivePreviewButton" ) ;
836- $designModeBtn = $panel . find ( "#designModeToggleLivePreviewButton " ) ;
836+ $fullScreenBtn = $panel . find ( "#fullScreenLivePreviewButton " ) ;
837837
838838 // Markdown theme toggle — persist user choice
839839 MarkdownSync . setThemeToggleHandler ( ( theme ) => {
@@ -918,28 +918,25 @@ define(function (require, exports, module) {
918918 Metrics . countEvent ( Metrics . EVENT_TYPE . LIVE_PREVIEW , "reloadBtn" , "click" ) ;
919919 } ) ;
920920
921- // Design-mode toggle: mirrors the CCB's pen-nib button so the user can
922- // enter/exit design mode without moving focus to the sidebar strip.
923- // Icon swaps between fa-expand (enter) and fa-compress (exit).
924- function _updateDesignModeButton ( ) {
925- const on = WorkspaceManager . isInDesignMode && WorkspaceManager . isInDesignMode ( ) ;
926- const $icon = $designModeBtn . find ( "i" ) ;
927- $icon . removeClass ( "fa-expand fa-compress" )
921+ function _updateFullScreenButton ( ) {
922+ const on = WorkspaceManager . isInLPFullScreen && WorkspaceManager . isInLPFullScreen ( ) ;
923+ $fullScreenBtn . find ( "i" )
924+ . removeClass ( "fa-expand fa-compress" )
928925 . addClass ( on ? "fa-compress" : "fa-expand" ) ;
929- $designModeBtn . attr ( "title" ,
930- on ? Strings . CCB_SWITCH_TO_CODE_EDITOR : Strings . CCB_SWITCH_TO_DESIGN_MODE ) ;
931- if ( $modeBtn ) {
932- $modeBtn . toggle ( ! on && ! _isMdviewrActive ) ;
933- }
926+ $fullScreenBtn . attr ( "title" ,
927+ on ? Strings . LIVE_PREVIEW_EXIT_FULL_SCREEN : Strings . LIVE_PREVIEW_FULL_SCREEN ) ;
934928 }
935- $designModeBtn . click ( ( ) => {
936- CommandManager . execute ( Commands . VIEW_TOGGLE_DESIGN_MODE ) ;
937- Metrics . countEvent ( Metrics . EVENT_TYPE . LIVE_PREVIEW , "designModeBtn " , "click" ) ;
929+ $fullScreenBtn . click ( ( ) => {
930+ CommandManager . execute ( Commands . VIEW_TOGGLE_LP_FULL_SCREEN ) ;
931+ Metrics . countEvent ( Metrics . EVENT_TYPE . LIVE_PREVIEW , "fullScreenBtn " , "click" ) ;
938932 } ) ;
939933 WorkspaceManager . off ( WorkspaceManager . EVENT_WORKSPACE_DESIGN_MODE_CHANGE + ".livePreview" ) ;
940934 WorkspaceManager . on ( WorkspaceManager . EVENT_WORKSPACE_DESIGN_MODE_CHANGE + ".livePreview" ,
941- _updateDesignModeButton ) ;
942- _updateDesignModeButton ( ) ;
935+ _updateLPControlsForMdviewer ) ;
936+ WorkspaceManager . off ( WorkspaceManager . EVENT_WORKSPACE_LP_FULL_SCREEN_CHANGE + ".livePreview" ) ;
937+ WorkspaceManager . on ( WorkspaceManager . EVENT_WORKSPACE_LP_FULL_SCREEN_CHANGE + ".livePreview" ,
938+ _updateFullScreenButton ) ;
939+ _updateFullScreenButton ( ) ;
943940
944941 // init the status overlay
945942 _initOverlay ( ) ;
0 commit comments