Commit Graph

2985 Commits

Author SHA1 Message Date
Allan Odgaard
c080a5d5d3 Use NSNegateBooleanTransformerName constant instead of string 2014-10-02 11:03:40 +02:00
Allan Odgaard
639f1d282f Remove OakCreateSmallLabel helper since it’s only used once 2014-09-30 17:08:01 +02:00
Allan Odgaard
bb87e6fabe Do not relayout tabs to the left of clicked close button
Previously we would still perform layout on the tabs to the left since with tabs having equal width, the layout should result in the same. Now that we compress tabs, the layout can change.

In theory the user could close a tab, have the mouse remain inside the tab bar, and then perform an action that changes the underlying tabs, which would then leave us with tab item views that need layout.
2014-09-30 17:05:54 +02:00
Allan Odgaard
5de3b2558a Redistribute tab whitespace to minimize title compression 2014-09-30 17:05:53 +02:00
Allan Odgaard
894314592f Enable tab overflow button before doing layout
This is so that we can use fittingSize during layout (i.e. have it include the width of the overflow button when the tab item view shows it).
2014-09-30 17:05:53 +02:00
Allan Odgaard
62e197a310 Close button for modified tab items was initially hidden 2014-09-30 17:05:53 +02:00
Allan Odgaard
c50ec2da34 Doing tab layout with no selected tab would lose overflow menu 2014-09-30 17:05:53 +02:00
Allan Odgaard
63dcc93ab4 Introduce table cell view subclass to avoid expensive reload 2014-09-30 17:05:53 +02:00
Allan Odgaard
9369777aee Hardcode small system font size as 11
This is because the small system font size is actually the tool tip font size which the user may increase (via the NSToolTipsFontSize defaults).
2014-09-30 17:05:53 +02:00
Allan Odgaard
568017fffc Use message font as the control font 2014-09-30 17:05:53 +02:00
Allan Odgaard
42e1b5fdf0 Use label font for color chooser in file browser context menu
This seems appropriate given that label font is used below toolbar icons and the tick marks on a slider. Here we use it below the available colors.

We also use it for OakCreateSmallLabel() which is only used for status messages in the registration window.
2014-09-30 17:05:53 +02:00
Allan Odgaard
106ac62bcf Use OakStatusBarFont() for find window’s status text 2014-09-30 16:58:12 +02:00
Allan Odgaard
7cb2330aae Log error if curl_easy_init() or accept() fails 2014-09-30 14:15:11 +02:00
Allan Odgaard
6748c28109 Send performCloseTab:/OtherTabs: directly to tab view delegate
When our application is active but another window is key, trying to send to our tab view’s window (via tryToPerform:with:) goes to the key window.
2014-09-30 14:15:11 +02:00
Allan Odgaard
040a53c3df Change text view status bar layout constraints
We now center most things and baseline align text controls. Previously we would stretch all controls to full height which wouldn’t guarantee that e.g. pop-up buttons would properly align with the text fields.
2014-09-30 14:15:11 +02:00
Allan Odgaard
6e5adcdc31 Remove unused code 2014-09-30 14:15:11 +02:00
Allan Odgaard
11de15ac54 Update fonts used for find in folder results
We now use the control content font as this seems to be meant for content shown in tables. We use the standard size (of 12 points) for the headings and set the result rows to use 11 point.

The number of matches is shown with the label font as that is semantically a small font used for placing labels next to things.
2014-09-29 22:41:54 +02:00
Allan Odgaard
2462bf8037 Use minimum tab size as tab bar’s intrinsic width
This way we can setup compression resistance to the required priority and thereby ensure that the tab bar fits at least one tab.
2014-09-29 18:23:34 +02:00
Allan Odgaard
d9e8a0fc5e Do not setup Y-centering constraint on tab overflow image
This image already has a fixed position so the centering is redundant and could even lead to ambiguous layout.
2014-09-29 18:23:33 +02:00
Allan Odgaard
1266129f0e Don’t layout any tabs when smaller than minimum tab item width 2014-09-29 18:23:33 +02:00
Allan Odgaard
c88b3e3611 Set “center tab labels” constraint below “fitting size” priority
This way when asking for a fitting size we get back the minimum size with all but the centering constraint met (and minimized).

