Commit graph

439 commits

Author SHA1 Message Date
Floyd Wang
1c5d63edb1
table: Remove unnecessary actions that stop bubbling to ensure focused (#392) 2024-11-04 17:22:01 +08:00
Jason Lee
ca44ca6311
chore: Update to use WeakView for avoid dependency issue. (#391) 2024-11-04 16:36:21 +08:00
xda
19f6b82b61
scrollbar: show the narrower scrollbar in idle state (#389)
![2024-11-03 11 36
16](https://github.com/user-attachments/assets/4879d5dd-e337-41a5-9411-d64c06166b3c)

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
2024-11-04 11:34:57 +08:00
Jason Lee
4b5d917e83
title_bar: Update on_close_window to support binding with cx.listener. (#388) 2024-11-01 18:39:25 +08:00
Jason Lee
80230c643f
title_bar: Add on_close_window method callback for TitleBar to custom close window method for Linux. (#387) 2024-11-01 17:06:31 +08:00
Floyd Wang
b997eabcba
title_bar: Make the left padding adjustable (#386) 2024-11-01 14:20:49 +08:00
Jason Lee
c986a294e4
chore: Add view method to get the child view from Root. (#385) 2024-10-31 15:27:45 +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
2dab196f68
button: Add flex_shrink_0 to the base (#383)
If you want the button to be flexible, add `flex_shrink`.
2024-10-31 10:35:37 +08:00
Jason Lee
d99c5246ee Add Default support to DockAreaState. 2024-10-30 17:29:52 +08:00
Jason Lee
fe6566ce2f
table: Export scroll handles. (#371) 2024-10-30 14:25:38 +08:00
Jason Lee
292d1a6a9a
theme: Rename title_bar_background to title_bar. (#382)
Use same name rule as other theme variables.
2024-10-30 14:25:21 +08:00
Jason Lee
0b0fc61c2f
chore: Avoid cx.prevent_default when ListItem or other click (#381) 2024-10-29 16:54:08 +08:00
Floyd Wang
db041fea88
table: Add default option to perform_sort (#379) 2024-10-24 18:15:12 +08:00
Jason Lee
b7a1292d07
popup_menu: Add popup_menu_with_anchor method to control the Anchor for PopupMenu. (#378) 2024-10-24 11:05:13 +08:00
xda
b8c8ddd8f5
resizable: Fix the edge case of initializing Panels with zero initial_size (#377) 2024-10-24 00:07:45 +08:00
Jason Lee
53311b06f8
title_bar: Impl Styled to TitleBar. (#375) 2024-10-22 14:42:40 +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
xda
14ca368be7
input: Ensure resizing the window doesn't force the cursor back into view (#370)
Fix #331

It is ensured that the scroll offset remains consistent during parent
container resizing, preventing the cursor from being forced back into
view unless the user interacts with the input, providing a more
consistent user experience in scenarios where automatic scrolling during
resizing is undesirable.

This behavior aligns with common text editors and input fields where
resizing the window doesn't force the cursor back into view.

![2024-10-21 20 27
00](https://github.com/user-attachments/assets/599ef72d-3ec8-4fe5-a26c-10263044db6f)
2024-10-21 20:01:49 +08:00
Jason Lee
38fc226c22 title_bar: Export TitleBarElement. (#369) 2024-10-21 19:23:20 +08:00
Jason Lee
2aaf424df9
title_bar: Fix move window support for Linux. (#368) 2024-10-21 15:23:36 +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
6ea9e69b98
script: Fix install script on Ubuntu. (#366) 2024-10-18 23:14:55 +08:00
xda
8dbf1dd5d5
Add the Preset Ranges and add border for today (#365)
Preset Ranges have been added. The “Today” border has also been added.


![2024-10-18 17 41
13](https://github.com/user-attachments/assets/be6106a6-9138-462c-ab0d-1332b4a6eba5)

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
2024-10-18 20:38:16 +08:00
Jason Lee
a798bd81c6
chore: Fix typos. (#364) 2024-10-18 14:30:24 +08:00
Jason Lee
274b9edc32 table: Fix selected row top, bottom border detail. 2024-10-18 14:13:15 +08:00
Jason Lee
a4260c109f
table, list: Avoid use deferred to show selected row style. (#363)
<img width="956" alt="image"
src="https://github.com/user-attachments/assets/0f72b556-76bc-4808-bca8-c261411656d1">
2024-10-18 13:27:59 +08:00
Jason Lee
4bef681c9a
table, list: Add right clicked row style and improve selection style. (#362)
- table: Add `content_menu` to TableDelegate.

<img width="644" alt="image"
src="https://github.com/user-attachments/assets/4c21299f-00e8-4a61-964d-338ef7daa802">
2024-10-18 11:52:14 +08:00
Jason Lee
c02cb802cb
list: Add cx argument to ListDelegate. (#361)
Following #360 TableDelegate changes.
2024-10-18 10:17:59 +08:00
julien-leclercq
536bb60900
table: Add cx argument to TableDelegate methods. (#360)
As discussed in #359 adds a `AppContext` argument to the
`table::TableDelegate::rows_count` method

---------

Co-authored-by: Julien Leclercq <julien-leclercq@users.noreply.github.com>
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2024-10-18 10:03:32 +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
Jason Lee
6b54396c9c
title_bar: Fix TitleBar prefix padding when is zoomed and support double click to toggle zoom. (#357) 2024-10-17 18:22:32 +08:00
xda
913775c632
resizable: Fix the bug for parent groups when initializing Panels with sizes Some and None (#356)
Optimization of https://github.com/longbridgeapp/gpui-component/pull/329

The issue with the initial width of the Panel has been optimised to
ensure that the left side of a Panel combination like [Some(px(510.)),
None] is initially rendered with a width of 510px.

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
2024-10-17 17:39:00 +08:00
Jason Lee
8eff75d357
accordion: Add Accordion. (#355)
<img width="920" alt="image"
src="https://github.com/user-attachments/assets/3269aa05-7531-43a1-84a9-469959a68d06">
2024-10-17 17:31:59 +08:00
Jason Lee
5ecfbc59e3
Update Windows demo app. 2024-10-16 21:20:05 +08:00
Jason Lee
1fdcff3b51
theme: Add apply_color to theme to support merge a new color into theme color. (#353)
- Fix #334 to keep selected theme color.

## Example

<img width="1472" alt="image"
src="https://github.com/user-attachments/assets/3a05f58c-2720-436c-8df9-c582871d87d5">
<img width="1472" alt="image"
src="https://github.com/user-attachments/assets/5b8db494-1402-4785-8d98-a87173b15284">
<img width="1472" alt="image"
src="https://github.com/user-attachments/assets/0305c05b-c2fb-4fea-9a50-5aa00de504fe">
<img width="1472" alt="image"
src="https://github.com/user-attachments/assets/91fbb7b6-7494-440d-95bf-2de37d6bbb44">
2024-10-16 18:38:21 +08:00
Jason Lee
41c64e2912
chore: Update controls detail. (#352)
- Better icon style in Input, Dropdown, DatePicker.
2024-10-16 17:51:39 +08:00
Floyd Wang
000c0bec57
dropdown: Add set_disabled for &mut self (#351) 2024-10-16 17:33:46 +08:00
Jason Lee
c91028b756
docs: Add show cases (#350) 2024-10-16 16:46:10 +08:00
Jason Lee
28d887cf5e webview: Use Wry crate version. 2024-10-16 16:32:25 +08:00
Jason Lee
fdca75d5a7
title_bar: Add a new TitleBar, remove the old version. (#348)
- Removed old workspace crate, moved out to
[gpui-workspace](https://github.com/huacnlee/gpui-workspace)

<img width="491" alt="image"
src="https://github.com/user-attachments/assets/5048491c-9b98-4af5-9f0f-9a0f20c2308f">

Icons for Windows and Linux use by SVG icon, it based on:

-
https://learn.microsoft.com/en-us/windows/apps/design/style/segoe-fluent-icons-font
- Download Font: [Segoe Fluent
Icons](https://learn.microsoft.com/en-us/windows/apps/design/downloads/#fonts)
2024-10-16 16:22:17 +08:00
xda
51df8f2f04
drawer: support ESC to close it by on_action and call on_close (#341)
Fix #263

![2024-10-14 21 26
02](https://github.com/user-attachments/assets/b6060f82-117a-4935-91df-d336f905624d)
2024-10-15 21:47:45 +08:00
Floyd Wang
9b8240c6bc
table: Improve render_tr to bind the context_menu (#347)
<img width="559" alt="image"
src="https://github.com/user-attachments/assets/2aecfa35-5ee1-45cb-a3f3-2409bd09efd7">
2024-10-15 21:35:17 +08:00
Jason Lee
6a5fff889e
dock: Disallow move panel when it is zoomed in. (#346)
Closes #342
2024-10-15 14:52:40 +08:00
Jason Lee
2f4ee70f46
story: Fix story caes (#345)
- Remove WebView story.
- Fix dropdown size.
2024-10-15 14:21:47 +08:00
Jason Lee
3041d0020f
webview: Update wry. (#343)
To match Wry recently API changes.

Ref: https://github.com/tauri-apps/wry/pull/1385
2024-10-14 22:19:35 +08:00
Jason Lee
54bc3900a2
Update GPUI to revert taffy for performance. (#344)
Ref:

- https://github.com/zed-industries/zed/pull/19189
- https://github.com/zed-industries/zed/pull/18729#issuecomment-2410445980
2024-10-14 22:16:51 +08:00
xda
219d5a4293
icon: Fix broken assets delete.svg (#340) 2024-10-14 22:07:18 +08:00
dependabot[bot]
ff5f0d785c
build(deps): bump wry from 7f2f270 to 7093dd3 (#338)
Bumps [wry](https://github.com/huacnlee/wry) from `7f2f270` to
`7093dd3`.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7093dd3c82"><code>7093dd3</code></a>
Add doc to method</li>
<li>See full diff in <a
href="7f2f270e7b...7093dd3c82">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>
2024-10-14 11:23:54 +08:00
dependabot[bot]
518224cb0d
build(deps): bump gpui from 82314ac to fa2a060 (#339)
Bumps [gpui](https://github.com/huacnlee/zed) from `82314ac` to
`fa2a060`.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="fa2a06028c"><code>fa2a060</code></a>
gpui: Export raw_window_handle for wry to render WebView, and with a
WebView ...</li>
<li><a
href="ec5d6e96bb"><code>ec5d6e9</code></a>
Make <code>danger</code> to output less false-positives (<a
href="https://redirect.github.com/huacnlee/zed/issues/19151">#19151</a>)</li>
<li><a
href="54683ff2b9"><code>54683ff</code></a>
docs: Fix typo in environment documentation (<a
href="https://redirect.github.com/huacnlee/zed/issues/19164">#19164</a>)</li>
<li><a
href="cdead5760a"><code>cdead57</code></a>
docs: Formatter arguments, document <code>{buffer_path}</code> usage (<a
href="https://redirect.github.com/huacnlee/zed/issues/19156">#19156</a>)</li>
<li><a
href="39468de8c6"><code>39468de</code></a>
Return back to history-based tabs activation on close (<a
href="https://redirect.github.com/huacnlee/zed/issues/19150">#19150</a>)</li>
<li><a
href="6491148196"><code>6491148</code></a>
Fail on warnings during CI builds (<a
href="https://redirect.github.com/huacnlee/zed/issues/19149">#19149</a>)</li>
<li><a
href="0b10fd5098"><code>0b10fd5</code></a>
cpp: Better icon support (<a
href="https://redirect.github.com/huacnlee/zed/issues/19146">#19146</a>)</li>
<li><a
href="74cc90887a"><code>74cc908</code></a>
ci: Give names to all github actions (<a
href="https://redirect.github.com/huacnlee/zed/issues/19080">#19080</a>)</li>
<li><a
href="875c0cb09f"><code>875c0cb</code></a>
Bytes 1.7.2 merge fix (<a
href="https://redirect.github.com/huacnlee/zed/issues/19145">#19145</a>)</li>
<li><a
href="aefc559f43"><code>aefc559</code></a>
Improve auto-detection via shebang of TypeScript, JavaScript and Shell
Script...</li>
<li>Additional commits viewable in <a
href="82314ac099...fa2a06028c">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>
2024-10-14 11:23:22 +08:00