Commit Graph

5224 Commits

Author SHA1 Message Date
Allan Odgaard
eccbb81e8a Constrain height of vertical dividers and remove intrinsic height
Previously some status bars could be compressed vertically because the dividers did not have a fixed height, so they were sized based on their intrinsic height.

With a fixed height the intrinsic height is redundant and previously it was simply hiding an issue with an under-constrained layout, so better just remove them.
2020-04-14 12:58:10 +07:00
Allan Odgaard
e490b86c47 Make horizontal dividers subviews of status bar (NSVisualEffectView)
This makes the color of the separator bar better adapt to the color of the status bar and should make things more consistent, as we already have separators inside visual effect views in various places.

Also adjust height of the vertical separators in status bars to only be 15 pixels so that we have equal padding above and below.
2020-03-29 10:23:42 +07:00
Allan Odgaard
07c8a76abd Use OakCreateNSBoxSeparator() for file browser’s actions view
This is instead of the more opaque OakCreateHorizontalLine(OakBackgroundFillViewStyleDivider).
2020-03-29 10:21:30 +07:00
Allan Odgaard
de5d1b5239 Use OakCreateNSBoxSeparator() for HTML output window
This is instead of the more opaque OakCreateHorizontalLine(OakBackgroundFillViewStyleDivider).
2020-03-29 10:21:30 +07:00
Allan Odgaard
7d0a1dea74 Use OakCreateNSBoxSeparator() for file browser view
This is instead of the more opaque OakCreateHorizontalLine(OakBackgroundFillViewStyleDivider).
2020-03-29 10:21:30 +07:00
Allan Odgaard
d7ec9e6690 Use OakCreateNSBoxSeparator() for live search and grammar installation
This is instead of the more opaque OakCreateHorizontalLine(OakBackgroundFillViewStyleDivider).
2020-03-29 10:21:30 +07:00
Allan Odgaard
ac36f84c4d Use OakCreateNSBoxSeparator() for search results
This is instead of the more opaque OakCreateHorizontalLine(OakBackgroundFillViewStyleDivider).
2020-03-29 10:21:30 +07:00
Allan Odgaard
be408c04cd Use OakCreateNSBoxSeparator() for commit window
This is instead of the more opaque OakCreateHorizontalLine(OakBackgroundFillViewStyleDivider).

Also use NSLayoutFormatAlignAllLeading with the visual format language instead of manually creating constraints for the dividers.
2020-03-29 10:21:30 +07:00
Allan Odgaard
33b615fd14 Let OFBHeaderView be NSVisualEffectView subclass with titlebar material
Previously it was a subclass of OakBackgroundFillView which adds the NSVisualEffectView as a subview, but this messes up compositing in some cases where an ancestor view is also an NSVisualEffectView, for example when placing the file browser in a “source list” split view item (using NSSplitViewController).

Also change the material to NSVisualEffectMaterialTitlebar. I think this looks better, as the previously used NSVisualEffectMaterialHeaderView does not look identical to other table view headers and only have very faint bottom border but very noticeable “within window” compositing.

A further advantage of changing to title bar material is that NSVisualEffectMaterialHeaderView requires macOS 10.14, so by using title bar material, we avoid having a different code path for users using older versions of macOS.
2020-03-29 10:21:30 +07:00
Allan Odgaard
ac58ed4588 Remove OakCreateDividerImageView 2020-03-29 10:21:30 +07:00
Allan Odgaard
e7ea79cffe Use OakCreateNSBoxSeparator() instead of OakCreateDividerImageView()
The latter is a wrapper around an NSBoxSeparator, only adding some size constraints.
2020-03-29 10:21:27 +07:00
Allan Odgaard
8059ca1fc1 Add helper to create NSBoxSeparator view 2020-03-20 16:18:12 +07:00
Allan Odgaard
7adf668773 Always setup file browser scroll view to inset content based on header
Previously we would only do this on macOS 10.14 and later, but as we now also use “within window” compositing for the header view prior to macOS 10.14, we should always inset the scroll view.

