Commit Graph
159 Commits
Author SHA1 Message Date
Nathan Sobo 7e4d5b7d04 Clear cached credentials when establishing a websocket connection with an invalid token 2021-09-14 20:36:03 -06:00
Nathan SoboandMax Brunsfeld 426d52d8c1 Mix quad border color with background color based on its alpha channel
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-09-14 16:59:09 -06:00
Antonio ScandurraandNathan Sobo bd4d73bb27 Extract image rasterization into ImageCache
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-09-14 18:11:59 +02:00
Antonio ScandurraandNathan Sobo d15eda53f6 Use AtlasAllocator in SpriteCache
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-09-14 17:57:01 +02:00
Antonio ScandurraandNathan Sobo 95da665095 Allow passing a corner radius and borders to rendered images
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-09-14 17:49:11 +02:00
Antonio Scandurra 96ade8668f Start on image rendering 2021-09-14 16:48:44 +02:00
Antonio Scandurra 7db78b3961 Merge branch 'chat' 2021-09-07 19:21:03 +02:00
Antonio ScandurraandNathan Sobo d08ec438ed Make titlebar taller and position traffic lights accordingly
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-09-07 18:37:45 +02:00
Antonio Scandurra a8011fcde4 Render underlines in front of paths and glyphs 2021-09-07 11:19:44 +02:00
Nathan Sobo 6323e8cc59 WIP: Try rendering underlines after all other quads
I thought this would allow underlines to show up in tabs, but it doesn't seem to be working.
2021-09-06 16:57:58 -06:00
Max BrunsfeldandNathan 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 215db4243c Ensure key window is a GPUIWindow before returning its id 2021-09-03 14:20:59 +02:00
Antonio ScandurraandMax 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 BrunsfeldandNathan 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 BrunsfeldandNathan 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 SoboandMax 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 BrunsfeldandNathan 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 SoboandAntonio 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 BrunsfeldandNathan 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 BrunsfeldandAntonio 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 BrunsfeldandNathan 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 SoboandMax 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 SoboandMax 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 SoboandMax 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 SoboandMax 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 BrunsfeldandNathan 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