Commit Graph

4090 Commits

Author SHA1 Message Date
Allan Odgaard
5b686f66e8 Set default light/dark themes when enabling changeThemeBasedOnAppearance 2018-11-06 20:01:34 +07:00
Allan Odgaard
c288adf982 Add a constant for the Twilight theme UUID 2018-11-06 20:00:08 +07:00
Ronald Wampler
cb5997717d Allow switching themes based on the effective appearance
The feature is currently not exposed via the UI.

To enable set the changeThemeBasedOnAppearance defaults key to YES and assign the darkModeThemeUUID and universalThemeUUID default keys with the desired theme uuids to use in dark or light mode, respectively.
2018-11-06 19:29:19 +07:00
Ronald Wampler
d5c929dfaf Move theme relate methods out of the status bar delegate section 2018-11-06 19:29:19 +07:00
Allan Odgaard
663a9a638a Do not blend file browser content with header on 10.11 and earlier
Also disable the blurred background as it is mainly for dark mode, which was introduced in 10.14.
2018-11-06 19:26:08 +07:00
Allan Odgaard
1e71ce0855 Use hypot function to calculate mouse drag distance
Also update the threshold from 1.0 to 2.5 pixels, as that was already used a few other places, and a single pixel’s threshold seems low.
2018-11-06 17:27:07 +07:00
Allan Odgaard
abcf28b517 Replace macro recording image with red (flat) circle 2018-11-05 19:16:24 +07:00
Allan Odgaard
1d41f708e0 Move tabs to title bar 2018-11-05 19:16:24 +07:00
Allan Odgaard
5f63ee096b Remove ability to have file browser header in the tab bar
This style is not easily compatible with moving the tab bar view to the window title.
2018-11-05 19:16:24 +07:00
Allan Odgaard
f242bd67e5 Use NSIsEmptyRect instead of comparing size to NSZeroSize 2018-11-05 19:16:24 +07:00
Allan Odgaard
477d906399 Change accessibility label of folder pop-up button to “Current folder”
The system file dialog has this labelled as “where” but I think “current folder” is more appropriate.
2018-11-05 19:16:24 +07:00
Allan Odgaard
d8b0801a63 Update selected tab index when tab bar has no selected tab
Currently OakTabBarView defaults to selecting first tab, but we shouldn’t assume that.
2018-11-05 19:16:24 +07:00
Allan Odgaard
1350c4c904 Send performClose: to window delegate instead of to OakTabBarView
This is in preparation of moving the tab bar view out of the window content view and into the titlebar.
2018-11-05 19:16:24 +07:00
Allan Odgaard
a03c2afd66 Add missing include 2018-11-05 19:16:24 +07:00
Allan Odgaard
10ef832b37 Rename setSelectedTab: → setSelectedTabIndex: 2018-11-05 19:16:24 +07:00
Allan Odgaard
5ac3a41d58 Update OakScopeBarView to new accessibility API (10.10) 2018-11-05 19:16:24 +07:00
Allan Odgaard
a12db33d86 Update OakDocumentView to new accessibility API (10.10) 2018-11-05 19:16:24 +07:00
Allan Odgaard
b05ef9d3f9 Limit public API of OakTabBarView 2018-11-05 19:16:24 +07:00
Allan Odgaard
892a6072ae Move OakTabBarStyle to own header
This allows us to make OakTabItemView.h a private header.
2018-11-03 11:17:08 +07:00
Allan Odgaard
c5f1a6c098 NSVisualEffectBlendingModeWithinWindow requires a layer backed view 2018-11-02 20:52:02 +07:00
Allan Odgaard
1aa569cdf2 Draw a custom dash for removing find results and favorites
The NSImageNameRemoveTemplate looks bad in 10.14, and while there is some duplication in this commit, it’s so few lines that sharing this functionality would result in an increase of total number of lines.
2018-11-02 16:31:49 +07:00
Allan Odgaard
74d77b9e59 Use NSBoxSeparator instead of configuring the border manually 2018-11-02 12:10:37 +07:00
Allan Odgaard
51a3f899c4 Use file browser’s icon support for the bundle item chooser
This is just for the custom dict file type icon (when showing keyboard layout entries).
2018-11-02 11:00:02 +07:00
Allan Odgaard
4c339ada62 Let file browser scroll view extend behind its header 2018-11-02 10:49:56 +07:00
Allan Odgaard
12d339cdb8 fixup! Don’t use textured windows for Open Quickly (⌘T) and friends 2018-11-02 08:40:39 +07:00
Allan Odgaard
f3d8af5ca6 Use full size content view for pasteboard choosers 2018-11-02 08:40:39 +07:00
Allan Odgaard
56acb17990 Use full size content view for Open Quickly (⌘T) and friends
This make the content of the table view affect the background of the title/footer views.
2018-11-02 08:40:39 +07:00
Allan Odgaard
14ae6019bf Update all instances of accessibilitySetOverrideValue:forAttribute: 2018-11-02 08:40:39 +07:00
Allan Odgaard
de48a1f250 Patch (rather than replace) the key view loop when replacing views
Also set the new key view loop as initial first responder, as we activate that view in showWindow.
2018-11-02 08:40:39 +07:00
Allan Odgaard
3a16ca1bf0 Refactor OakChooser superclass 2018-11-02 08:40:39 +07:00
Allan Odgaard
efd504e536 Make OakChooser windows inherit from NSWindowController 2018-11-02 08:30:55 +07:00
Allan Odgaard
239b46ce66 Change symbol chooser’s document property to TMDocument
This is to avoid issues with AppKit when changing OakChooser to be a subclass of NSWindowController, as NSWindowController already has a document property and makes some assumptions about this.