Furthermore, even without “within window” compositing, insetting the scroll view should not cause any issues, so the code was actually not required previously.
2020-03-20 16:18:12 +07:00
Allan Odgaard
3428c5cdfb Fix missing default folder location for new file browser windows 2020-03-20 15:06:23 +07:00
Allan Odgaard
0545f02620 Add support for NSRestorableState to FileBrowserViewController 2020-03-13 16:39:15 +07:00
Allan Odgaard
2410ba345f Refactoring: Move logic from FileBrowserView → FileBrowserViewController
This is to make it easier to support Cocoa’s native resume feature, as for this, we should keep all state in the controller, but also, the controller should be able to know if view state changes, for example expanded/selected items in the outline view, which require our controller to be the delegate.
2020-03-11 21:22:25 +07:00
Allan Odgaard
fa9e690309 Formatting: Align closing braces 2020-03-11 14:08:53 +07:00
Allan Odgaard
3ca83220bb Add URL property to FileBrowserViewController
This should be used instead of path, as we may display non-file URLs.
2020-03-11 13:35:04 +07:00
Allan Odgaard
66bfb817d6 Set NSWindowAnimationBehaviorDocumentWindow for our document window 2020-02-29 13:18:55 +07:00
Allan Odgaard
3d4b72c0ff Add own framework header paths to include path before third party
This is because third party framework headers are likely to be installed in directories with many other headers that can clash with some of our custom frameworks.

Closes #1441.
2020-02-28 12:54:02 +07:00
Andreas
5a58f05a1a Syntactic Typo 2020-02-28 12:54:02 +07:00
Allan Odgaard
2cb43a6ef3 Checkin release notes for 2.0.6 2020-02-28 12:54:02 +07:00
Allan Odgaard
dc185a42a3 Checkin release notes for 2.0.5 2020-02-28 12:54:02 +07:00
Allan Odgaard
a9c668ba39 Simplify NSAttributedString subclass used for menu titles
We now do all the work in NSMenuItem’s setActivationString: and no longer require subclassing the mutable versions of NSAttributedString.

It should now be more transparent what the code does and why it does it.
2019-12-28 09:54:18 +07:00
Allan Odgaard
464fdbfba4 Fix double height of menu items with custom shortcuts
Starting with macOS 10.15 the system will use new NSAttributedString API to obtain bounding rect, so we need to (also) overload this to return our fixed bounding rectangle.
2019-12-28 09:24:30 +07:00
Allan Odgaard
aeec0874b3 Fix warning about invalid ERB trim mode
We don’t care about the trim mode as nobody is reading the generated HTML, but we have to supply something, previously we enabled everything, which is now giving an error despite the documentation saying that trim mode can be “one or more of the following modifiers”:

	%  enables Ruby code processing for lines beginning with %
	<> omit newline for lines starting with <% and ending in %>
	>  omit newline for lines ending in %>
	-  omit blank lines ending in -%>

It would seem that ‘<>’ is mutually exclusive with ‘-’ so now we pass ‘%-’ for trim mode.
2019-12-26 23:20:48 +07:00
Allan Odgaard
2a1553fbd7 Rename custom property to support building with the macOS 10.15 SDK 2019-12-15 13:01:20 +07:00
Allan Odgaard
3a214f6311 Checkin release notes for 2.0.4 v2.0.4 2019-12-15 12:10:51 +07:00
Allan Odgaard
afe008e028 Allow invalid ranges to be passed to nsRangeForRange:
Since this is internal API it should not be necessary to sanitize the range, but based on textmate/bugs#34 it is causing a lot of crashes on macOS 10.15.
2019-12-15 12:06:56 +07:00
Allan Odgaard
504a42307e Passing ‘-deep’ to code sign should no longer be necessary
This is because we ensure that each target copied to another target, gets signed before we copy it.

