Max Brunsfeld and Nathan Sobo
9346aa300d
Start work on underlined text
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-09-06 15:36:09 -07:00
Antonio Scandurra
94959d18c4
Load embedded fonts when initializing settings
2021-09-06 14:08:42 +02:00
Antonio Scandurra
cb62d53b49
Return errors instead of panicking when interacting with the keychain
...
Closes #134
2021-09-06 10:40:19 +02:00
Antonio Scandurra
00f6bdcb24
Bundle and use Inconsolata v2.012
...
There's a newer version of the font available but ligatures seem
broken googlefonts/Inconsolata#58 and googlefonts/Inconsolata#52 .
As part of this commit I also upgraded rust-embed to use the new
exclusion feature, which allows us to skip embedding OS files like
`.DS_Store`.
2021-09-04 17:02:20 +02:00
Antonio Scandurra and Max Brunsfeld
f59e02cf25
Use macOS API to retrieve the local timezone
...
The `time` crate currently doesn't have a reliable way to get that.
In the future, `NSSystemTimeZoneDidChangeNotification` could be
used to keep the cached timezone up-to-date.
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-09-02 19:15:05 +02:00
Antonio Scandurra
2b39107b49
Introduce Scene::push_foreground_layer
2021-08-30 15:41:16 +02:00
Max Brunsfeld and Nathan Sobo
936af9bc5e
Avoid double borrow panic when resizing windows
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-08-27 15:03:37 -07:00
Max Brunsfeld
5262dcd3cb
Don't change cursor on mouse move while mouse button is held down
2021-08-27 10:34:11 -07:00
5e6e0c68cd
Allow styling the cursor in MouseEventHandler
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-08-27 19:01:49 +02:00
Nathan Sobo
86effd64a2
Get project compiling with type-safe actions
2021-08-22 21:02:48 -06:00
Nathan Sobo
24639ec900
WIP
2021-08-22 11:58:19 -06:00
Nathan Sobo
e16c62ed0e
Add platform::Window::titlebar_height
2021-08-06 09:08:29 -06:00
Nathan Sobo
34eb2c446f
Start on custom titlebar
2021-08-05 11:48:35 -06:00
Max Brunsfeld and Nathan Sobo
d37a98782e
Improve border parsing in themes
...
The `top`, `left`, `bottom` and `right` fields are optional.
If none are specified, then they are all set to true.
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-08-04 17:19:42 -07:00
Nathan Sobo
85a076312a
Merge branch 'main' into theme-variables
2021-08-04 16:47:43 -06:00
Nathan Sobo and Max Brunsfeld
56354c7623
Avoid crashes when laying out lines containing byte order marks
...
This solution isn't perfect and we'll probably have layout bugs with these lines, but this prevents us from triggering undefined behavior.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-08-04 11:52:21 -06:00
Max Brunsfeld and Nathan Sobo
ef0ffbe819
Use custom color wrapper type everywhere in gpui & zed
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-08-03 12:48:58 -07:00
Nathan Sobo and Antonio Scandurra
6efadd19dd
Reuse FontCache across randomized tests
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-07-30 09:50:28 -07:00
Max Brunsfeld and Nathan Sobo
f9e13f3429
Start work on WrapMap::chunks_at
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-19 16:23:56 -07:00
Max Brunsfeld
05e5e5f747
Implement FontSystem::wrap_line
2021-07-16 17:14:43 -07:00
Antonio Scandurra
9895c77f5c
WIP
2021-07-16 18:43:50 +02:00
Antonio Scandurra
792926c675
Merge pull request #100 from zed-industries/fix-url-to-path-conversion
...
Fix URL to `PathBuf` conversion in `mac::Platform`
2021-07-08 17:51:09 +02:00
Antonio Scandurra
75fc371f36
Ensure returned URLs are files before returning them in path prompts
2021-07-06 16:08:19 +02:00
Antonio Scandurra
ed1eb24ee2
Convert URLs to paths returned from NSSavePanel using [Url path]
2021-07-06 15:54:42 +02:00
Antonio Scandurra
39d3b21780
Convert URLs to paths returned from NSOpenPanel using [Url path]
2021-07-06 15:54:29 +02:00
Antonio Scandurra
e80439daaa
Merge branch 'main' into rpc
2021-06-29 10:25:42 +02:00
Nathan Sobo
3d67266d0b
Add a "retries" option to gpui::test macro and use it in flaky tests
2021-06-24 17:51:16 -06:00
Max Brunsfeld and Antonio Scandurra
71d64a837e
Avoid crash when user denies keychain access
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-06-11 09:47:24 -07:00
Max Brunsfeld
5673f116c9
Add a platform API for accessing the keychain
2021-06-08 17:44:45 -07:00
Max Brunsfeld and Nathan Sobo
db3e01a12c
Start work on a login command
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-06-07 18:15:11 -07:00
Nathan Sobo and Max Brunsfeld
3a932cc9bf
Rename MainThreadPlatform to ForegroundPlatform and fix crash on quit
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-06-07 17:42:49 -06:00
Nathan Sobo and Max Brunsfeld
6daddf5146
Allow platform references to be sent to background threads
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-06-07 17:35:27 -06:00
Nathan Sobo and Max Brunsfeld
ebbe517bfa
Move path prompting methods to MainThreadPlatform
...
They need to call back into the main thread, meaning the callbacks can't be Send + Sync.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-06-07 17:32:03 -06:00
Nathan Sobo and Max Brunsfeld
7b98994d1f
Rename PlatformLifecycle to MainThreadPlatform
...
Don't love it, but at least it's accurate.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-06-07 17:21:34 -06:00
Nathan Sobo
14b519f78d
Extract a platform::Lifecycle trait
...
This will allow us to make platform::Platform be Send + Sync and keep the lifecycle on the main thread.
2021-06-07 17:02:24 -06:00
Max Brunsfeld
6ef447866a
Rename context parameters to cx in gpui
2021-05-28 15:32:35 -07:00
Max Brunsfeld and Nathan Sobo
139bcb8304
Rename foo/mod.rs files too foo.rs
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-05-28 14:41:58 -07:00
Antonio Scandurra
5485c1a749
Add test for font selection
2021-05-26 09:41:57 +02:00
Nathan Sobo
2c122eb253
Fix typo
2021-05-21 14:36:44 -06:00
Nathan Sobo
92ff7f4e5e
Accept colors in styling runs passed to layout_str
...
Also move from the runs being expressed as ranges to the runs being expressed as a sequence of contiguous scalar lengths.
2021-05-21 14:10:38 -06:00
Max Brunsfeld
92b938f4a8
Adjust layout_str to use byte coordinates
...
* Interpret ranges as byte ranges for incoming runs
* Return glyphs whose indices are byte offsets
2021-05-20 12:47:08 +02:00
Antonio Scandurra
048bbc9da0
Test prompting when saving while there's a conflict
2021-05-12 15:21:50 +02:00
Antonio Scandurra
62403343fa
Display prompt when trying to save a conflicting file
2021-05-12 11:54:48 +02:00
Antonio Scandurra and Nathan Sobo
e72a309734
Add a basic tab keybinding
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-05-11 17:10:37 +02:00
Nathan Sobo
76d9a40f35
Merge pull request #40 from zed-industries/close-window
...
Correctly handle closing windows and removing entities
2021-05-08 09:06:54 -06:00
Nathan Sobo
2c74d75687
Fix double borrow error in Window::on_close callbacks when quitting app
...
The simplest solution I could come up with was to make quitting the app asynchronous. Calling mac::Platform::quit enqueues a request to quit the app and then allows the call stack to fully return. This ensures we aren't holding a borrow when we quit and invoke all the Window::on_close callbacks. Seems like it should be fine to be async on quitting.
2021-05-08 08:49:14 -06:00
Max Brunsfeld
9dbda4551f
Ignore events for held-down keys after a key combo is partially released
2021-05-07 16:54:55 -07:00
Max Brunsfeld
3120906275
Merge branch 'master' into close-window
2021-05-07 14:24:48 -07:00
Max Brunsfeld
e6323f0d02
Fix handling of new files with new buffer/file structure
2021-05-06 21:06:20 -07:00
Max Brunsfeld
1fcbadaa99
Add TestAppContext::simulate_new_path_selection
2021-05-05 11:04:39 -07:00