Commit graph

105 commits

Author SHA1 Message Date
Jason Lee
c0e0d82594
input: Add mask pattern to format display. (#854)
- Add `mask_pattern` to Input, NumberInput.
- Fix Input `set_text` to move cursor to end.

https://github.com/user-attachments/assets/2d7e362a-3f80-47a4-94e3-efd729bffcac
2025-05-14 22:27:46 +08:00
Jason Lee
3a915dba89
chore: Update GPUI 2025/04/30 (#826) 2025-04-30 14:41:08 +08:00
Sunli
69dad78867
svg_img: No longer use the global image loader. (#823)
Update SvgImg load logic and try to drop image to fix VRAM leak issue.

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-04-30 11:56:24 +08:00
dependabot[bot]
9d467ac92b
build(deps): bump gpui from 04c0a54 to c56b5d8 (#819)
Bumps [gpui](https://github.com/huacnlee/zed) from `04c0a54` to
`c56b5d8`.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c56b5d8099"><code>c56b5d8</code></a>
gpui: Fix VRAM leak caused by drawing large textures and resize
textures</li>
<li><a
href="3862d87e27"><code>3862d87</code></a>
gpui: Fix <code>window_handle</code> method on Linux.</li>
<li><a
href="7675ad9f8f"><code>7675ad9</code></a>
gpui: Fix <code>update_window</code> to <code>borrow_mut</code> will
crash on Windows.</li>
<li><a
href="5e31d86f1f"><code>5e31d86</code></a>
Fix panic in vim selection restoration (<a
href="https://redirect.github.com/huacnlee/zed/issues/29251">#29251</a>)</li>
<li><a
href="4a8f114528"><code>4a8f114</code></a>
Fix panic when collaborating with new multibuffers (<a
href="https://redirect.github.com/huacnlee/zed/issues/29245">#29245</a>)</li>
<li><a
href="ce1a674eba"><code>ce1a674</code></a>
eval: Fine-grained assertions (<a
href="https://redirect.github.com/huacnlee/zed/issues/29246">#29246</a>)</li>
<li><a
href="0d3fe474db"><code>0d3fe47</code></a>
editor: Use quantize score for code completions sort + Add code
completions t...</li>
<li><a
href="6a009b447a"><code>6a009b4</code></a>
debugger: Open debugger panel on session startup (<a
href="https://redirect.github.com/huacnlee/zed/issues/29186">#29186</a>)</li>
<li><a
href="75ab8ff9a1"><code>75ab8ff</code></a>
zlog: Add default filters (<a
href="https://redirect.github.com/huacnlee/zed/issues/29244">#29244</a>)</li>
<li><a
href="3705986fac"><code>3705986</code></a>
Adjust image cache APIs to enable ElementState based APIs (<a
href="https://redirect.github.com/huacnlee/zed/issues/29243">#29243</a>)</li>
<li>Additional commits viewable in <a
href="04c0a545a7...c56b5d8099">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-28 23:25:16 +08:00
Jason Lee
5b508d7219
gallery: Redesign the gallery. (#797)
Close #773

<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/e27a28ca-cdd7-4970-8518-4fd0104bb3f8"
/>
2025-04-17 17:12:48 +08:00
Jason Lee
225a306169 theme: Improve ThemeMode to add more features. 2025-04-16 15:26:14 +08:00
Jason Lee
3fb0c41fad
linux: Add libx11-xcb-dev to install script and build error. (#795)
![image](https://github.com/user-attachments/assets/0d9f637f-8aaa-4e9a-9400-5a124eda6453)

![image](https://github.com/user-attachments/assets/36233760-aa39-4e7b-b549-1a683e45014b)

![image](https://github.com/user-attachments/assets/1c308bf8-f77d-48e5-b345-f42264ea4084)
2025-04-16 09:00:31 +08:00
dependabot[bot]
b7b7c58bc4
build(deps): bump gpui from 236d6f9 to 04c0a54 (#790)
Bumps [gpui](https://github.com/huacnlee/zed) from `236d6f9` to
`04c0a54`.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="04c0a545a7"><code>04c0a54</code></a>
gpui: Add ImageCache.</li>
<li><a
href="a430d24139"><code>a430d24</code></a>
gpui: Fix <code>window_handle</code> method on Linux.</li>
<li><a
href="cd35ff91f7"><code>cd35ff9</code></a>
gpui: Fix <code>update_window</code> to <code>borrow_mut</code> will
crash on Windows.</li>
<li><a
href="d4736a5427"><code>d4736a5</code></a>
debugger: Fix bug where deleting a breakpoint could delete multiple
breakpoin...</li>
<li><a
href="353ae2335b"><code>353ae23</code></a>
Fix staging/unstaging hunks remotely (<a
href="https://redirect.github.com/huacnlee/zed/issues/28560">#28560</a>)</li>
<li><a
href="ad39d3226f"><code>ad39d32</code></a>
Add new actions <code>editor::FindNextMatch</code> and
<code>editor::FindPreviousMatch</code> (<a
href="https://redirect.github.com/huacnlee/zed/issues/28559">#28559</a>)</li>
<li><a
href="c35238bd72"><code>c35238b</code></a>
debugger: Add support for setting multiple breakpoints via actions (<a
href="https://redirect.github.com/huacnlee/zed/issues/28437">#28437</a>)</li>
<li><a
href="5757e352b0"><code>5757e35</code></a>
agent: Fix bug where wrong crease for <a
href="https://github.com/mention"><code>@​mention</code></a> would be
displayed (<a
href="https://redirect.github.com/huacnlee/zed/issues/28558">#28558</a>)</li>
<li><a
href="c124838a73"><code>c124838</code></a>
agent: Fix &quot;new text thread&quot; action name (<a
href="https://redirect.github.com/huacnlee/zed/issues/28555">#28555</a>)</li>
<li><a
href="5ebac7e30c"><code>5ebac7e</code></a>
agent: Clean up thread auto-capturing (<a
href="https://redirect.github.com/huacnlee/zed/issues/28550">#28550</a>)</li>
<li>Additional commits viewable in <a
href="236d6f902e...04c0a545a7">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-14 21:59:31 +08:00
Jason Lee
b3b8172349 chore: Update rust-i18n. 2025-04-02 21:56:30 +08:00
Jakku Sakura
4f0617e96f
example: Fix to hide WebView when switch tab. (#764)
fixes #763
it also prevent crashing on linux due to gtk not initialized

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-04-02 10:50:20 +08:00
Floyd Wang
2274337de3
chore: Update GPUI 2025/03/31 2 (#754)
Reupdate because https://github.com/zed-industries/zed/issues/27767.
2025-03-31 16:49:10 +08:00
Floyd Wang
13de7d5a7e
chore: Update GPUI 2025/03/31 (#752) 2025-03-31 10:31:39 +08:00
Floyd Wang
9f103bac6f
svg_img: Use system fonts to support CJK characters (#750)
| Before | After |
| - | - |
| <img width="528" alt="SCR-20250327-mpcz"
src="https://github.com/user-attachments/assets/22dc30ea-582a-4133-996a-90bcf8cb54be"
/> | <img width="535" alt="SCR-20250327-mnbv"
src="https://github.com/user-attachments/assets/5f360d17-8285-44d8-963b-17784c4c0eb5"
/> |
2025-03-27 14:44:04 +08:00
Jason Lee
a89f971108
chore: Update GPUI 2025/03/20 and fix spawn method. (#725)
- Update `resvg`, `usvg` to 0.45.0
2025-03-20 21:23:50 +08:00
Floyd Wang
81e6da503b
chore: Remove unused feature (#702) 2025-03-10 22:17:27 +08:00
Jason Lee
4c9c7980ee
chore: Upgrade GPUI 2025/03/07 (#697) 2025-03-07 20:22:58 +08:00
Jason Lee
c3f08d52b9
text_view: Add syntax highlight to CodeBlock. (#684)
<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/e7539df4-20db-431b-9bbc-52e08e9de062"
/>
<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/85d52319-1029-4306-8629-ec0321d0571b"
/>
2025-03-04 21:50:50 +08:00
Jason Lee
793a35eff2
text_view: Fix img height in TextView. (#679)
Close #643

<img width="1103" alt="image"
src="https://github.com/user-attachments/assets/0f0a0af0-8fe2-4322-b012-0f970ba9e13d"
/>

Ref https://github.com/zed-industries/zed/pull/25632
2025-03-03 20:51:26 +08:00
Jason Lee
3ba63915ce
text_view: Fix some case may lose spaces, <br> in HTML and Markdown render. (#667) 2025-02-26 17:52:18 +08:00
Jason Lee
c74791aac8
description_list: Add DescriptionList. (#658)
<img width="1089" alt="image"
src="https://github.com/user-attachments/assets/15069422-14aa-4fa3-b661-65fcf7417323"
/>
<img width="1089" alt="image"
src="https://github.com/user-attachments/assets/df4a4b90-b304-40d3-a9ce-1be73eaaa9f4"
/>
<img width="1089" alt="image"
src="https://github.com/user-attachments/assets/1deaf1e8-4b30-4afd-90af-1bd0eecf53e2"
/>
2025-02-25 15:32:59 +08:00
Jason Lee
06f9178ec4
text: Add TextView with Markdown and Simple HTML support. (#639) 2025-02-20 20:08:59 +08:00
Jason Lee
a5db381ef4
chore: Upgrade GPUI 2025/02/10 (#610)
- Replace `Window::parent_view_id()` with `Window::current_view()`
https://github.com/zed-industries/zed/pull/24212
- Fix SvgImg crash by move `use_asset` to `request_layout`.
- Fix Input to implement `character_index_for_point` method
https://github.com/zed-industries/zed/pull/23989
- Fix Input IME position to under the cursor line.
  <img width="504" alt="image"
src="https://github.com/user-attachments/assets/8a6f56c8-6aae-4c0c-8c5a-3959d6a9d224"
/>
- Fix Input overflow sub crash.
2025-02-10 11:53:25 +08:00
Jason Lee
99a4c793c5
chore: Update crate name to gpui-component for publish crate to hold the name. (#603) 2025-02-06 11:57:34 +08:00
Jason Lee
85c6872e68
input: Use closest_index_for_position from GPUI. (#593) 2025-02-03 15:03:31 +08:00
Jason Lee
576dda344c chore: Upgrade GPUI 2025/01/30 2025-01-30 11:06:29 +08:00
Jason Lee
6fa1888ee6
chore: Upgrade for GPUI API changes. (#589) 2025-01-29 16:49:17 +08:00
Jason Lee
327d40e0e0
chore: Upgrade GPUI 3 (#587)
The pervious version has keep on
[gpui2](https://github.com/longbridge/gpui-component/tree/gpui2) branch,
if there need to use.

Ref https://github.com/zed-industries/zed/pull/22632

## Prepare

### Generate index.scip

```bash
rust-analyzer scip ./ > index.scip
```

### Get [refactor](https://github.com/zed-industries/refactor)

```bash
https://github.com/zed-industries/refactor.git
```

## Refactor exist code

```bash
cd refactor
cargo run -- ~/work/gpui-component
```

Then will get result if successed:

```
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.03s
     Running `target/debug/refactor /Users/jason/work/gpui-component`
Loaded 115 SCIP documents
Processing files starting with focus path: ""
Changed 90 files
```

-------------

## Changes

```diff
- View<T>
- Model<T>
+ Entity<T>

- WeakView<T>
+ WeakEntity<T>

- FocusableView
+ Focusable

- cx.bounds()
+ window.bounds()
- cx.refresh()
+ window.refresh()
- cx.focused()
+ window.focused(cx)
- cx.with_optional_element_state
- window.with_optional_element_state
```

```diff
- &mut WindowContext
+ &mut Window, &mut App

- cx: &mut WindowContext
+ window: &mut Window, cx: &mut App

- &mut ViewContext<
+ &mut Window, &mut Context<

- cx: &mut ViewContext<
+ window: &mut Window, cx: &mut Context<
```

```diff
- cx.spawn(|_, mut cx| async move { 
+ cx.spawn_in(window, |_, mut cx| async move {
- cx.dispatch_action(Box::new(...))
+ window.dispatch_action(Box::new(...), cx)
```

`cx.spawn`

```diff
- cx.spawn(|view, mut cx| async move {
+ cx.spawn_in(window, |view, mut window| async move {
+     _ = view.update_in(&mut window, move |view, window, cx| {
```
2025-01-27 03:58:48 +08:00
Jason Lee
71de5dd882
input: Fix position cursor in multi-line mode. (#583)
Close #581

Ref https://github.com/zed-industries/zed/pull/23668

https://github.com/user-attachments/assets/c69d098e-d2cb-4053-b739-6c7dd666e769
2025-01-26 14:12:08 +08:00
Jason Lee
cd613db6d6
number_input: Improve NumberInput to better handle mouse down position cursor and fix sizable API. (#582)
Close #579 

- Leave some space before the Input to support mouse down to position
cursor at start of line.
- Fix to match with size appearance.
- Keep padding left and right to Input, even setup `appearance: false`.

## Break Changes

- The `xlarge`, `large`, `small`, `xsmall` ... method has been moved to
use `ui::Sizable` trait to same as other component.
2025-01-24 23:39:19 +08:00
Jason Lee
20feab5f40
modal: Add confirm Modal with default Ok, Cancel buttons. (#558)
<img width="581" alt="image"
src="https://github.com/user-attachments/assets/ad53fb63-f3be-41e6-90c0-f03cba48c4db"
/>

- Added `overlay_closable` method to Modal to control overlay click to
close modal.
- Added `on_ok`, `on_cancel` callback method.
- Added `confirm` to setup to use default confirm style (With a Ok,
Cancel button).

## Break Changes

- The `footer` method has been changed to with a fn not a element.
2025-01-20 17:42:05 +08:00
Jason Lee
8dca96469e
chore: Update GPUI with MSAA and PathBuilder. (#548) 2025-01-15 16:52:03 +08:00
Jason Lee
a0f6b48eff
chore: Update GPUI 2025/01/14 (#547) 2025-01-14 19:21:04 +08:00
dependabot[bot]
804705a260
build(deps): bump wry from 0.47.2 to 0.48.0 (#530)
Bumps [wry](https://github.com/tauri-apps/wry) from 0.47.2 to 0.48.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tauri-apps/wry/releases">wry's
releases</a>.</em></p>
<blockquote>
<h2>wry v0.48.0</h2>
<!-- raw HTML omitted -->
<pre><code>Updating crates.io index
     Locking 404 packages to latest compatible versions
      Adding html5ever v0.26.0 (available: v0.29.0)
      Adding soup3 v0.5.0 (available: v0.7.0)
      Adding toml v0.8.2 (available: v0.8.19)
      Adding toml_datetime v0.6.3 (available: v0.6.8)
      Adding toml_edit v0.20.2 (available: v0.20.7)
Fetching advisory database from
`https://github.com/RustSec/advisory-db.git`
Loaded 722 security advisories (from /home/runner/.cargo/advisory-db)
    Updating crates.io index
    Scanning Cargo.lock for vulnerabilities (405 crate dependencies)
Crate:     atk
Version:   0.18.2
Warning:   unmaintained
Title:     gtk-rs GTK3 bindings - no longer maintained
Date:      2024-03-04
ID:        RUSTSEC-2024-0413
URL:       https://rustsec.org/advisories/RUSTSEC-2024-0413
Dependency tree:
atk 0.18.2
└── gtk 0.18.2
    ├── wry 0.48.0
    ├── webkit2gtk 2.0.1
    │   └── wry 0.48.0
    └── tao 0.31.0
        └── wry 0.48.0
<p>Crate:     atk-sys
Version:   0.18.2
Warning:   unmaintained
Title:     gtk-rs GTK3 bindings - no longer maintained
Date:      2024-03-04
ID:        RUSTSEC-2024-0416
URL: <a
href="https://rustsec.org/advisories/RUSTSEC-2024-0416">https://rustsec.org/advisories/RUSTSEC-2024-0416</a>
Dependency tree:
atk-sys 0.18.2
├── gtk-sys 0.18.2
│   ├── webkit2gtk-sys 2.0.1
│   │   ├── wry 0.48.0
│   │   └── webkit2gtk 2.0.1
│   │       └── wry 0.48.0
│   ├── webkit2gtk 2.0.1
│   └── gtk 0.18.2
│       ├── wry 0.48.0
│       ├── webkit2gtk 2.0.1
&lt;/tr&gt;&lt;/table&gt;
</code></pre></p>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tauri-apps/wry/blob/dev/CHANGELOG.md">wry's
changelog</a>.</em></p>
<blockquote>
<h2>[0.48.0]</h2>
<ul>
<li><a
href="eb0c8163f1"><code>eb0c816</code></a>
(<a
href="https://redirect.github.com/tauri-apps/wry/pull/1423">#1423</a> by
<a
href="https://github.com/tauri-apps/wry/../../SpikeHD"><code>@​SpikeHD</code></a>)
Rename <code>{WebViewBuilderExtWindows,
WebViewBuilderExtUnix}::with_extension_path</code> to
<code>with_extensions_path</code>.</li>
<li><a
href="b4ba5b47f2"><code>b4ba5b4</code></a>
(<a
href="https://redirect.github.com/tauri-apps/wry/pull/1426">#1426</a> by
<a
href="https://github.com/tauri-apps/wry/../../FabianLars"><code>@​FabianLars</code></a>)
On Windows, Wry will now log PostMessage errors instead of
panicking.</li>
<li><a
href="f0c6b947dd"><code>f0c6b94</code></a>
(<a
href="https://redirect.github.com/tauri-apps/wry/pull/1441">#1441</a> by
<a
href="https://github.com/tauri-apps/wry/../../renovate"><code>@​renovate</code></a>)
Updated <code>webview2-com</code> to <code>0.34</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2ffcd494af"><code>2ffcd49</code></a>
Apply Version Updates From Current Changes (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1424">#1424</a>)</li>
<li><a
href="6ad66d3880"><code>6ad66d3</code></a>
chore(deps): update rust crate pollster to 0.4.0 (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1405">#1405</a>)</li>
<li><a
href="f0c6b947dd"><code>f0c6b94</code></a>
fix(deps): update rust crate webview2-com to 0.34 (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1441">#1441</a>)</li>
<li><a
href="ca74176748"><code>ca74176</code></a>
chore(deps): update rust crate winit to 0.30 (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1235">#1235</a>)</li>
<li><a
href="72f386f1c5"><code>72f386f</code></a>
fix: tried to access uninitialized instance variable (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1425">#1425</a>)</li>
<li><a
href="413817c8ad"><code>413817c</code></a>
chore(deps): update rust crate tao to 0.31 (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1351">#1351</a>)</li>
<li><a
href="e3ef45f586"><code>e3ef45f</code></a>
fix(deps): update rust crate thiserror to v2 (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1411">#1411</a>)</li>
<li><a
href="b4ba5b47f2"><code>b4ba5b4</code></a>
fix: log postmessage errors (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1426">#1426</a>)</li>
<li><a
href="4740c0bf60"><code>4740c0b</code></a>
refactor: destruct tuples to enhance readability (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1438">#1438</a>)</li>
<li><a
href="eb0c8163f1"><code>eb0c816</code></a>
refactor!: Rename <code>with_extension_path</code> to
<code>with_extensions_path</code> (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1423">#1423</a>)</li>
<li>See full diff in <a
href="https://github.com/tauri-apps/wry/compare/wry-v0.47.2...wry-v0.48">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=wry&package-manager=cargo&previous-version=0.47.2&new-version=0.48.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-08 15:11:33 +08:00
Jason Lee
d265ba7667 chore: Update GPUI 2024/11/30 2024-12-30 17:12:38 +08:00
Jason Lee
d4819b34aa
chore: Update GPUI with AnchorCorner renamed to Corner. (#497)
Ref https://github.com/zed-industries/zed/pull/22119
2024-12-18 18:02:47 +08:00
xda
5874c6974f
tiles: Add Tiles (#435)
## Break Changes

- Renamed `DockItemState` to `PanelState`.
- Renamed `DockItemInfo` to `PanelInfo`.
- Update `cx` type from `WindowContext` to `AppContext` for Panel trait
`panel_name` method.

## TODO

- [ ] Support merge panels into TabPanel.
- [ ] Support split panels into Tile.

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
2024-12-16 20:33:14 +08:00
Jason Lee
64a3b4399b
chore: Update GPUI with gradient support. (#487) 2024-12-12 10:19:38 +08:00
Jason Lee
9f0f05af2d
scrollbar: Adjust scrollbar style and add scrollbar_thumb_hover to theme. (#482)
<img width="297" alt="image"
src="https://github.com/user-attachments/assets/1779bf6c-2d01-4a12-9052-2ba571bff68b">

<img width="301" alt="image"
src="https://github.com/user-attachments/assets/9971b248-9a48-47ff-847c-00eafff17fe1">
2024-12-10 17:08:09 +08:00
Jason Lee
9288dc91c2
input: Add to support multi-line Input. (#463) 2024-12-09 20:17:05 +08:00
Jason Lee
142d092867
dock: Add add_panel method to add panel to DockArea. (#440)
Ref #438 

https://github.com/user-attachments/assets/93b40aed-39f3-4d16-a442-13aa7a931895
2024-11-27 11:27:04 +08:00
Jason Lee
0119c80120
input: Update GPUI and fix Input changes. (#437)
Ref https://github.com/zed-industries/zed/pull/20968
2024-11-26 21:41:34 +08:00
dependabot[bot]
931d762955
build(deps): bump wry from 0.47.0 to 0.47.2 (#434) 2024-11-26 13:29:03 +08:00
Jason Lee
fa6abe5a9e
chore: Upgrade GPUI and fix API changes. (#426)
Refs:

- https://github.com/zed-industries/zed/pull/20349
- https://github.com/zed-industries/zed/pull/20371
- https://github.com/zed-industries/zed/pull/20686
2024-11-18 11:35:49 +08:00
dependabot[bot]
a4abc164bb
build(deps): bump wry from 0.46.3 to 0.47.0 (#408)
Bumps [wry](https://github.com/tauri-apps/wry) from 0.46.3 to 0.47.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tauri-apps/wry/releases">wry's
releases</a>.</em></p>
<blockquote>
<h2>wry v0.47.0</h2>
<!-- raw HTML omitted -->
<pre><code>Updating crates.io index
     Locking 418 packages to latest compatible versions
      Adding android-activity v0.5.2 (latest: v0.6.0)
      Adding ash v0.37.3+1.3.251 (latest: v0.38.0+1.3.281)
      Adding bit-set v0.5.3 (latest: v0.8.0)
      Adding bit-vec v0.6.3 (latest: v0.8.0)
      Adding bitflags v1.3.2 (latest: v2.6.0)
      Adding block2 v0.3.0 (latest: v0.5.1)
      Adding cairo-rs v0.18.5 (latest: v0.20.5)
      Adding cairo-sys-rs v0.18.2 (latest: v0.20.0)
      Adding calloop v0.12.4 (latest: v0.14.1)
      Adding calloop-wayland-source v0.2.0 (latest: v0.4.0)
      Adding cfg-expr v0.15.8 (latest: v0.17.0)
      Adding cfg_aliases v0.1.1 (latest: v0.2.1)
      Adding convert_case v0.4.0 (latest: v0.6.0)
      Adding core-foundation v0.9.4 (latest: v0.10.0)
      Adding core-graphics v0.23.2 (latest: v0.24.0)
      Adding core-graphics-types v0.1.3 (latest: v0.2.0)
      Adding cssparser v0.27.2 (latest: v0.34.0)
      Adding d3d12 v0.19.0 (latest: v22.0.0)
      Adding derive_more v0.99.18 (latest: v1.0.0)
      Adding gdk-pixbuf v0.18.5 (latest: v0.20.4)
      Adding gdk-pixbuf-sys v0.18.0 (latest: v0.20.4)
      Adding generic-array v0.14.7 (latest: v1.1.0)
      Adding gethostname v0.4.3 (latest: v0.5.0)
      Adding getrandom v0.1.16 (latest: v0.2.15)
      Adding gio v0.18.4 (latest: v0.20.5)
      Adding gio-sys v0.18.1 (latest: v0.20.5)
      Adding glib v0.18.5 (latest: v0.20.5)
      Adding glib-macros v0.18.5 (latest: v0.20.5)
      Adding glib-sys v0.18.1 (latest: v0.20.5)
      Adding glow v0.13.1 (latest: v0.15.0)
      Adding glutin_wgl_sys v0.5.0 (latest: v0.6.0)
      Adding gobject-sys v0.18.0 (latest: v0.20.4)
      Adding gpu-allocator v0.25.0 (latest: v0.27.0)
      Adding gpu-descriptor v0.2.4 (latest: v0.3.0)
      Adding gpu-descriptor-types v0.1.2 (latest: v0.2.0)
      Adding hashbrown v0.12.3 (latest: v0.15.1)
      Adding hashbrown v0.14.5 (latest: v0.15.1)
      Adding heck v0.4.1 (latest: v0.5.0)
      Adding html5ever v0.26.0 (latest: v0.29.0)
      Adding icrate v0.0.4 (latest: v0.1.2)
      Adding indexmap v1.9.3 (latest: v2.6.0)
      Adding itoa v0.4.8 (latest: v1.0.11)
      Adding jni-sys v0.3.0 (latest: v0.4.0)
&lt;/tr&gt;&lt;/table&gt; 
</code></pre>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tauri-apps/wry/blob/dev/CHANGELOG.md">wry's
changelog</a>.</em></p>
<blockquote>
<h2>[0.47.0]</h2>
<ul>
<li><a
href="72212568cb"><code>7221256</code></a>
(<a
href="https://redirect.github.com/tauri-apps/wry/pull/1365">#1365</a> by
<a
href="https://github.com/tauri-apps/wry/../../Norbiros"><code>@​Norbiros</code></a>)
Add
<code>WebViewBuilder::with_initialization_script_for_main_only</code> to
enable injecting JavaScript code into main frame only or all
subframes.</li>
<li><a
href="c1b26b9612"><code>c1b26b9</code></a>
(<a
href="https://redirect.github.com/tauri-apps/wry/pull/1394">#1394</a> by
<a
href="https://github.com/tauri-apps/wry/../../amrbashir"><code>@​amrbashir</code></a>)
Add <code>WebView::cookies</code> and
<code>WebView::cookies_for_url</code> APIs.</li>
<li><a
href="c193e2a04c"><code>c193e2a</code></a>
(<a
href="https://redirect.github.com/tauri-apps/wry/pull/1408">#1408</a> by
<a
href="https://github.com/tauri-apps/wry/../../amrbashir"><code>@​amrbashir</code></a>)
Fix <code>DragDropEvent::Drop</code> event never fired on Wayland (and
sometimes on X11).</li>
<li><a
href="1d63fa3253"><code>1d63fa3</code></a>
(<a
href="https://redirect.github.com/tauri-apps/wry/pull/1403">#1403</a> by
<a
href="https://github.com/tauri-apps/wry/../../SpikeHD"><code>@​SpikeHD</code></a>)
Add <code>WebViewBuilder::with_extension_path</code> API to Windows and
Linux.</li>
<li><a
href="0c192f4fda"><code>0c192f4</code></a>
(<a
href="https://redirect.github.com/tauri-apps/wry/pull/1414">#1414</a> by
<a
href="https://github.com/tauri-apps/wry/../../lucasfernog"><code>@​lucasfernog</code></a>)
Fix Android static handlers not being replaced when the application UI
is relaunched while still running in the foreground.</li>
<li><a
href="9a2a2d42b6"><code>9a2a2d4</code></a>
(<a
href="https://redirect.github.com/tauri-apps/wry/pull/1412">#1412</a> by
<a
href="https://github.com/tauri-apps/wry/../../amrbashir"><code>@​amrbashir</code></a>)
Fix icons of dragged items getting stuck when using
<code>WebViewBuilder::with_drag_drop_handler</code> on some distros like
Gnome.</li>
<li><a
href="fa9875bb16"><code>fa9875b</code></a>
(<a
href="https://redirect.github.com/tauri-apps/wry/pull/1409">#1409</a> by
<a
href="https://github.com/tauri-apps/wry/../../amrbashir"><code>@​amrbashir</code></a>)
On Windows, disable Webview2's file drop when using
<code>WebViewBuilder::with_drag_drop_handler</code> which fix drag
events for files from &quot;Recent files&quot; view.</li>
<li><a
href="6007608277"><code>6007608</code></a>
(<a
href="https://redirect.github.com/tauri-apps/wry/pull/1400">#1400</a> by
<a
href="https://github.com/tauri-apps/wry/../../amrbashir"><code>@​amrbashir</code></a>)
On Windows, fix webview slightly larger than the window inner size,
which resulted in a hidden 1px in the right and bottom borders of the
webview</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="08f3c68f56"><code>08f3c68</code></a>
Apply Version Updates From Current Changes (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1399">#1399</a>)</li>
<li><a
href="c193e2a04c"><code>c193e2a</code></a>
fix(linux): fix <code>DragDropEvent::Drop</code> never fired on wayland
(<a
href="https://redirect.github.com/tauri-apps/wry/issues/1408">#1408</a>)</li>
<li><a
href="6007608277"><code>6007608</code></a>
fix(windows): handle window borders when resizing to parent (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1400">#1400</a>)</li>
<li><a
href="58cc0824c2"><code>58cc082</code></a>
fix(android): drop MainPipe on activity destroy (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1415">#1415</a>)</li>
<li><a
href="0c192f4fda"><code>0c192f4</code></a>
fix(android): allow static handlers to be replaced (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1414">#1414</a>)</li>
<li><a
href="9a2a2d42b6"><code>9a2a2d4</code></a>
fix: call <code>ctx.drop_finish</code> in webkit2gtk drop handler (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1412">#1412</a>)</li>
<li><a
href="7c4f2b7299"><code>7c4f2b7</code></a>
chore: typo <code>se</code> -&gt; <code>set</code> (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1413">#1413</a>)</li>
<li><a
href="b1d4d830d4"><code>b1d4d83</code></a>
ci: remove macos-12, no longer supported (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1410">#1410</a>)</li>
<li><a
href="fa9875bb16"><code>fa9875b</code></a>
fix(windows): set WebView2 <code>AllowExternalDrop</code> to false (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1409">#1409</a>)</li>
<li><a
href="72212568cb"><code>7221256</code></a>
feat: Allow injecting JavaScript code into subframes (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1365">#1365</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/tauri-apps/wry/compare/wry-v0.46.3...wry-v0.47">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=wry&package-manager=cargo&previous-version=0.46.3&new-version=0.47.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-15 14:26:03 +08:00
Floyd Wang
df54c7b2fb
svg_img: Embed the font file (#401)
<img width="644" alt="image"
src="https://github.com/user-attachments/assets/7acaff6c-0913-402a-8759-2660d2977ce5">
2024-11-08 15:45:00 +08:00
Floyd Wang
6d0b332071
svg_img: Render SVGs with text tags (#390)
<img width="620" alt="image"
src="https://github.com/user-attachments/assets/61f2a1f8-6926-484d-bcb8-076a9d85e89c">
2024-11-07 11:39:06 +08:00
ihavecoke
c871138ca7
webview: Upgrade wry version to fixed with_user_agent regression. (#384)
https://github.com/tauri-apps/wry/releases/tag/wry-v0.46.3
2024-10-31 14:24:10 +08:00
Floyd Wang
c87b4c7f01
notification: Autohide should not panic when the window is not found (#374) 2024-10-22 10:43:00 +08:00
Jason Lee
2c979c32c5
linux: Fix #104 Linux platform crash with BorrowMutError. (#367)
![Screenshot from 2024-10-19
01-20-24](https://github.com/user-attachments/assets/cc0d2250-38ae-4381-a06c-c64ec309ee4c)
2024-10-19 01:21:31 +08:00
Jason Lee
f35db249a6
theme: Update GPUI and imporve dark color. (#358)
## Before

<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/f4e74cf0-e386-4e91-86d1-05ee75b26471">

## After 

<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/da393ea9-79ee-4535-a46d-68684d7ad738">
2024-10-17 19:14:42 +08:00