We initially used ‘-deep’ but that actually never worked fully, as it didn’t find all executables in our bundle, presumably only embedded bundles like frameworks and plug-ins were found and signed.
2019-11-01 08:46:20 +01:00
Allan Odgaard
4f39295aef Checkin release notes for 2.0.3 v2.0.3 2019-10-28 10:25:33 +01:00
Allan Odgaard
362d870563 fixup! Fix issue with FSEvents wrapper when dealing with multiple volumes
The updated code was leaving a trailing slash on directory paths which would make cache lookups fail.
2019-10-28 10:15:13 +01:00
Allan Odgaard
1903a2edec Checkin release notes for 2.0.2 v2.0.2 2019-10-27 15:39:50 +01:00
Allan Odgaard
9565bb4910 Add NSStandardKeyBindingResponding to OakTextView’s interface 2019-10-27 15:27:03 +01:00
Allan Odgaard
0f66772bdb Remove whitespace. 2019-10-27 15:25:53 +01:00
Allan Odgaard
9f339bfcf6 Do not hardcode the type of utf8::iterator_t
This is to allow it to be used with both const and non-const character buffers (the latter being returned from std::string’s data member function).
2019-10-27 15:25:35 +01:00
Allan Odgaard
d5440d86e8 For bundle commands we now write the script to ~/Library/Caches
Previously we used the system’s temporary directory and removed the script after use.

This is because macOS 10.15 will “call home” (notarization?) when executing a new script (that it has not seen before), so with an unstable network connection, running commands could take several seconds.
2019-10-27 15:24:08 +01:00
Allan Odgaard
aff1273d53 Context menu items for tabs would be disabled in full screen mode
Apparently the window’s delegate is not used for context menu actions in full screen mode, although NSApp’s targetForAction: does find the receiver, so this appears to be a framework bug.
2019-10-27 15:20:14 +01:00
Allan Odgaard
82c4e272a4 Remove unnecessary crash reporting diagnostics 2019-10-27 15:18:20 +01:00
Allan Odgaard
5a6cf83e2d Fix issue with FSEvents wrapper when dealing with multiple volumes
The specific issue being addressed is macOS 10.15 where the mount point for ~/Library/Application Support is under /System/Volumes/Data so our assertion that the relative path received in our callback can be appended to the mount point, to match the path being observed, is false.

As a workaround we call realpath() on the path we wish to observe, observe that path, and in our callback we calculate the relative path from the real observed path, and append that to the requested path.

In theory the caller could be made responsible for expanding paths to their real path, but the current abstraction allows observing non-existing paths, which is why it needs to handle this path rewriting.
2019-10-27 15:17:03 +01:00
Allan Odgaard
6f68ea7303 Do not use custom white I-beam cursor on macOS 10.14
The I-beam cursor on macOS 10.14 has a white outline that makes it visible when used with dark themes.
2019-10-14 14:47:38 +02:00
Allan Odgaard
2560ce697d Change placeholder text for license key
The old text (example key) was easily mistaken for having entered a license key into the dialog.
2019-10-14 08:56:48 +02:00
Allan Odgaard
a08987b097 Explicitly zero weak pointer to tab bar view when removed from superview
If one event cycle triggered multiple re-layouts, we could end up reusing a tab bar view that had been removed from its superview because the weak pointer had not yet been cleared (as the view hadn’t yet been fully released).

This could happen during window construction in a scenario like this:

1. Window gets created at some size, tab bar views are created
2. Window size gets restored causing some tab bar views to be removed
3. Active tab gets restored bringing an overflow tab into the visible area, re-using a removed view
2019-10-14 08:38:52 +02:00
Allan Odgaard
4c7b98d0bf Remove superfluous spacing for aligned assignments 2019-10-07 21:28:16 +02:00
Allan Odgaard
079377ed49 Require macOS 10.12 and remove compatibility checks 2019-10-07 21:28:16 +02:00
Allan Odgaard
4b4e5fca8b Remove code required for compatibility with 10.10 and earlier 2019-10-07 21:28:16 +02:00
Allan Odgaard
f83d3b2e14 Checkin release notes for 2.0.1 v2.0.1 2019-10-07 12:37:35 +02:00
Allan Odgaard
990672d1f7 Support macOS 10.11
We don’t yet rely on any 10.12 specific API other than os_log which can be skipped without user impact.

Unfortunately when trying to build for 10.10 using latest Xcode/SDK the linker gives an error for missing symbol: _objc_loadClassref.

Going forward we will require 10.12 but as there is no non-beta build for 10.11 users yet, I wanted to make one.
2019-10-07 12:32:01 +02:00
Max Brunsfeld
ecca53d796 Don't push to the parse stack for rules without while or end patterns 2019-10-07 11:44:25 +02:00
Sam Oldak
ad9229b591 Update Changes.md
typo
2019-10-06 11:09:39 +02:00