I picked TMDocument over oakDocument only because I wasn’t sure how to capitalize the latter for getter/setter.
2018-11-02 08:30:55 +07:00
Allan Odgaard
709570049f Make OakPasteboardChooser be an NSWindowController subclass 2018-11-02 08:30:55 +07:00
Ronald Wampler
3c56208329 Use dynamic colors for the background and text in OakKeyEquivalentView 2018-11-02 08:22:24 +07:00
Allan Odgaard
6419bec6ce Make the table view in pasteboard history a “full size content view”
This makes the content of the table view scroll behind the title bar and footer.
2018-11-01 18:21:47 +07:00
Allan Odgaard
bcda0d2774 Use visual effect view for snippet pop-up menu (10.11)
On 10.14 we use the “behind window” blending mode as we’d prefer the background to differ from that of the text view itself, though I am not seeing much of a difference here.
2018-11-01 15:39:33 +07:00
Allan Odgaard
3d829d6656 Make OakChoiceMenu an NSWindowController subclass 2018-11-01 15:23:48 +07:00
Allan Odgaard
2d0837aad5 Prefix instance variables with underscore in OakChoiceMenu 2018-11-01 15:21:17 +07:00
Allan Odgaard
80681fc6a4 Add NSVisualEffectView behind file browser when running on 10.11 2018-11-01 14:43:41 +07:00
Allan Odgaard
e2b0d44ce2 Do not open document in existing project if option key is down 2018-11-01 11:49:01 +07:00
Allan Odgaard
75624f7df9 Automatically set “allows key equivalents when hidden” for hidden items
This is limited to hidden items that have a key equivalent assigned to them, although if they don’t, there is probably no harm in enabling this option.
2018-11-01 00:16:04 +07:00
Allan Odgaard
1cbaf05615 Set titlebarAppearsTransparent for main window
This makes the title bar render in the same color as it did prior to building on 10.14, so that the current tab colors match.

It does however make sheets appear from “above” the title bar and makes the Dark Mode style darker, so this is just an intermediate fix until the tab bar gets revamped for 10.14.
2018-11-01 00:10:20 +07:00
Allan Odgaard
c9618f8eb1 Exception was thrown when requesting icon for document with no path
This could happen when doing “Find All” for an untitled document, as the find dialog uses the document’s icon in the search results.
2018-10-31 23:21:33 +07:00
Allan Odgaard
4e5f5f71a2 Use beginSheetModalForWindow:completionHandler: over deprecated API 2018-10-31 23:10:31 +07:00
Allan Odgaard
96d1220e63 Use self.window instead of accessing instance variable of superclass 2018-10-31 23:07:52 +07:00
Allan Odgaard
dd41b992f7 Assume @available directive is available (Xcode 9) 2018-10-31 22:56:24 +07:00
Allan Odgaard
48605ef4e9 The bundle selection menu now uses same appearance as the calling view
Only when there are no open windows, and the user is triggering the bundle item selection menu, will it default to the light aqua appearance.
2018-10-31 10:32:46 +07:00
Allan Odgaard
e8a3cb8f57 Do not use OakFileIconImage for menu items and recent projects
On macOS 10.14 this image doesn’t always render, so this is a temporary workaround.

The main advantage of using OakFileIconImage is the added SCM badge and custom icon for known file types.
2018-10-31 00:54:01 +07:00
Allan Odgaard
e7d87af3f5 Remove unused include of OakFileIconImage.h
This should have been removed in commit 584cadfc17.
2018-10-31 00:50:08 +07:00
Allan Odgaard
5933be295b Move search fields to title bar in pasteboard history dialogs
Also change divider colors to use standard separator color.
2018-10-31 00:28:49 +07:00