File tree Expand file tree Collapse file tree
src/ui/styles/features/reader/layered Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,9 +58,13 @@ export function createWindowController({
5858 } ;
5959 const updateWindowButtons = ( target ) => {
6060 if ( process . platform !== 'darwin' || ! target || target . isDestroyed ( ) ) return ;
61- const visible = ! target . isFullScreen ( ) && ! registry . stateFor ( target ) ?. headerHidden ;
61+ const fullscreen = target . isFullScreen ( ) ;
62+ // Fullscreen's native titlebar reveals with the system menu bar, even
63+ // while the reader hides its own toolbar. Do not hide its standard buttons.
64+ const visible = fullscreen || ! registry . stateFor ( target ) ?. headerHidden ;
6265 target . setWindowButtonVisibility ( visible ) ;
63- if ( visible ) target . setWindowButtonPosition ( windowChromeOptions ( 'darwin' ) . trafficLightPosition ) ;
66+ if ( visible && ! fullscreen )
67+ target . setWindowButtonPosition ( windowChromeOptions ( 'darwin' ) . trafficLightPosition ) ;
6468 } ;
6569 const hideNativeMenuBar = ( target ) => {
6670 if ( ! [ 'win32' , 'linux' ] . includes ( process . platform ) || ! target || target . isDestroyed ( ) ) return ;
Original file line number Diff line number Diff line change @@ -29,7 +29,10 @@ export function shortcutAction(platform, input) {
2929 if ( key === 'pagedown' || ( input . shift && [ 'arrowdown' , 'arrowright' ] . includes ( key ) ) )
3030 return 'page-next' ;
3131 }
32- if ( key === 'f11' && ! input . meta && ! input . control && ! input . alt ) return 'toggle-fullscreen' ;
32+ if ( platform !== 'darwin' && key === 'f11' && ! input . meta && ! input . control && ! input . alt )
33+ return 'toggle-fullscreen' ;
34+ if ( platform === 'darwin' && key === 'f' && input . meta && input . control && ! input . alt && ! input . shift )
35+ return 'toggle-fullscreen' ;
3336 if ( platform === 'darwin' ) {
3437 if ( key === 'w' && input . control && ! input . meta && ! input . alt && ! input . shift )
3538 return 'close-window' ;
Original file line number Diff line number Diff line change 177177 grid-template-columns : minmax (0 , 1fr ) max-content;
178178}
179179
180+ /* Native lights start at x=18 and span 52px (three 12px lights, 20px apart).
181+ Match the window inset, lights-to-button gap, and button-to-title gap. */
182+ .desktop [data-platform = 'darwin' ] .toolbar {
183+ --macos-titlebar-gap : 18px ;
184+ padding-left : calc (52px + 2 * var (--macos-titlebar-gap ));
185+ column-gap : var (--macos-titlebar-gap );
186+ }
187+
180188.desktop .toolbar > .icon-button : first-of-type {
181189 margin : 0 ;
182190}
You can’t perform that action at this time.
0 commit comments