[LyX/master] #11756 cleanup the view menu on Mac

Stephan Witt st.witt at gmx.net
Sun Aug 30 20:29:55 UTC 2020


Am 30.08.2020 um 16:56 schrieb Pavel Sanda <sanda at lyx.org>:
> 
> On Sun, Aug 30, 2020 at 03:58:34PM +0200, Stephan Witt wrote:
>> 1. Tab Bar related - I don???t know how. Probably not w/o Qt-support for it.
> 
> showBar like in GuiWorkArea.cpp:1714 does not work?
> It could be easily added as a part of ui-toggle lfun.

Ok, I looked it up.

In one of the releases notes for Apple Developers one can find this:
===================================
NSWindow Automatic Window Tabbing

Automatic Window Tabbing allows any application to easily (and automatically) adopt tabs. This feature stacks multiple windows together and presents a tab bar in the window title bar area to make it appear to the user as though there is one single window. In reality, only the selected tab's window is shown, and all the other windows are hidden directly using CoreGraphics. An application only has to order a window in, and it will automatically be tabbed with similar windows based on heuristics the user's preference for tabbing. Ordering a window out removes the tab. Windows that are not visible are ordered out with respect to CoreGraphics, but are still considered visible with respect to AppKit / NSWindow.

There is a new user System Preference under the Dock section to control tabbing. The behavior of this preference is described in General Flow below.

The NSWindow header has two new enumerations (NSWindowUserTabbingPreference, NSWindowTabbingMode) and several new properties. Please examine the header for some detailed comments on what the new methods are for.

API Adoption

    •    What should an application which works well with out-of-the-box window tabbing do? - In general, nothing has to be done. A non-NSDocument based application may wish to support the "+" button by implementing newWindowForTab: somewhere in the responder chain.
    •    What should an application which already has support for tabbing do? - The application should explicitly opt-out of automatic window tabbing by calling [NSWindow setAllowsAutomaticWindowTabbing:NO]. It should respect the userTabbingPreference and create tabs based on the General Flow described below.
    •    What should an application do to customize the standard tabbing behavior? - See the detailed Behavior section below for how the properties interact with each other.

See here:
https://developer.apple.com/library/archive/releasenotes/AppKit/RN-AppKitOlderNotes/index.html 
===================================

I understand it this way:

1. We should opt-out the menu item (as I did with my change).
2. We should check for the value of NSWindowUserTabbingPreference on reading lyxrc and use it if there is no value defined.

Something like the attached patch will do (2).

Stephan

PS: I’ve added three screen shots how it looks on US desktop. It feels really broken. LyX title is drawn twice. Our document window including toolbars will be put inside another tabbing level.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-11756-Respect-system-preferences-for-tabbing-on-Mac.patch
Type: application/octet-stream
Size: 2117 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200830/02aa1b3a/attachment-0001.obj>
-------------- next part --------------


-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bildschirmfoto 2020-08-30 um 21.50.35.png
Type: image/png
Size: 64005 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200830/02aa1b3a/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bildschirmfoto 2020-08-30 um 21.49.35.png
Type: image/png
Size: 66812 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200830/02aa1b3a/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bildschirmfoto 2020-08-30 um 21.49.19.png
Type: image/png
Size: 64440 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200830/02aa1b3a/attachment-0005.png>


More information about the lyx-devel mailing list