NSWindow tab bar is hidden even with multiple windows in the tab group - cocoa

I'm trying to add tabs to an old codebase, and followed along the documentation. But the tab bar remains hidden, even with multiple windows in the tab group: The menu Window > Show Previous Tab and Window > Show Next Tab work as expected.
With a breakpoint after:
self.window?.addTabbedWindow(newWindow, ordered: .above)
newWindow.orderFront(self.window)
newWindow.makeKey()
The tab bar is visible, until I continue the breakpoint.
Inspecting the NSWindow.tabGroup.tabBarVisible before and later also has the tab bar set as visible.

Turns out the tab bar is implemented as a NSTitlebarAccessoryViewController and is part of the NSWindows.titlebarAccessoryViewControllers.
The problem was we also used a NSTitlebarAccessoryViewController in our app, and removed it by iterating all NSWindows.titlebarAccessoryViewControllers and removing each one.

Related

Zoom one tab or all tabs

I am looking for a way to zoom only one tab.
When I press Ctrl++ to zoom my Firefox tab, all other tabs are also changed, creating a problem.
I have checked all the menu setting and nothing is available for this setting, at least not from the menu.
In Firefox address bar type: about:config
Press the box "I accept the risk" (or similar button)
In the Search Box type: zoom.siteSpecific
If you want Zoom to only effect one tab then set False under Value.
If you want Zoom to effect all tabs then set True under Value
You can change the value by double-clicking the line or right-click and select Toggle.
Note: You can restore zoom by selecting CTRL+0 (zero) or on the menu select View --> Zoom --> Reset.

members occurrences not showing in scroll bar in Visual Studio?

I used to use this feature to see the number of occurances and position of a type or member. It supposed to work when I click a member and it's highlighted in grey, and all the occurrences drawn along the scroll bar as grey dots, representing the number of occurrences and their positions. Now I miss this helpful feature, and the only way to use it, is to copy the member name and paste it in the Find window. How to bring it back to Visual Studio?
To change the scroll bar mode, right click on the scroll bar itself and choose Scroll Bar Options from the context menu. You could also locate the scroll bar settings by typing “scroll bar” in the Quick Launch, or by navigating to Tools | Options | Text Editor | All Languages | Scroll Bars from the menu

Visual Studio 2013 - Replace All Button gone (not just off screen)

I am unable to perform multi-file text search and replace (in Visual Studio).
In the past, when I opened the "Replace in Files" dialog, there were 4 buttons in the lower right. One of the bottom two buttons allowed me to "Replace All".
The two lower buttons (including "Replace All") are no longer present.
I believe this occurred after I changed some Windows settings so that I could use menus without the Magnifier.
It is not just a matter of the buttons being off-screen because the window is too large (although it is too large - they would be off-screen, if they were present).
I can drag the window and see the bottom, even though the top is then off-screen (I use AltWindowDrag, allowing me to hold the ALT key, and drag by any part of the window, not just the title bar).
The two lower buttons are not present. I'm unable to resize the window - when I try, nothing happens, or the window repositions so that I can see the title bar, but can no longer see the bottom.
The two buttons that are still present (Find Next and Replace) don't have keyboard shortcuts, so I presume that Replace All doesn't either. Nor can I select either of those two buttons using Tab, so probably can't select an "invisible" "Replace All" button that way.
Any help appreciated.
You can use Find and Replace by pressing Ctrl+H and to Replace All just use Alt+A.

firefox pinned tabs/app tabs

I want to move the pinned tabs so that they are on the right side of the tab bar.
Is there a separate bar for the pinned tabs?
If so, how can I either move the "pinned tab bar" so that it stays to the right, relative to the normal tab bar?
Does anyone have any thoughts or code snippets so that I can manipulate the pinned tabs?
It's all done using relative positioning. If you wanted everything to line up to the right you'll have to essentially rewrite this function, _positionPinnedTabs see it here in the source code: http://mxr.mozilla.org/mozilla-central/source/browser/base/content/tabbrowser.xml#3179
With a function like _positionPinnedTabs using MozMarginEnd (in the tab box case) instead of MozMarginStart you could create the right hand side space for the tabs. Then you'd just need to position the tabs correctly in that space. Sorry it's not easier :)

Visual Studio: How can I see the same file in two separate tab groups?

I want to be able to edit one method while looking at another method in the same file, as reference.
Can this be done?
You can open the file in another tab (Window -> New Window).
Doing so you have two copies of the same file. Then you can right-click the tab bar and select New Vertical Tab Group (or New Horizontal Tab Group, the one you like more).
Hope I understood you question..
Be on the tab you want to duplicate,then click in the menu bar at the top onWindow > New Window
Finally drag & drop the second window to the the left or right side to show both views next to each other.
Et voila, there you have it :)
EDIT
It seems that this function is not implemented in all version of VS.
In my case (V 15.4.2 (2017), V 15.9.7 (2017) & V 16.2.5 (2019)) it just works fine.
Only vertically that I'm aware. When looking at the code, right above the vertical scroll bar is a small rectangle, drag it down to get a split view of the file.
You simply use the small drag arrows icon at the top right corner of your file window as depicted in the following screenshots:
1) View the same document side-by-side (with a fix for Visual Studio 2017)
It is possible to do this using New Window and New Vertical Tab Group, however, in my Visual Studio 2017 the New Window command was missing from the Window menu. To use it, first you must add the command to a menu or assign a shortcut to it.
To add New Window to your Window menu follow this sequence, starting with the Tools menu:
Tools > Customize > Commands > Menu Bar > Window > Add Command > Window > New Window
FYI In the Commands step you decide where to put the New Window command. The sequence I gave above puts it unceremoniously at the top of the Window menu.
To view the same document side-by-side
Open the document you want to view side-by-side
Select your recently added New Window command (perhaps it's in Window > New Window)
Right click the new tab and select New Vertical Tab Group or select that command from the Window menu
2) View the same document above-one-another
If you wish to view the same document in two views on top of each other use the Window > Split command or click-and-drag the double-arrow at the top of the scroll bar for any window.
3) Get creative
FYI You can even combine the two view options to have three, four or even more views of the same document on a particularly wide monitor. On mine (2560 x 1080) I can comfortably get three side-by-side views going and split them vertically, if desired.
One can install VsVim extension and :sp :vsp does the trick.
In Visual Studio 15 you can just click inside the document and then "Window → Split"

Resources