Commit Graph
16327 Commits
Author SHA1 Message Date
Joseph T. Lyons 484bfe4b73 Add settings events (#3847)
Adds the infractucture for settings events and specifically tracks theme
settings. Currently, we only take note of the theme at app open and when
the user switches the theme with the theme selector. Changes at the
config file are ignored, as putting code that low leads to a lot of
chances of reporting theme events when the user hasn't done anything.
This change is done in both Zed 1 and Zed 2.

I'll open up a PR on zed.dev and adjust the database accordingly.

Release Notes:

- N/A
2024-01-02 17:19:21 -05:00
Conrad Irwin 180f30b875 Round tooltip co-ordinates (#3836)
There was a hypothesis that this would fix border rendering.

It doesn't :D; but it does at least mean that they are always
consistently
broken, so it may be easier to fix.
2024-01-02 15:06:19 -07:00
Joseph T. Lyons 693e1a437b Add settings events 2024-01-02 17:02:53 -05:00
Marshall Bowers 38f9b9fc68 Add additional status colors and style diagnostic popovers (#3846)
This PR adds additional background and border colors for each of the
status colors to the theme.

These colors are then used to style the diagnostic popovers:

<img width="407" alt="Screenshot 2024-01-02 at 4 25 50 PM"
src="https://github.com/zed-industries/zed/assets/1486634/fbc64ea7-3dcd-43b7-8520-91f16304bfba">

<img width="396" alt="Screenshot 2024-01-02 at 4 26 05 PM"
src="https://github.com/zed-industries/zed/assets/1486634/6e4a44bf-4aac-4595-afff-7fbf8b2b9e1f">

Release Notes:

- N/A
2024-01-02 16:37:55 -05:00
Marshall Bowers 0b2e300f7a Fix spacing in diagnostics tab (#3844)
This PR fixes the spacing in the diagnostics tab.

#### Before

<img width="108" alt="Screenshot 2024-01-02 at 3 40 51 PM"
src="https://github.com/zed-industries/zed/assets/1486634/9508d867-5b5d-45b0-8b16-be35a23e3e7a">

#### After

<img width="121" alt="Screenshot 2024-01-02 at 3 40 54 PM"
src="https://github.com/zed-industries/zed/assets/1486634/33e665e7-2935-4d4f-b1d0-9cb655235867">

Release Notes:

- N/A
2024-01-02 15:51:16 -05:00
Marshall Bowers 751488056e Restore transparency to scroll bar handles (#3843)
This PR restores the semi-transparency to the scroll bar handle colors
that were lost in #3842.

If we adjust the rendering of the scrollbar to draw the status
indicators on top of the scrollbar handle then we can remove the
transparency.

Release Notes:

- N/A
2024-01-02 15:39:04 -05:00
Marshall Bowers 184338278e Use Zed1 Color Scheme to update Zed1 Theme Importer (#3842)
Bring Zed1 themes closer to their old appearance using the `base_theme`
values.

This will inevitably re-introduce some outstanding design issues from
Zed 1 that we will need to solve (low contrasts in some places, etc.)
We'll work on some of these in a later PR.

Known issues introduced:
- Scrollbar thumb is incorrectly drawn in front of the indicators
- Borders aren't quite correct - will fix in a followup
- Titlebar/status bar buttons will now have low contrast states
- Keybinding background color blends with palette

There are likely more issues, add them to the product checklist as you
find them.

Release Notes:

- N/A
2024-01-02 15:14:28 -05:00
Nate ButlerandMarshall Bowers 5590798de0 Update status colors in zed1 importer
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2024-01-02 14:53:51 -05:00
Nate ButlerandMarshall Bowers 24cc268c01 Get zed1 theme importer down to no warnings
Note: We removed some unused theme colors
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2024-01-02 14:47:46 -05:00
Conrad Irwin 6b835fed2b Merge branch 'main' into overlay-rounding 2024-01-02 12:35:38 -07:00
Nate ButlerandMarshall Bowers 3e6a84de49 Use mostly base theme
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2024-01-02 14:30:11 -05:00
Nate ButlerandMarshall Bowers e5da901599 Start using base theme in zed1 theme importer
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2024-01-02 14:21:20 -05:00
Marshall Bowers 781004b397 Absolutely position channel buttons (#3840)
This PR absolutely positions the channel buttons on top of the channels.

This prevents the buttons from getting pushed off the edge of the panel
when the channel names are long.

Still needs some fine-tuning, but gets us closer to where we want to be.

Release Notes:

- N/A
2024-01-02 14:04:55 -05:00
Nathan Sobo e4ca26d9d6 Clippy fixes for gpui2 (#3826)
It's not quite complete, but we gotta start somewhere.
Release Notes:

- N/A
2024-01-02 11:38:25 -07:00
Nathan Sobo 44eb09381b Fix anti-aliasing artifacts in GPUI 2 borders (#3818)
Previously, we changed borders to be drawn after content, so they are no
longer part of the same quads as the background. In our change, we gave
the background quad a transparent black border and the border quads
transparent black backgrounds. However, this caused the other channels
to blend toward that black color before becoming fully transparent,
causing them to become darker.

In this PR, I source the "placeholder" color by duplicating the values
for the other channels and only adjust the alpha down to zero.

Release Notes:

- N/A
2024-01-02 10:32:23 -07:00
Conrad Irwin 967d67b595 Round tooltip co-ordinates 2024-01-02 10:12:57 -07:00
Marshall Bowers 57ee674458 Map suggestion colors from Zed1 themes (#3835)
This PR maps the suggestions colors from the Zed1 themes to the Zed2
themes.

Release Notes:

- N/A
2024-01-02 12:08:29 -05:00
Marshall Bowers 8f9ef9549f Add general-purpose functions for sizing in viewport units (#3833)
This PR adds general-purpose functions for obtaining a `Length` in
viewport units.

Previously in #3600 we had added specific variants of `w` and `h` that
took viewport units, but I think it makes more sense to just have a
primitive that can compose with any styling method that accepts a
`Length` or `Into<Length>`.

Release Notes:

- N/A
2024-01-02 11:53:57 -05:00
Marshall Bowers 63c3b69519 Use small icons in channel list (#3832)
This PR adjusts the size of the chat and channel note icons in the
channel list to be smaller.

Release Notes:

- N/A
2024-01-02 11:41:35 -05:00
Marshall Bowers dc216233a7 Increase outline picker max height (#3831)
This PR increases the max height of the outline picker so that it can
take up a larger area of the screen when there are lots of results.

This behavior is similar to the way it was in Zed1.

Release Notes:

- N/A
2024-01-02 11:15:27 -05:00
Piotr Osiewicz 0333358e22 ui: Add Backspace/Delete icons and use them for keybindings. 2024-01-02 16:41:56 +01:00
Marshall Bowers a99d68f76d theme_importer: Map drop target colors (#3830)
This PR maps the drop target background color in the `theme_importer`.

Release Notes:

- N/A
2024-01-02 10:40:24 -05:00
Nathan Sobo 9cfb5a8ed1 Rename build_view to new_view and build_model to new_model (#3823)
The word "new" is shorter and blends in with `new` constructors that are
common in Rust. Been meaning to do this for a while.

Release Notes:

- N/A
2024-01-02 08:11:53 -07:00
Piotr Osiewicz c23dd486e9 project search: Move to results with ESC 2024-01-02 14:11:01 +01:00
Piotr Osiewicz 7b8f831028 Fix missing breadcrumbs on first open of project search.
Fixes:
Project search does not have breadcrumbs on its first open: after switching to other tab and back, breadcrumbs are shown
2024-01-02 14:10:47 +01:00
Piotr Osiewicz 08e18d1660 Fix up gpui1 2024-01-02 13:18:56 +01:00
Piotr Osiewicz dc77a5d941 cargo fmt 2024-01-02 13:15:57 +01:00
Piotr Osiewicz 1f3186c36b gpui2: Another round of fixups 2024-01-02 13:11:36 +01:00
Piotr Osiewicz 5286e73e27 gpui2: redundant_locals 2024-01-02 12:59:40 +01:00
Piotr Osiewicz 4a31757d36 gpui2: Fix instance of map_entry lint 2024-01-02 12:56:53 +01:00
Piotr Osiewicz c2113636e2 Merge branch 'main' into clippy-fixes-for-zed2 2024-01-02 12:21:15 +01:00
Piotr Osiewicz 4684fbcc5e Another pass of #[allow()] removal (#3825)
We still have a bunch of leftovers in ui2/theme2 and in gpui2
display_link module.

Release Notes:

- N/A
2024-01-02 12:17:30 +01:00
Piotr Osiewicz 7289053dd1 search: Add "Error" borders for query editors with malformed content. (#3824)
This commit also changes the way search queries are built (we do not bail early anymore if include/exclude editor queries are malformed) to propagate error status of the panel.
Release Notes:

- N/A
2024-01-02 10:43:50 +01:00
Nathan Sobo 7afe801dfd Merge remote-tracking branch 'origin/main' into new-view-new-model-rename 2024-01-01 17:42:12 -07:00
Nathan Sobo 5e93c10cf2 Rename build_view to new_view and build_model to new_model
The word "new" is shorter and blends in with `new` constructors that are common
in Rust. Been meaning to do this for a while.
2024-01-01 17:42:01 -07:00
Nathan Sobo 209515d493 Clean up Element API and start on docs (#3821)
Getting some scaffold docs in place and making some naming adjustments
to improve consistency with Rust APIs and clarity.

- Render::Element -> Render::Output, and Render::Output is now only
required to be IntoElement instead of Element so we can return
components.
- RenderOnce::Element -> RenderOnce::Output
- Element::layout -> Render::request_layout - Clarify that this doesn't
actually *perform* layout, but simply requests

Release Notes:

- N/A
2024-01-01 17:41:12 -07:00
Piotr Osiewicz 62a2cc68f2 Another batch of fixups 2024-01-02 00:24:11 +01:00
Piotr Osiewicz 62b3b49e7f Rest of fixups for gpui2 2024-01-02 00:09:24 +01:00
Piotr Osiewicz 5c79345bc7 Start fixing up gpui2 2024-01-02 00:04:51 +01:00
Piotr Osiewicz fbc8e78843 sqlez 2024-01-01 23:56:04 +01:00
Piotr Osiewicz 1edb8bdb23 Fixes for gpui2_macros 2024-01-01 23:52:07 +01:00
Piotr Osiewicz c1b17ee05e chore: fix clippy lints for rope2, sum_tree, text2 and util 2024-01-01 23:50:14 +01:00
Nathan Sobo 3af3bc524d Fix merge 2024-01-01 12:23:42 -07:00
Nathan Sobo 808920cc34 Merge branch 'pre-merge' into clean-up-doc-elements 2024-01-01 12:21:33 -07:00
Nathan Sobo 2bbb4e454f Rearrange to hopefully make merging easier 2024-01-01 12:21:17 -07:00
Nathan Sobo 0a6795d4a7 Add more docs 2024-01-01 11:35:40 -07:00
Piotr Osiewicz 5cf2ad3ac5 theme2: Move stories to RPITIT for Render 2024-01-01 14:23:02 +01:00
Piotr Osiewicz 40e7b3244b fixup! Work around lifetime woes by turning the element in language_tools2 into any element 2024-01-01 14:23:02 +01:00
Piotr Osiewicz 6fbaa2b573 Work around lifetime woes by turning the element in language_tools2 into any element 2024-01-01 14:23:02 +01:00
Nathan Sobo 5a75996184 Attempt to return impl Element from render. 3 errors. 2024-01-01 14:23:02 +01:00