In theory the compression resistance for the text field only need to be NSLayoutPriorityFittingSizeCompression+1 but for reasons I do not yet understand, we need to set it higher than NSLayoutPriorityDefaultLow, otherwise the fitting width will occasionally be 64.
2014-09-29 18:23:33 +02:00
Allan Odgaard
f079f8a917 Avoid redeclaration of “all views” dictionary 2014-09-29 16:21:05 +02:00
Allan Odgaard
d1dd666fbd Remove remains from cell-based find results outline view 2014-09-29 15:12:23 +02:00
Allan Odgaard
10e370319d Use system’s tool tip font for our custom tool tips 2014-09-29 13:47:32 +02:00
Allan Odgaard
a90acdcbe6 Use convenience methods to setup header/status bar backgrounds 2014-09-29 13:24:52 +02:00
Allan Odgaard
24bd3eee1d Let ProjectLayoutView setup height of file browser header 2014-09-29 13:03:45 +02:00
Allan Odgaard
b9ed2ac8ee Let ProjectLayoutView know about the file browser header view 2014-09-29 13:02:15 +02:00
Allan Odgaard
3052a2764b Don’t allow tab bar view to expand beyond its intrinsic height
This makes it easier to constrain other views to the height of the tab bar view, without the tab bar view growing to the height of the other view.
2014-09-29 13:02:15 +02:00
Allan Odgaard
6262e17159 Make file browser’s header view a public property
This allows users of the file browser to setup constraints involving the file browser header or change its (background) styling.
2014-09-29 13:02:15 +02:00
Allan Odgaard
d12e0976d6 Remove OakGradientView 2014-09-29 13:02:15 +02:00
Allan Odgaard
72837ca7ac Use OakBackgroundFillView instead of OakGradientView 2014-09-29 13:02:15 +02:00
Allan Odgaard
eb20fd8746 Add NSGradient support to OakBackgroundFillView 2014-09-29 13:02:15 +02:00
Allan Odgaard
65cfacd054 Fix issue with our tag property override and the 10.10 SDK
Until the 10.10 SDK we could use the compiler’s synthesized getter for our ‘tag’ property, but NSView.h in the 10.10 SDK declares ‘tag’ via the @property syntax and it is effectively unsupported to redeclare a readonly property as readwrite in a subclass (clang will not synthesize getter/setter methods in the subclass).
2014-09-28 14:31:42 +02:00
Allan Odgaard
05bd76ad0b Make “Restore Session” default for session restore dialog
Since disabling session restore will discard user data, it should not be default.
2014-09-27 13:06:31 +02:00
Allan Odgaard
244509586b Closing the overflow tab (via mouse) caused suboptimal relayout
When we close a tab with the mouse we “freeze” the layout rectangle of the tabs before the one closed, however, if this group contains non-visible tabs during close (as is mostly the case when showing the overflow button) then one of those would be made visible (since we closed a tab that took up space) and this new tab would be squeezed into the saved layout rectangle.
2014-09-27 13:02:46 +02:00
Allan Odgaard
94b7114a10 Remove old tab close button images (for non-modified tabs) 2014-09-27 12:04:56 +02:00
Allan Odgaard
6a7c42b775 Revert "Add “create tab” images from MMTabBarView"
This reverts commit 6a81bad1e4.
2014-09-27 12:04:56 +02:00
Allan Odgaard
923ee59534 Use NSImageNameAddTemplate image for “create new tab” button 2014-09-27 12:04:56 +02:00
Allan Odgaard
96c43146dc Remove redundant code 2014-09-27 12:04:05 +02:00
Allan Odgaard
bf73951ec9 Checkin release notes v2.0-alpha.9567 2014-09-26 23:18:48 +02:00
Allan Odgaard
e7bfe7b238 Fix reappearing regular expression error popover
If it was shown and dismissed, then it would show again the next time the text field content was changed (and the content was not a valid expression).
2014-09-26 23:10:24 +02:00
Allan Odgaard
e064491261 By default we no longer show the tab bar for a single document
Once we have two documents (in same window) we show the tab bar and never hides it again (to avoid content from jumping.
2014-09-26 23:10:24 +02:00
Allan Odgaard
5eb7ede829 Don’t ignore case changes on case-insensitive file systems 2014-09-26 23:10:24 +02:00
Allan Odgaard
89d2450c88 Reload tabs before changing selected tab index
This worked previously because selected tab was stored using an index and we were only changing it (before reload) when closing tabs, so the new index would be valid both before and after reload.

With the new OakTabBarView the index of selected tab is instantly converted into a reference to a tab item.
2014-09-26 23:10:24 +02:00
Allan Odgaard
cb463534b8 Make window key in actions that show file browser field editor
It is possible to bring up menus for inactive windows and e.g. select Rename or Duplicate.
2014-09-26 23:10:24 +02:00
Allan Odgaard
a983643fb8 Workaround for weak pointers to NSWindow crashing on 10.7 2014-09-26 23:10:24 +02:00
Ronald Wampler
a627991ac3 HOBrowserView: Avoid calling super on key events
This workaround is to avoid a couple of undesired behaviors in the `HTMLOutputWindow` when the web page implements keyboard commands such as Git → Browse Annotated File (Blame). Namely, when using the keyboard commands, we would always receive an NSBeep. Also, fixed an issue when these key commands may conflict with menu keys. See comment in the commit for details.
2014-09-26 23:10:24 +02:00
Allan Odgaard
13a3ac49ba Update OakTabBarView class to use an NSView per tab item 2014-09-26 23:10:24 +02:00
Allan Odgaard
baff543c47 Add OakTabItemView to be used in upcoming OakTabBarView 2014-09-26 23:10:23 +02:00
Allan Odgaard
6a81bad1e4 Add “create tab” images from MMTabBarView 2014-09-25 22:48:13 +02:00