Jason Lee
7fe91e4e12
dock: Add panel_style to support always show TabBar. ( #444 )
...
Close #441
```rs
DockArea::new(MAIN_DOCK_AREA.id, Some(MAIN_DOCK_AREA.version), cx).panel_style(PanelStyle::TabBar)
```
<img width="1433" alt="image"
src="https://github.com/user-attachments/assets/2013188e-990b-4709-ac7e-43c2de8bc895 ">
2024-11-27 21:34:27 +08:00
xda
53fe5823ef
dock: Fix panel should have a maximal width restriction when resizing ( #443 )
...
https://github.com/user-attachments/assets/617336d2-5392-4eba-a1b4-f1234c8d2eec
2024-11-27 20:36: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
Floyd Wang
ea6ec8aa5d
ui: Add number_input ( #433 )
...
https://github.com/user-attachments/assets/ae6f4e48-b0fa-4f8c-bff5-809c70848b06
2024-11-25 19:32:56 +08:00
Jason Lee
ea011d11d6
dock: Hide toggle button when side dock is not exist. ( #431 )
2024-11-22 15:38:47 +08:00
xda
d937a90db6
dock: Render toggle dock buttons inside the Panels. ( #414 )
...
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2024-11-22 14:41:04 +08:00
Jason Lee
c2678268b2
chore: Update background assign to use into.
2024-11-21 15:02:46 +08:00
Floyd Wang
8b23193f8f
dock: Make the panel dock open state controllable ( #429 )
2024-11-20 11:24:42 +08:00
Jason Lee
e6012fcc8f
table: Improve table render performance. ( #421 )
...
Before: ~85 - 100FPS
After: ~110 - 115FPS
2024-11-18 14:43:22 +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)
</tr></table>
</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 "Recent files" 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> -> <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 />
[](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
Jason Lee
cdee8c7ffd
dock: Keep the panel state when meet invalid panel. ( #423 )
...
Close #422
2024-11-15 10:31:20 +08:00
Jason Lee
3db84c1247
Revert "dock: Change bottom dock to floating on bottom of the center view." ( #420 )
...
Reverts longbridgeapp/gpui-component#419
2024-11-14 19:01:57 +08:00
Jason Lee
a2d6752557
dock: Change bottom dock to floating on bottom of the center view. ( #419 )
2024-11-14 18:57:37 +08:00
Jason Lee
079cc35c48
dock: Limit drag move or close when tab panel or parent only have 1 panel. ( #418 )
2024-11-14 18:33:49 +08:00
Jason Lee
b29f4fb0e6
dock: Add set_locked to lock dock area to limit split, move panels. ( #417 )
...
But still allow to resize panels.
2024-11-14 15:47:26 +08:00
Jason Lee
7edbdd01f4
dock: Remove the inside toggle dock button in Dock to reduce complex and add dock::ToggleButtons. ( #415 )
...
Draft https://github.com/longbridgeapp/gpui-component/pull/414 to keep
old code.
<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/749a5712-7ec4-43a8-a89d-595a7644a7ec ">
2024-11-14 12:05:58 +08:00
xda
47688a8af2
dock: Generalize Dock's panel to accommodate DockItem ( #412 )
...

2024-11-14 12:00:23 +08:00
ihavecoke
d53b30ff9f
drawer: Set paddings to base to support override drawer body paddings. ( #413 )
...
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2024-11-13 14:38:47 +08:00
ihavecoke
40345f1e42
webview: Add bounds method to WebView to get container bounds. ( #411 )
...
<img width="1463" alt="image"
src="https://github.com/user-attachments/assets/f70c2d6b-cb26-4cf5-bd2e-9760ff54c524 ">
2024-11-12 19:31:48 +08:00
Floyd Wang
e77578a53f
svg_img: Fix the conversion error of the SVG fill color with alpha ( #410 )
...
### Before
<img width="156" alt="image"
src="https://github.com/user-attachments/assets/c7177ac7-58aa-4865-81c9-4f7ddff9f145 ">
### After
<img width="176" alt="image"
src="https://github.com/user-attachments/assets/a010e78d-752e-4298-bf40-7a42b916e547 ">
2024-11-12 19:26:24 +08:00
Jason Lee
e478d5606f
chore: Add base ui attributes to Root and add change font size to story to test font adjust. ( #409 )
2024-11-12 11:17:16 +08:00
ihavecoke
f96c21782d
skeleton: Fix the bug where the theme color of the skeleton does not display in light mode ( #407 )
2024-11-11 11:48:03 +08:00
Jason Lee
5149b8a714
panel: Add toolbar_buttons to extend button to panel. ( #406 )
...
<img width="635" alt="image"
src="https://github.com/user-attachments/assets/42dc1cb4-a1dd-43c6-8fc3-9d404e86cb85 ">
2024-11-10 23:17:34 +08:00
Floyd Wang
ab772c04f1
svg_img: Remove the svg_img method ( #404 )
...
Use `SvgImg::new()`.
2024-11-08 16:42:33 +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
ihavecoke
5aad0bf340
modal: Add keyboard option to Modal to enable/disable default keyboard event. ( #400 )
2024-11-08 13:50:05 +08:00
Ylin
d4ee273bf5
table: Add render_last_empty_col to table delegate ( #399 )
...
Co-authored-by: linxin <xin.lin@longbridge-inc.com>
2024-11-07 17:53:21 +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
Jason Lee
270493f3ce
list: Fix to set_selected_index when List up, down to select item. ( #398 )
2024-11-06 18:44:10 +08:00
Floyd Wang
8c3997d795
divider: Make the size flexible ( #397 )
2024-11-06 17:45:38 +08:00
Jason Lee
3508453b11
theme: Rename Colors to ThemeColor and public it. ( #395 )
2024-11-05 23:02:54 +08:00
Jason Lee
26211000f7
button: Fix Button disabled style. ( #394 )
...
- Fix `lighten`, `darken` method for Hsla.
<img width="619" alt="image"
src="https://github.com/user-attachments/assets/75c64f46-1551-4abf-8521-f0b9c90682d2 ">
<img width="620" alt="image"
src="https://github.com/user-attachments/assets/9f3655ba-1506-4e58-aa20-b17546fbc215 ">
2024-11-05 14:36:05 +08:00
Floyd Wang
852c38f42c
table: Remove the unnecessary left margin from the icon
2024-11-05 11:08:21 +08:00
Jason Lee
c2824eb01e
calendar: Add small, medium, large size support to Calendar. ( #393 )
...
Fix #272
2024-11-04 19:25:30 +08:00
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 )
...

---------
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: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 )
...

2024-10-19 01:21:31 +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.

---------
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
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
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-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
b18207728b
dropdown: Use difference chevron icon color for enabled/disabled dropdown. ( #336 )
...
<img width="547" alt="image"
src="https://github.com/user-attachments/assets/07239a63-b1ae-4462-b8ba-d30d7e7e66f5 ">
2024-10-14 10:19:58 +08:00
Jason Lee
5fd2ebf522
panel: Always not show active tab style, when the dock is collapsed. ( #335 )
...
## Before
<img width="249" alt="image"
src="https://github.com/user-attachments/assets/2dfee593-1a07-4b75-913b-d2e17decb67a ">
## After
<img width="271" alt="image"
src="https://github.com/user-attachments/assets/20752d04-1f25-498c-8e6e-4ff0f21401bf ">
2024-10-14 10:06:20 +08:00
xda
5c8d0d7eb4
scrollbar: Do not show scrollbar event mouse is in Element rect, only show when hovered on scrollbar area or scrolled ( #333 )
...
Let the scrollbar only display when hovering and scrolling. The effect
comparison is on the left GPUI and on the right mac. I guess they used
the 10th power ease-in function, and the effect is similar.
Fixes https://github.com/huacnlee/gpui-component/issues/260

2024-10-13 10:53:53 +08:00
Jason Lee
5f1b68a431
menu: Add menu_with_element to add a custom render item. ( #330 )
...
<img width="230" alt="image"
src="https://github.com/user-attachments/assets/e12dbde4-c02e-4445-b8ff-5bf0b54c7aac ">
2024-10-10 20:22:25 +08:00
xda
2706656e27
resizable: Keep the ratio when adjust widths (rather than falling back to 33.33% when resizing back) ( #329 )
...
The essence of the problem is that flex_basis initial_size and
flex_basis size are in conflict: the size overwrites the initial_size
percentage and loses the original percentage in extremely narrow parent
groups, so we have to add the field to the state persisting the desired
percentage.
Fix #262

2024-10-10 18:50:46 +08:00
Jason Lee
efa044f417
menu: Fix Menu scrollbar will always showing bug. ( #328 )
...
- Improved Scrollbar size.
2024-10-10 18:10:28 +08:00
Jason Lee
5915618928
dock: Fix zoom support for side dock panel. ( #327 )
...
- Fix emit `PanelEvent::LayoutChanged` when panel resized.
2024-10-10 15:16:16 +08:00
Jason Lee
2198134832
Add col_padding to Table delegate to control the column padding. ( #326 )
...
<img width="775" alt="image"
src="https://github.com/user-attachments/assets/a7189c06-9945-4508-86fb-e71fd819cc41 ">
2024-10-10 13:58:49 +08:00
Jason Lee
fd09229541
story: Fix invalid focus code cause PopupStory Input cannot input anything. ( #325 )
...
Closes #324
When we create a Wry WebView, it will take the focus into the WebView.
So we must care to use it, make sure no WebView create if there no need
to display.
> The `ui::WebView` has implemented when we click out of the WebView to
move focus back to the main window.
>
> But by my test, first render it not work will because the Render is
not trigger so the click out event not listened.
Currently change just removed WebViewStory from the demo.
2024-10-09 15:08:18 +08:00
Jason Lee
0220cf8cc6
dock: Add version to DockArea to allow us check the persisted state is need to update. ( #323 )
2024-10-08 20:46:12 +08:00
Jason Lee
45d4b445ec
panel: Toggle to zoom out when close a panel. ( #322 )
2024-10-08 18:09:41 +08:00
Jason Lee
4fd233ae6b
webview: Invoke blur on call hide method for WebView and update example. ( #321 )
2024-10-08 18:09:25 +08:00
Jason Lee
33200aa685
webview: Blur WebView when clicked out to fix IME cannot input bug. ( #320 )
...
- Closes #316
- Ref https://github.com/tauri-apps/wry/pull/1385
## Before
https://github.com/user-attachments/assets/cc614334-47fe-4722-8745-aea783fbab4a
## After
On macOS, now the IME bug is gone.
https://github.com/user-attachments/assets/363bb016-229f-4766-84f7-6a4838e490bf
https://github.com/user-attachments/assets/320c5c1c-cfac-4165-af8a-bc9708952460
2024-10-08 17:01:52 +08:00
Jason Lee
007288487e
table: Fix horzizontal scrollbar size when there have fixed cols. ( #317 )
2024-10-07 21:47:26 +08:00
Jason Lee
e1e66e8f07
dock: Fix toggle button check will stack overflow bug. ( #312 )
...
Continue #297 #309
```
thread 'main' has overflowed its stack
fatal runtime error: stack overflow
[1] 45068 abort cargo run
```
2024-10-04 15:00:00 +08:00
Jason Lee
3df75566b3
table: Fix to render table vertical scrollbar under the head. ( #311 )
...
Closes #308 , #305
<img width="819" alt="image"
src="https://github.com/user-attachments/assets/e22d7ae7-2dfd-4357-be0e-3b94434b1020 ">
2024-10-04 14:35:36 +08:00
Jason Lee
cbed7b1ea1
menu: Add scrollable support to menu. ( #310 )
...
<img width="274" alt="image"
src="https://github.com/user-attachments/assets/eaff16a6-1294-4381-96c0-c178c195999b ">
2024-10-04 14:24:05 +08:00
Jason Lee
cf88a48bec
dock: Fix toggle dock button display when have nested panels. ( #309 )
2024-10-04 14:22:24 +08:00
Jason Lee
185eca6c67
scrollbar: Update GPUI and fix scrollbar with new API. ( #307 )
...
The https://github.com/zed-industries/zed/pull/18513 has been changed
the `UniformListScrollHandle` API, it provided the scroll contents size,
so we not need calculate it again.
2024-10-04 10:23:11 +08:00
Jason Lee
45b7450b5c
story: Fix modal story button style. ( #306 )
...
<img width="606" alt="image"
src="https://github.com/user-attachments/assets/685299d3-5a29-4444-9b0d-14947ecf8a26 ">
Fix #305
2024-10-04 09:40:56 +08:00
Jason Lee
9a64bc43d9
tooltip: Fix Tooltip text line-height. ( #304 )
...
<img width="247" alt="image"
src="https://github.com/user-attachments/assets/483d6fed-2494-432a-81c3-59a2c220df9d ">
2024-10-03 18:01:56 +08:00
Jason Lee
ca5a0e02d5
dock: Add to support save left, right, bottom dock state. ( #303 )
...
The dock state have been updated to use `DockAreaState`.
2024-10-03 17:25:31 +08:00
Jason Lee
19bb5eee3a
Fix clippy warnings and fix CI to fail when have warnings. ( #301 )
2024-10-03 10:46:02 +08:00
Jason Lee
ce10a0340c
table: Set fixed height to table head to fix some case table head disappear bug. ( #300 )
...
Closes #299
- Improved sort icon to better color.
- Improved table story.
- Disable `horizontal_scroll_handle.scroll_to_item` on select_col, there
have a bug need to fix.
2024-10-03 10:14:44 +08:00
Jason Lee
494e6d15f3
dock: Fix incorrect toggle button shown, when there is not have left or right dock. ( #297 )
2024-10-02 23:00:26 +08:00
Jason Lee
fecb2170a8
table: Fix table sort icon display. ( #296 )
...
- Update first sort behaviour to `descending`.
2024-10-02 22:31:38 +08:00
Jason Lee
13e42dfac3
table: Add to support fixed column on left to Table. ( #295 )
...
- Update table details, fix table head height.
- Add `table_row_border` theme color and use this for row border.
## Demo
https://github.com/user-attachments/assets/91df4b9d-f079-4ddb-b14d-fbcf303dcc44
Fix #292
2024-10-02 22:02:21 +08:00
Jason Lee
33e5fdcb78
scrollbar: Smaller the scrollbar size. ( #294 )
...
<img width="918" alt="image"
src="https://github.com/user-attachments/assets/787766ab-63eb-4568-972b-5abd668511f7 ">
2024-10-02 18:15:53 +08:00
Jason Lee
6f1be83b6e
dock: Add left, bottom, right fixed dock and support toggle. ( #291 )
...
- Improve TabPanel to support control closable.
## Demo
https://github.com/user-attachments/assets/dcf8cde3-61ee-42f6-be93-76f10fc8cf34
2024-10-02 17:42:52 +08:00
ihavecoke
20b9f9c0f2
input: Move caret to line start or end with selected content ( #288 )
...
Ref: https://support.apple.com/en-hk/102650
---------
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2024-10-02 17:35:27 +08:00
ihavecoke
b9e7217662
table: Add refresh method to Table, for reload table use when the columns or rows has been updated. ( #293 )
2024-10-02 17:29:50 +08:00
Jason Lee
7de1c6981e
windows: Fix keybinding display on Windows. ( #289 )
...
<img width="191" alt="image"
src="https://github.com/user-attachments/assets/7cc4d80f-5759-4432-9a13-6fd027af4b27 ">
2024-09-29 23:07:45 +08:00
xda
e43cc48465
Deduplicate Switch animations ( #287 )
2024-09-29 20:21:56 +08:00
Jason Lee
baa45173d1
button: Fix Button text to align vertical center. ( #286 )
...
<img width="1188" alt="image"
src="https://github.com/user-attachments/assets/084727c3-5822-4325-9bbf-374b357b670f ">
The point is add `.font_family(".SystemUIFont")` to root view.
2024-09-27 20:44:23 +08:00
Jason Lee
2b134e47a1
button: Reduce gap between icon and label for small, xsmall button. ( #285 )
2024-09-27 20:28:57 +08:00
Jason Lee
69e94cce1c
table: Add size to Table to support Large, Medium(default), Small, XSmall. ( #283 )
...
Closes #219
2024-09-27 14:45:52 +08:00
Floyd Wang
c5b4505560
feat(button): Remove track_focus ( #282 )
2024-09-27 14:39:48 +08:00
Floyd Wang
2c1119a7bd
feat(button): Support customize loading icon ( #281 )
2024-09-27 13:56:04 +08:00
Jason Lee
76be7a8ed8
table: Add horizontal scrollbar to Table. ( #278 )
2024-09-27 13:48:46 +08:00
Floyd Wang
708e373ab6
feat(indicator): Update icon type ( #280 )
2024-09-27 11:58:14 +08:00
Jason Lee
e1bf3556a9
menu: Blocking mouse move event to back view, when PopupMenu has open. ( #277 )
...
Closes #275
https://github.com/user-attachments/assets/7061fd93-10dd-4645-8080-ec7dbb65a80e
2024-09-26 21:38:52 +08:00
Jason Lee
709c706adf
menu: Improve Menu to avoid invalid or duplicate separators. ( #276 )
2024-09-26 21:28:42 +08:00
Jason Lee
7a8eaefd30
story: Add very complex table data update example to test performance. ( #274 )
...
The example that used: 6000 rows x 60 cols, and refresh data every
100ms.
The CPU usage: 40% (macOS M4)
https://github.com/user-attachments/assets/40d6c64f-c658-4c7a-9251-fb76e17ec543
2024-09-26 19:40:07 +08:00
Floyd Wang
d2f26795eb
feat(list_item): Add stop_propagation/prevent_default when trigger click event ( #273 )
2024-09-26 11:55:02 +08:00
Jason Lee
098315ee92
button: Reduce px for compact small button. ( #271 )
...
<img width="882" alt="image"
src="https://github.com/user-attachments/assets/c41955ea-5126-4d1a-b2dd-dea2e4b89c9e ">
2024-09-25 21:48:44 +08:00
Jason Lee
2d6f478512
dock: Add zoomable support to Panel. ( #269 )
2024-09-24 22:37:29 +08:00
xda
1e44b5659f
table: Render table stripe on background even there is no enough rows ( #256 )
...
<img width="1202" alt="image"
src="https://github.com/user-attachments/assets/57a744c3-673a-4118-ba97-03837b0b9390 ">
- And add `flex_shrink_0` to table head.
Fix https://github.com/huacnlee/gpui-component/issues/160
---------
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2024-09-24 22:07:27 +08:00
Jason Lee
2a331fcb79
theme: Add shadow option to support toggle shadow for base controls, default: true. ( #268 )
...
- Add shadow to Button if it enabled.
2024-09-24 10:52:01 +08:00
Jason Lee
3fc0b70639
dock: Keep invalid panel state info avoid missing the state. ( #267 )
...
Fix #257
2024-09-23 22:43:02 +08:00
Jason Lee
dc3dc4a9ec
table: Avoid Table handle mouse wheel event, when it is blocked by some other element like Modal. ( #261 )
2024-09-23 14:32:16 +08:00
xda
89414e1c3c
table: Toggle stripe and number of rows in Table Story ( #259 )
...

2024-09-23 11:58:16 +08:00
ihavecoke
2da13499e5
list: Add render_initial support to List. ( #258 )
...
Add a method to the List component to render the initial state. When
input is empty, you may need to render a special interface to the user.
This method can be called at this point
### Showcase
https://github.com/user-attachments/assets/39c61bfe-4451-43f9-b0d9-8f941ebd94dd
2024-09-21 01:53:32 +08:00
Floyd Wang
f20f573dbc
notification: Fix when multiple notifications pop up at the same time, autohide not work ( #255 )
2024-09-19 17:33:49 +08:00
Jason Lee
20926b7077
popover: Fix PopoverContent content build to use ViewContext<Self>. ( #254 )
...
And add popover self dismiss example.
## How to dismiss popover from inside.
```rs
cx.emit(DismissEvent);
```
2024-09-19 10:54:04 +08:00
Jason Lee
08a160e543
button: Apply disable color to ButtonStyleCustom.
2024-09-17 21:15:48 +08:00
Jason Lee
d641c219a1
button: Use primary or danger color for the disable background. ( #252 )
...
<img width="1624" alt="image"
src="https://github.com/user-attachments/assets/61162ba5-9188-4cad-a154-2584abd0fd31 ">
Fix #251
2024-09-17 21:01:06 +08:00
Jason Lee
8f0ba2e5c3
modal: Only focus modal when it not focused on. ( #250 )
...
- Fix dropdown to mouse down out to dismiss.
https://github.com/user-attachments/assets/f5ab4aca-bfdc-460e-ae5a-cd0a31a30906
2024-09-17 18:48:06 +08:00
Jason Lee
97e61a507b
otp_input: Fix OtpInput to stop_propagation on keydown. ( #249 )
2024-09-17 10:55:09 +08:00
Floyd Wang
90c5125abc
Reduce popover border radius ( #248 )
2024-09-17 10:26:47 +08:00
Jason Lee
f77993082d
input: Update Input selection behavior to like OS input. ( #247 )
...
Revert old implementation
- https://github.com/huacnlee/gpui-component/pull/26
- https://github.com/zed-industries/zed/pull/14340
## Before
https://github.com/user-attachments/assets/52ce2e3a-3e1d-4ba2-af42-76b1df987404
## After
https://github.com/user-attachments/assets/9aa8cfe1-5928-4d20-b534-806140c7ee59
## The Input in the Browser
https://github.com/user-attachments/assets/c913248e-b1dc-46d6-a517-e1231e606171
2024-09-17 09:58:07 +08:00
Jason Lee
0e16d742bb
list: Add set_size method to List and fix input size in small dropdown. ( #246 )
2024-09-16 19:57:49 +08:00
Jason Lee
75b4f34b92
Try fix Button, Checkbox, Radio text line-height ( #240 )
...
<img width="1202" alt="屏幕截图 2024-09-12 224306"
src="https://github.com/user-attachments/assets/b96fee5e-6d39-4ba0-829c-3eaf4aed8ff2 ">
2024-09-16 10:36:18 +08:00
Jason Lee
d33b4b2ea0
dock: Fix panel zoom when it split and added to other StackPanel. ( #245 )
2024-09-16 10:18:04 +08:00
Jason Lee
55585f9699
windows: Fix button and checkbox line-height again. ( #244 )
...
<img width="1202"
src="https://github.com/user-attachments/assets/6741041a-f449-4600-bec1-751841dcec88 ">
2024-09-13 22:55:59 +08:00
Floyd Wang
d8ace3c683
clipboard: Refactor with Element ( #242 )
2024-09-13 13:53:39 +08:00
Jason Lee
a8d4abea69
button: Improve ButtonGroup to add style, size methods. ( #241 )
...
- Add `ButtonStyled` trait to apply the style for Button and
ButtonGroup.
2024-09-13 12:00:47 +08:00
xda
b83ece3cd8
Add ToggleButton (as part of ButtonGroup) ( #239 )
...

---------
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2024-09-13 11:58:10 +08:00
Jason Lee
ce87c3a001
modal: Improve Modal and Panel focus handle. ( #238 )
...
- modal: Improve modal focus take, when modal close, make sure focus
back.
- modal: Fix hover close button will cross to back modal on multiple
modal layer.
- panel: Add focus handle to Panel and TabPanel.
- panel: Update title method to return `AnyElement`.
2024-09-12 19:51:33 +08:00
Floyd Wang
9388b88f59
theme: Simplify init ( #237 )
2024-09-12 16:14:41 +08:00
Jason Lee
cf551654fe
scrollbar: Fix Scrollbar inset and remove bar border. ( #236 )
...
<img width="920" alt="image"
src="https://github.com/user-attachments/assets/f834a920-8f89-4be8-9100-d2b5e4364449 ">
2024-09-11 11:59:37 +08:00
Jason Lee
77cb8cb448
button: Hotfix Button to valign text center. ( #235 )
...
<img width="1336" alt="image"
src="https://github.com/user-attachments/assets/64029ab3-6447-47b1-a40c-f1e6668172b7 ">
2024-09-11 11:39:17 +08:00
xda
4f8c4ccd5d
scrollbar: Keep the original thumb position when mouse down to dragging ( #234 )
...

fix #224
2024-09-11 09:37:07 +08:00
Jason Lee
fbbb985e84
ui: Improve UI details (Modal, Checkbox, Radio and MenuItem) ( #233 )
...
- modal: Reduce modal title line height.
- checkbox, radio: Fix label line height to align with checkbox.
- menu: Update Menu item style, height to 28px, and fix divider padding.
<img width="523" alt="image"
src="https://github.com/user-attachments/assets/c254dc07-9d37-4885-b687-58ec4d8e95a4 ">
<img width="453" alt="image"
src="https://github.com/user-attachments/assets/3ad44419-1953-4048-8173-4d8c0646777a ">
<img width="369" alt="image"
src="https://github.com/user-attachments/assets/84d23eb2-15f9-47d7-b6d4-15295ab3a544 ">
2024-09-10 19:42:54 +08:00
Jason Lee
a0d3d35be4
modal: Add to support open multiple Modals. ( #232 )
...
- Add `Esc` to close modal.
2024-09-10 16:58:22 +08:00
ihavecoke
303dd51047
Use small size for calendar month item to fixed content overflow ( #231 )
2024-09-10 00:16:31 +08:00
Jason Lee
728be16a39
Fix windows dependency only on Windows.
2024-09-09 22:40:54 +08:00
Jason Lee
9bc4887d55
Update dependencies.
2024-09-09 22:33:41 +08:00
Jason Lee
74abc339b7
Fix bugs ( #230 )
...
- Fix color picker hover preview color to shrink_0.
- Fix Divider display.
2024-09-09 22:05:02 +08:00
Jason Lee
840a54850a
Update register_panel to use trait object Fn. ( #229 )
2024-09-09 19:19:27 +08:00
Jason Lee
d6d00f59a2
Add dump default impl for Panel trait.
2024-09-09 14:38:52 +08:00
Jason Lee
33f0291f6d
Improve layout save details for example app.
2024-09-09 14:03:51 +08:00
Sunli
ac83fad692
windows: Set the default stack size to 8M on Windows. ( #228 )
2024-09-09 13:51:10 +08:00
Jason Lee
16396d3583
Revert "Set the stack size of the main thread to 8M ( #227 )" is not work on macOS.
...
This reverts commit 2f80ba408a .
2024-09-09 13:34:31 +08:00
Jason Lee
bf134b2ff9
Add to support dump/load Dock layout. ( #226 )
2024-09-09 13:30:22 +08:00
Sunli
2f80ba408a
Set the stack size of the main thread to 8M ( #227 )
...
For fix stack overflow issue on Windows.
2024-09-09 10:24:41 +08:00
Jason Lee
821487bed5
Improve popup snap to window with margin. ( #225 )
...
- Also update GPUI.
Ref: https://github.com/zed-industries/zed/pull/17159
<img width="866" alt="image"
src="https://github.com/user-attachments/assets/0737e4e4-7069-4554-a766-b9fc7b487fd6 ">
2024-09-07 11:50:38 +08:00
Jason Lee
b6374313b2
Fix DockItem::tabs, the items should use trait object to support difference type.
2024-09-06 18:04:26 +08:00
Jason Lee
9baada4fb4
dock: Reduce dock item member ( #223 )
2024-09-06 17:51:21 +08:00
xda
83aecf1293
Add ButtonGroup ( #221 )
...
<img width="849" alt="image"
src="https://github.com/user-attachments/assets/5f809b40-9d4c-4934-828d-98f77a3f4b29 ">
---------
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2024-09-06 10:32:10 +08:00
Jason Lee
adf6f70185
dock: Define a better way to init Dock layout. ( #218 )
2024-09-05 19:33:32 +08:00
Floyd Wang
d6015f636c
panel: Support custom style for the panel title ( #220 )
2024-09-05 11:36:59 +08:00
Jason Lee
e1d6b3aaed
dock: Improve drop target style and size to 35%. ( #217 )
2024-09-04 22:01:09 +08:00
ihavecoke
d996144713
date_picker: Add range_mode method to DatePicker to set as range mode. ( #216 )
...
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2024-09-04 21:41:01 +08:00
Jason Lee
2c469da55a
Update GPUI and apply opacity feature. ( #215 )
2024-09-04 19:29:51 +08:00
Jason Lee
9e67525650
Fix mistake.
2024-09-04 19:00:50 +08:00
Jason Lee
f2d75f7abd
dock: Fix split_panel to use async. ( #214 )
2024-09-04 17:30:55 +08:00
Jason Lee
476f97d5e0
scrollbar: Opacity scrollbar when not hover on it. ( #213 )
...
https://github.com/user-attachments/assets/ea070e6f-3d4c-4a0d-b6da-be34e7dfc579
2024-09-04 16:48:49 +08:00
Jason Lee
f6b4e5a591
dock: Fix add_panel with placement to split size. ( #212 )
...
https://github.com/user-attachments/assets/7177bd8f-5b19-4959-8d60-cae583173e73
2024-09-04 00:35:51 +08:00
ihavecoke
acabaf32c8
Correcting shacn to shadcn to uniformly use shadcn ui names ( #210 )
...
* Fixed some color naming with shadcn style
* Input story support scroll y
2024-09-03 23:31:34 +08:00
Jason Lee
0158083599
dock: Fix panel zoom sometimes is not work. #197 ( #211 )
...
This is because the `PanelEvent::ZoomIn` is called 2 times when we click
the menu (I don't why, not found the source).
So just split Zoom in, Zoom out as two difference methods to avoid this.
2024-09-03 23:15:44 +08:00
Jason Lee
0834ac0394
dock: Fix panel that can not auto resize when it have initial size. ( #209 )
...
https://github.com/user-attachments/assets/8605b82e-6113-41d1-a9c4-0ba7d55968ba
2024-09-03 21:39:03 +08:00
Jason Lee
e318a9d8dc
doc: Fix TabPanel popup menu can't dispatch action to TabContent. ( #208 )
...
Co-authored-by: Floyd Wang <gassnake999@gmail.com>
2024-09-03 19:51:35 +08:00
Jason Lee
5e86c9cfa0
dock: Revert first argument for TabPanel::new ( #207 )
2024-09-03 14:04:00 +08:00
Jason Lee
73e82c785a
dock: Improve set_parent in StackPanel insert_panel to use defer instead of spawn ( #205 )
2024-09-03 11:18:57 +08:00
Jason Lee
8ece86cd0c
dock: Add id to DockArea and improve DockArea init. ( #204 )
...
- Export add_panel_at method for TabPanel to split_panel.
- Fix resizeable_panel init size support.
- Fix panel resize to let panel that have initial size will not auto resize on window resize.
- Fix resize_handle sometimes will invisibly bug.
- Update TabPanel new to support give parent StackPanel.
2024-09-02 21:27:19 +08:00
Jason Lee
f611b599aa
dropdown: Fix Dropdown placeholder to support change locale. ( #203 )
2024-09-02 14:57:53 +08:00
Jason Lee
af09525c1e
dock: Add popup_menu delegate to custom panel menu. ( #202 )
2024-09-02 14:55:37 +08:00
Jason Lee
f5cae46e42
Improve ColorPicker to support input hex color. ( #201 )
...
https://github.com/user-attachments/assets/be5fc290-0464-4356-9f97-c35720e3e11d
2024-09-02 13:56:19 +08:00
Jason Lee
a049f606c0
Fix Checkbox, Radio label color. ( #200 )
2024-09-02 00:24:57 +08:00
Jason Lee
1f0e52da50
Add ColorPicker ( #199 )
...
<img width="262" alt="image"
src="https://github.com/user-attachments/assets/ad96859f-e6cb-47a6-bedb-fef02122b711 ">
2024-09-02 00:21:01 +08:00
Jason Lee
926de77967
Fix tooltip padding. ( #198 )
2024-09-01 21:58:50 +08:00
Jason Lee
6564c502c9
Add close menu to Panel. ( #196 )
2024-09-01 21:33:50 +08:00
Jason Lee
9c4411ff2b
date_picker: Reduce DatePicker popup position. ( #195 )
2024-09-01 00:36:51 +08:00
Jason Lee
169572fa74
tab: Improve TabBar border to let active item can override it. ( #194 )
2024-09-01 00:31:14 +08:00
Jason Lee
3d8e7a9e54
Update GPUI and fix Input API changes. ( #193 )
2024-08-31 23:17:14 +08:00
Floyd Wang
ef49753d32
Improve dropdown disabled state ( #192 )
2024-08-30 15:26:56 +08:00
Jason Lee
0da882349f
Add exit animation to Notification.
...
- Add `cubic_bezier` method and change modal to use this.
Ref #148
https://github.com/user-attachments/assets/c09adc18-554c-4300-8109-98f3ab183910
2024-08-30 11:24:55 +08:00
Floyd Wang
14af8998bf
Add disabled state for the dropdown ( #190 )
2024-08-30 09:56:12 +08:00
ihavecoke
fd2f5e46f2
Securely handle table load more subtract logic to prevent attempt to subtract with overflow panic ( #189 )
2024-08-29 23:29:26 +08:00
Floyd Wang
b6ce44c349
Support press esc to close popover ( #188 )
2024-08-29 18:07:26 +08:00
Floyd Wang
311abe07fe
Reduce Popover pop-up margin ( #187 )
2024-08-29 16:19:29 +08:00
Floyd Wang
7286866afd
Reduce PopoverContent padding ( #186 )
2024-08-29 11:35:38 +08:00
Jason Lee
f7f3fcedf3
slider: Improved bar and thumb position. ( #185 )
2024-08-29 10:36:47 +08:00
Jason Lee
9768755eab
Fix panel resize when window resized. ( #181 )
...
Co-authored-by: Floyd Wang <gassnake999@gmail.com>
2024-08-28 19:40:35 +08:00
Jason Lee
237b0f6956
table: Add load_more delegate method and called when scrolled near the bottom. ( #183 )
...
https://github.com/user-attachments/assets/03001a21-6a3d-4c06-a00c-9dea8208e357
2024-08-28 15:12:42 +08:00
ihavecoke
a5217df13e
Popover content supports setting the maximum width ( #180 )
...
Before:

After:

2024-08-27 22:08:50 +08:00
Jason Lee
7b5efd19bb
Better Panel resize. ( #178 )
...
- Resize panels when windows is resize to smaller #175 .
https://github.com/user-attachments/assets/b2c50949-7310-4d3d-8276-5bf15cf3ba9f
2024-08-27 18:38:37 +08:00
Jason Lee
ad5e480e63
Fix input history ( #179 )
2024-08-27 13:52:19 +08:00
Jason Lee
1dbf809e99
Improved Notification to manage autohide on list. ( #177 )
2024-08-24 00:26:16 +08:00
Jason Lee
409f597100
Fix resizeable panel sometime will not fill parent. ( #176 )
...
<img width="1202" alt="image"
src="https://github.com/user-attachments/assets/dbffde88-fc1d-409b-8795-15c405cc4ce9 ">
2024-08-23 22:15:52 +08:00
Jason Lee
5533a8b72c
Fix drawer position ( #174 )
2024-08-23 22:01:52 +08:00
Jason Lee
72b8290945
Upgrade GPUI. ( #173 )
2024-08-23 18:43:26 +08:00
Jason Lee
c5c8e46ac7
New Dock ( #172 )
...
https://github.com/user-attachments/assets/c8c55faa-8f17-4fa2-9f62-5fdd598087ef
- [x] Move to insert panel to tabs middle.
- [x] Zoom panel
- [x] Tab popup menu (Close Panel, Split, Zoom in/Zoom out)
- [x] TabBar scrollable
- [ ] TabBar nav history
2024-08-23 18:01:29 +08:00
Floyd Wang
7e9d79ca1b
Improve the loading button ( #170 )
...
* Set the background opacity when loading
* Do not trigger the on click event when loading
2024-08-21 10:57:41 +08:00
王恒
36354cc5e4
Set cursor width to an integer to prevent width fluctuation on low PPI devices. ( #169 )
...
Before
https://github.com/user-attachments/assets/38ceac8e-c98d-43c7-844b-0a2fb7d416a5
After
https://github.com/user-attachments/assets/e3f9c70e-773e-4606-ad6a-021b0e7fd7c9
2024-08-19 16:37:40 +08:00
Jason Lee
7a00e8a68e
Add search to List example. ( #168 )
...
- Fix drawer, modal open to focus on first input.
2024-08-19 16:13:14 +08:00
Jason Lee
b3bee1db3a
Improved id for Switch. ( #167 )
2024-08-19 15:53:38 +08:00
Jason Lee
f05d2ebbd2
popup_menu: Add submenu support. ( #165 )
...
- Add submenu support.
- Removed Popover `window` mode, this is not a good design.
https://github.com/user-attachments/assets/0e3735f4-2bfb-459f-a24d-e3440e738d4f
2024-08-19 14:58:28 +08:00
Jason Lee
fd837565c4
Add KeyBinding to MenuItem. ( #164 )
...
<img width="370" alt="image"
src="https://github.com/user-attachments/assets/a0e98260-75ac-4a79-bf24-80d2c82f9507 ">
2024-08-16 18:57:43 +08:00
Jason Lee
46ff43ff36
Extract History to a common design to support more cases. ( #162 )
...
Ref https://github.com/huacnlee/gpui-component/issues/161
For example: Used to do Back/Forward
2024-08-16 17:04:11 +08:00
Jason Lee
4490618c4a
Update table to support to support toggle col selection. ( #159 )
...
- Add `border` method to enable/disable border, default: `true`.
- Update `stripe` default to false.
- Update theme to remove table head color, just use window bg like.
<img width="1263" alt="image"
src="https://github.com/user-attachments/assets/2e0994a9-7172-4812-a0e2-3b3ba4281112 ">
Closes #155
2024-08-16 14:34:53 +08:00
Jason Lee
a79d1a3dc2
Fix scrollbar to default to invisible on first render. #146 ( #158 )
2024-08-16 14:07:59 +08:00
Jason Lee
e86f90d309
Close Dropdown menu on blur. ( #157 )
...
Closes #156
2024-08-16 14:03:45 +08:00
Jason Lee
b3f62bf096
Export with_type and impl FluentBuilder for Notification. ( #154 )
2024-08-15 19:52:37 +08:00
Jason Lee
57dab4d15a
Rename with_id, with_type_id to id, type_id. ( #153 )
2024-08-15 18:05:07 +08:00
Floyd Wang
a02a6ed6b8
Set default true for cleanable & trigger event when dropdown clean ( #152 )
2024-08-15 18:01:43 +08:00
Jason Lee
36475bac76
Add with_type_id to support set a struct as a Notification unique id. ( #151 )
2024-08-15 18:01:32 +08:00
Jason Lee
981d1391e6
Update Root API ( #150 )
2024-08-15 17:27:34 +08:00
Jason Lee
c9763224c2
Add Notification ( #149 )
...
https://github.com/user-attachments/assets/8a10bff7-f669-471e-8516-2a64ae95ae0a
2024-08-15 16:50:33 +08:00
Jason Lee
6d86e64846
Update modal demo to focus input on open. ( #147 )
2024-08-15 09:45:58 +08:00
Jason Lee
a36e3e09d5
Focus back last focus handle when modal, drawer closed. ( #145 )
2024-08-14 18:14:59 +08:00
Floyd Wang
c9a1bba3c2
Fix the disabled style of ghost button ( #144 )
2024-08-14 17:44:00 +08:00
Jason Lee
3550b1ee13
Add slide down animation t Modal. ( #141 )
...
- Export cx.active_modal and cx.active_drawer
- Add support custom modal style, and add show_close option.
2024-08-14 17:23:39 +08:00
Floyd Wang
1da82c5453
Do not show the scrollbar when table is empty ( #143 )
2024-08-14 11:13:42 +08:00
Floyd Wang
ccad5cd98e
TableDelegate support render_empty (#142 )
2024-08-14 11:01:57 +08:00
Jason Lee
70bc526fbb
Fix Dropdown and DatePicker anchor to snap to window. ( #139 )
...
<img width="786" alt="image"
src="https://github.com/user-attachments/assets/c40fab1d-2cbe-4750-b05e-ed42cb43dd3c ">
2024-08-13 18:10:30 +08:00
Jason Lee
b934ff76e6
Add Modal ( #138 )
...
https://github.com/user-attachments/assets/f4c2f9dd-2508-4251-a861-1af3af7542a3
2024-08-13 17:41:12 +08:00
Jason Lee
63f333d8ad
Add Drawer ( #137 )
...
- Update scrollable to accept EntityId.
https://github.com/user-attachments/assets/a6c02890-3a6e-4b82-b5c5-3f0a48f35368
2024-08-13 16:01:52 +08:00
Jason Lee
7059165fa6
datepicker: Fix calender popup background. ( #136 )
...
Closes #135
2024-08-12 18:52:58 +08:00
Jason Lee
7d309acd2f
Improve Table head to not show selected bg and remove drag border color. ( #134 )
...
https://github.com/user-attachments/assets/0836014d-9240-4e77-9daf-dd1ef8d81cd5
2024-08-11 21:25:41 +08:00
Jason Lee
b301c5b8fe
Optimize and simplify the BlinkCursor. ( #133 )
2024-08-11 21:12:29 +08:00
Jason Lee
bb6d8d8f60
Cleanup first version impls ( #132 )
2024-08-11 14:46:55 +08:00
Jason Lee
8f71b807aa
Add Animate ( #130 )
2024-08-09 18:22:06 +08:00
Floyd Wang
283b319edd
Input add set_placeholder method ( #131 )
2024-08-09 17:24:29 +08:00
Floyd Wang
e073b60bc1
Fix the issue of repeatedly setting the input background color ( #129 )
2024-08-09 16:09:22 +08:00
Jason Lee
ebf8a7f6f3
Add Skeleton ( #128 )
...
https://github.com/user-attachments/assets/deb57e8d-f894-41b6-b44b-cc2b4a307429
2024-08-09 15:55:48 +08:00
Floyd Wang
eb53016d71
Use ViewContext<Self> instead of WindowContext for input affix ( #126 )
2024-08-09 11:37:13 +08:00
Jason Lee
2b4ed4f8f6
Improve Tooltip style details. ( #125 )
2024-08-09 10:36:54 +08:00
Jason Lee
97dd09fbda
Fix to display correct days in calendar view. ( #124 )
...
<img width="624" alt="image"
src="https://github.com/user-attachments/assets/3e6528a0-d649-42a9-9c82-f1e06539ec46 ">
<img width="617" alt="image"
src="https://github.com/user-attachments/assets/370dfa05-e8b1-4aa6-8eda-070d6f4a2661 ">
2024-08-09 10:16:31 +08:00
Jason Lee
5d55c5c31e
Add DateRangePicker ( #123 )
...
https://github.com/user-attachments/assets/cc934401-78c5-42d6-afc8-a365fea2129b
2024-08-08 23:29:54 +08:00
Jason Lee
2c531fa3ef
Add text style to Button with no padding. ( #122 )
2024-08-08 20:13:52 +08:00
Jason Lee
966ce4c2dd
Add link, link_with_icon to PopupMenu, and remove track_focus. ( #121 )
...
- Add `popup_menu` quick API to Button to let easy to use.
2024-08-08 19:50:10 +08:00
Jason Lee
27d094c590
datepicker: Add Year, Month select mode. ( #119 )
...
https://github.com/user-attachments/assets/b6232d8e-0832-449d-a982-49e015232cfa
2024-08-07 23:09:42 +08:00
Jason Lee
ebdcf244e2
Add Calendar and DatePicker. ( #117 )
...
https://github.com/user-attachments/assets/dda87fa7-f080-418a-8dd7-ab8581eb3beb
2024-08-07 20:25:11 +08:00
Floyd Wang
e07f551317
Fix the issue where large sections of label do not wrap ( #118 )
2024-08-07 19:38:48 +08:00
Jason Lee
340c5fef3d
Improve OtpInput to add more size, use Icon to render mask. ( #116 )
...
- Add `default_value`, `set_value`, `masked` method.
- Add `set_value`, `value` method to set/get from OptInput.
<img width="390" alt="image"
src="https://github.com/user-attachments/assets/ef5368e9-132d-4de6-8506-aeecc47a9189 ">
2024-08-07 11:39:02 +08:00
Jason Lee
cbffb9a543
Fix Input clean button size. ( #115 )
2024-08-06 23:51:09 +08:00
Jason Lee
827f57fb6a
Add Sizable trait to impl small, xsmall, large and apply to Button, Input, Dropdown, Switch. ( #113 )
2024-08-06 17:19:54 +08:00
Jason Lee
2e1a4f84fd
Add to support click Scrollbar to scroll and fix thumb position when dragging. ( #112 )
...
- Add scrollbar border on hover and dragging.
https://github.com/user-attachments/assets/c7c3b9c1-d458-438d-bf78-3b5bc2ddcd5c
2024-08-06 15:09:42 +08:00
Floyd Wang
bc4e5732a0
Fix label text align not work ( #111 )
...
<img width="1668" alt="image"
src="https://github.com/user-attachments/assets/e1bbad88-40c3-4701-bfd0-38381e2ed67b ">
2024-08-06 11:51:39 +08:00
Jason Lee
f3fdfae002
Fix list next to select first item, cancel to deselect item. ( #110 )
...
- Add confirmed to ListItem to show check style.
2024-08-06 11:31:35 +08:00
Jason Lee
e7a0d13b69
Fix windows build ( #109 )
2024-08-05 21:43:55 +08:00
Jason Lee
a5989f6a7c
Improve PopupMenu style ( #108 )
...
<img width="216" alt="image"
src="https://github.com/user-attachments/assets/9dcfd30f-62cc-41ff-a97d-f69b79bd997c ">
<img width="346" alt="image"
src="https://github.com/user-attachments/assets/c7e564e9-c0f9-4282-9df1-9c2cd92efea9 ">
2024-08-05 21:23:57 +08:00
Jason Lee
4b61c3c25a
Add ContextMenu ( #107 )
...
https://github.com/user-attachments/assets/1534bb31-1d32-40b8-8871-f41fb182c8e9
2024-08-05 20:54:07 +08:00
Jason Lee
553b6409c0
Improve Dropdown to Add search support and custom icon ( #106 )
...
- Add SearchableVec to let Dropdown support search filter.
- Fix dropdown title overflow.
- Add to support custom dropdown right icon.
https://github.com/user-attachments/assets/b9e28fce-3e0f-44f7-a0f4-3e01f6db31d1
2024-08-05 11:47:55 +08:00
Floyd Wang
12b5d1b501
Add clipboard ( #105 )
2024-08-05 11:35:02 +08:00
Floyd Wang
48c452e6f6
Better disabled style for ghost button ( #102 )
2024-08-02 18:20:08 +08:00
Floyd Wang
e784f98a38
TableDelegate methods return ViewContext<Table<Self>> ( #101 )
2024-08-02 16:38:48 +08:00
Floyd Wang
48efdecdef
The button compact method defaults to true ( #99 )
2024-08-02 11:31:40 +08:00
Jason Lee
22a1157378
Add prefix, suffix to TabBar. ( #98 )
2024-08-01 21:36:33 +08:00
Jason Lee
68e6464bea
Fix pane bottom offset in scroll mode.
2024-08-01 20:28:02 +08:00
Jason Lee
e9d409a4b1
Add Link style Button ( #97 )
...
<img width="1305" alt="image"
src="https://github.com/user-attachments/assets/ee42d86f-e237-4544-aa2d-1414dabfb55e ">
- Update `primary`, `danger`, `outline`, `ghost`, `link` methods to as a
builder method to just change style.
- Add `compact` used to reduce padding.
<img width="1279" alt="image"
src="https://github.com/user-attachments/assets/ccbd71c0-9157-4ef8-b164-b99ade24cf92 ">
2024-08-01 19:54:35 +08:00
Jason Lee
4a5b387b40
Fix mistake unwrap in PopupMenu.
2024-08-01 15:43:21 +08:00
Jason Lee
3dd149e711
Update PopupMenu to support checked style. ( #96 )
...
<img width="256" alt="image"
src="https://github.com/user-attachments/assets/87009870-e426-48e5-9860-ba91b4702ea4 ">
2024-08-01 15:41:00 +08:00
Michael Angerman
eb75df5d99
Update demo application to activate on startup ( #92 )
...
When I start up *gpui-component* its nice to be able to see that
application show up,
similar to the way zed editor works upon startup...
2024-08-01 11:03:40 +08:00
Jason Lee
0e3736e312
Update Dropdown title to use SharedString ( #95 )
2024-08-01 11:00:18 +08:00
Floyd Wang
c91f71ae21
Table support render_tr and stripe methods ( #94 )
2024-08-01 10:17:21 +08:00
Floyd Wang
35c3b13bdd
Fix typo in table
2024-07-31 15:34:36 +08:00
Jason Lee
d1c19c5912
Add Link ( #91 )
2024-07-31 14:24:57 +08:00
Jason Lee
d659713555
Fix Label, Checkbox, Radio to support label text wrap. ( #90 )
...
<img width="1102" alt="image"
src="https://github.com/user-attachments/assets/1443378d-54e9-43a4-8bb8-0d0f4581169d ">
2024-07-31 11:49:32 +08:00
Jason Lee
c94e9feae2
Fix to work with new GPUI.
2024-07-31 10:12:26 +08:00
Jason Lee
9766a0766b
Fix dropdown to avoid item text wrap. ( #88 )
2024-07-30 19:58:48 +08:00
Jason Lee
6465969c5a
Improve svg_img to use cached assets. ( #87 )
2024-07-30 19:54:27 +08:00
Floyd Wang
73121123f3
Add custom button demo ( #86 )
2024-07-30 11:24:29 +08:00
Floyd Wang
fc6423f22c
Add ButtonCustomStyle for customized color ( #85 )
2024-07-30 10:38:42 +08:00
Jason Lee
f496c241d7
button: Fix Button click prevent_default. ( #84 )
...
- Use icon in title_bar for switch theme, and add GitHub icon.
2024-07-30 00:28:18 +08:00
Jason Lee
8aaeb9383d
Fix dropdown click to lose focus. ( #80 )
2024-07-29 19:00:17 +08:00
尹吉峰
6e58edd349
input: Expose TextInput::disabled ( #81 )
2024-07-29 18:51:46 +08:00
Floyd Wang
97d139f9ec
Expose focus method for otp input ( #83 )
2024-07-29 16:20:58 +08:00
Floyd Wang
66698bfe27
Rename dropdown render_empty to empty ( #82 )
...
Also, `OTPInput` to `OtpInput`
2024-07-29 15:37:38 +08:00
Jason Lee
a3df086e79
theme: Fix list, table theme colors. ( #79 )
...
- Fix list, table theme colors.
- Fix table hover bg.
- Add avatar to table list.
- Update dropdown Size:Small style.
2024-07-29 13:52:45 +08:00
Jason Lee
01aa9401c5
resizable: Fix resizable handle to keep showing drag style on dragging. ( #78 )
...
https://github.com/user-attachments/assets/a8d2abcb-9122-4060-bfd6-2673903c18a1
2024-07-29 10:01:22 +08:00
Jason Lee
15e9804f08
table: Add sort button to table column. ( #77 )
...
https://github.com/user-attachments/assets/d6a3dc9b-758f-4108-8d1d-d8a3d2dc0dc2
2024-07-28 23:24:55 +08:00
Jason Lee
7bfdfcb2ec
table: Add drag to move col. ( #76 )
...
https://github.com/user-attachments/assets/9964f3da-0376-4b53-b64e-c9652c324aa3
2024-07-28 22:20:23 +08:00
Jason Lee
79958fc95c
Add to support Table column resizing. ( #75 )
...
https://github.com/user-attachments/assets/d56f2cd7-df08-437b-9eea-849d68094e1f
2024-07-28 00:51:37 +08:00
Floyd Wang
11034ec2ac
Improve dropdown render_empty builder result from AnyElement to impl IntoElement for better usage
2024-07-26 17:26:58 +08:00
Floyd Wang
55822144c4
Rename InputOtp to OTPInput ( #74 )
2024-07-26 17:12:23 +08:00
Floyd Wang
d278d85058
Imporve dropdown ( #73 )
...
* Remove min-height
* Provide `render_empty` for custom empty view
* Fix crash when delegate is empty
2024-07-26 14:31:47 +08:00
Floyd Wang
81ecb1e11b
InputEvent support clone (#72 )
2024-07-25 18:43:29 +08:00
Jason Lee
2396c918f2
Hide scrollbar when scroll are is small than container. ( #71 )
2024-07-25 15:53:57 +08:00
Floyd Wang
f02c2a82b1
Do not preset padding when input with affix ( #70 )
2024-07-25 11:02:04 +08:00
尹吉峰
7489a4ffdd
Update WebView to pass wry::WebView instance ( #69 )
...
It's much prefer to use `WebViewBuilder` instead of
[WebView::new](https://docs.rs/wry/latest/wry/struct.WebView.html#method.new )
2024-07-24 19:32:05 +08:00
Jason Lee
4c81977639
Fix Label text_align again.
2024-07-24 19:01:43 +08:00
Jason Lee
ed132ad55e
Add more example to Label.
2024-07-24 18:56:32 +08:00
Jason Lee
c538a231c1
Fix Label text_align.
2024-07-24 18:39:13 +08:00
Jason Lee
6b019e3954
Impl InteractiveElement, StatefulInteractiveElement for Scrollable.
2024-07-24 17:59:44 +08:00
Jason Lee
030a706a4c
Refactor ScrollView into scrollable fluent method. ( #68 )
2024-07-24 17:50:50 +08:00
Jason Lee
7305967c09
Impl Scrollable for Focusable<E>, Stateful<E>.
2024-07-24 17:01:15 +08:00
Jason Lee
d63e256f19
Update Label masked char ( #67 )
2024-07-24 16:35:28 +08:00
Jason Lee
22a15c7dcc
Update scroll view ( #66 )
2024-07-24 15:41:20 +08:00
Jason Lee
4edf1e3427
Update ScrollView to let content is FnOnce. ( #65 )
2024-07-24 11:38:30 +08:00
Jason Lee
e0103d1d58
Add CI ( #62 )
2024-07-24 10:39:19 +08:00
Jason Lee
d60a1122d4
Scroll to top when list have searched. ( #64 )
2024-07-24 10:09:12 +08:00
Floyd Wang
764e7486e7
Set the default cleanable to false for new dropdown ( #63 )
2024-07-24 10:07:11 +08:00
Jason Lee
b4862082f1
Improve list item ( #61 )
2024-07-23 22:08:21 +08:00
Floyd Wang
1b715c431f
Fix new dropdown selected_index not work ( #60 )
2024-07-23 19:18:39 +08:00
Jason Lee
db14f0a2e5
Add pattern and validate to Input for limit input format. ( #59 )
2024-07-23 15:36:08 +08:00
Jason Lee
3ec35929ae
Add font-weight methods to styled: font_light, font_semibold, font_bold ... ( #58 )
...
https://tailwindcss.com/docs/font-weight
2024-07-23 14:57:16 +08:00
Jason Lee
30f34dc780
Fix button icon color support ( #57 )
2024-07-23 13:45:34 +08:00
Jason Lee
652efd187c
Update list to save the task on the struct.
2024-07-23 10:51:11 +08:00
Jason Lee
80bdf20376
Export set_query and query method to List.
2024-07-23 10:15:38 +08:00
Jason Lee
8ff4658c96
Update Icon again, let new to support impl Into<Icon>.
2024-07-23 10:02:34 +08:00
Jason Lee
8609968ac2
Improve Icon::new to support impl Into<IconName>
2024-07-23 09:56:57 +08:00
Jason Lee
faa16fb660
Add ScrollView ( #56 )
2024-07-23 09:38:23 +08:00
Jason Lee
5034152f21
Improved Input prefix, suffix with a builder to support Element. ( #54 )
...
- Add loading to List query input and changed perform_search now return
a Task.
2024-07-22 15:30:07 +08:00
Jason Lee
4687a18ee4
Add to support Input history for undo & redo ( #53 )
...
https://github.com/user-attachments/assets/b898dc08-8e99-4247-8dc3-d5752d1bc2f3
Ref https://github.com/huacnlee/gpui-component/issues/27
2024-07-22 11:36:54 +08:00
Jason Lee
ca08be7038
Fix Popup modal mouse move crossed to back layer. ( #51 )
2024-07-20 02:39:27 +08:00
Jason Lee
e54d1f600b
Add to masked Label and support children to Button ( #50 )
...
https://github.com/user-attachments/assets/9583ce15-b801-45f9-aafb-54f0ecdf7dc9
- Add masked mode to Label.
- Add to support any children to Button.
- Fix Popover to support selected state style.
2024-07-19 18:54:16 +08:00
Jason Lee
a69d30be6a
Add cx.theme auto import to support WindowContent.
2024-07-19 11:32:25 +08:00
Jason Lee
613cfebb65
Improve ActiveTheme trait to impl ViewContent and ModelContext to support auto import. ( #49 )
2024-07-19 11:20:45 +08:00
Jason Lee
e95971624e
Fix windows build.
2024-07-18 23:29:22 +08:00
Floyd Wang
e4b9e008ba
Use cx.quit() instead of std::process::exit(0) ( #47 )
2024-07-18 19:02:39 +08:00
Floyd Wang
653222db73
dropdown: Use event instead of callback ( #46 )
...
* Rule: use event for `Render`, use callback for `RenderOnce`
2024-07-18 18:40:32 +08:00
Jason Lee
bac5392e0a
Refactor Slider, Input, InputOtp to use EventEmiter to emit change ( #45 )
2024-07-18 18:38:58 +08:00
Jason Lee
f6146220e4
Add WebView ( #2 )
...
- https://github.com/huacnlee/zed/pull/6
- https://github.com/zed-industries/zed/pull/13730
2024-07-18 18:00:23 +08:00
Floyd Wang
91e123e942
input: TextEvent Add Focus & Blur events
2024-07-18 17:48:57 +08:00
Floyd Wang
07a1f3099e
dropdown: Add on change callback
2024-07-18 16:50:30 +08:00
尹吉峰
4ccbe9bd71
Update Dropdown ( #42 )
2024-07-18 16:12:12 +08:00
Jason Lee
683b22c4a4
Fix Resizable drag move position. #28 ( #41 )
2024-07-18 00:02:59 +08:00
Jason Lee
0fdf7be40d
Fix table scrollbar display layer.
2024-07-17 23:19:03 +08:00
Jason Lee
b8a7d6a2dd
Change InputOpt default masked: false and publish masked method.
2024-07-17 18:57:19 +08:00
Jason Lee
c7336fd5ea
Add InputOtp ( #40 )
...
https://github.com/user-attachments/assets/c92da4e7-21de-436f-968d-7cb47fa31aed
2024-07-17 18:49:41 +08:00
Jason Lee
d71b697f41
Add Slider ( #39 )
...
https://github.com/user-attachments/assets/a1799cd9-45af-413c-b32b-c60fb1b8d586
2024-07-17 16:01:27 +08:00
Jason Lee
3aaa348fbb
Add label support to horizontal Divider.
2024-07-17 14:11:17 +08:00
Jason Lee
ac3d6760ed
Fix vertical Divider
2024-07-17 13:59:20 +08:00
Jason Lee
3467522714
Add double click to select word support for Input. ( #38 )
...
Continue #27
2024-07-17 11:41:04 +08:00
Jason Lee
36411750ee
Fix to limit change when Input is disabled.
...
Add clean button to List query input.
Add ButtonRouneded with px support.
2024-07-17 10:47:25 +08:00
Jason Lee
702863eb83
Add overflow scroll support to Input. ( #37 )
...
Continue #27
- Fix cut and paste invalid replace range.
- Add `Shift-Home`, `Shift-End` for select to home or end.
## Show case
https://github.com/user-attachments/assets/d99c56e3-5241-46e2-b3ac-f72ef962b0b5
2024-07-17 10:31:17 +08:00
Jason Lee
07e1296916
Add cleanable to Input ( #36 )
2024-07-16 19:44:16 +08:00
Jason Lee
ce7c1a3a34
Add Small, Large size support to Input and Dropdown and let them use same height. ( #35 )
...
- Add `Dropdown::string_list` to use `Vec<SharedString>` to create
dropdown for easy use.
- Add `input_px`, `input_py`, `input_h` trait methods to `Styled`
element.
2024-07-16 15:14:12 +08:00
Jason Lee
2b184ca8d5
New Scrollbar ( #33 )
...
https://github.com/user-attachments/assets/30d890bc-49cc-4abe-8652-387ddbb73198
2024-07-16 12:00:51 +08:00
Floyd Wang
b1bb22fd1d
Fix clippy warning
2024-07-15 11:42:14 +08:00
Jason Lee
59603ab83b
Add min_w, max_w to PopupMenu, and default min_w: 120, max_w: 500
2024-07-15 09:15:12 +08:00
Jason Lee
4ca98029dd
Fix placeholder style for Input ( #32 )
...
https://github.com/huacnlee/gpui-component/issues/27
2024-07-13 09:53:03 +08:00
Jason Lee
35cec4cf5c
Update to use better implementation of selection support for Input. ( #31 )
...
Co-authored-by: Conrad Irwin <conrad@zed.dev>
2024-07-13 09:40:42 +08:00
Jason Lee
41a83e6f6f
Improve Input ( #29 )
...
Continue #27
- Fix selection color in dark mode.
- Allow to continue selection, even mouse is out of the input.
- Pause cursor blinking when keep typing.
https://github.com/user-attachments/assets/ce9e722c-5c47-4daa-b2ba-cbe1680c4932
2024-07-13 00:34:55 +08:00
Jason Lee
0d6d1c95d0
Fix ProgressBar example to avoid over the range.
2024-07-12 23:27:37 +08:00
Jason Lee
21f0e1c78a
Add mouse selection support to Input ( #26 )
...
Done reset mouse support of
https://github.com/zed-industries/zed/pull/13534
https://github.com/user-attachments/assets/71b1d4e4-eef7-4746-8400-b2e3812e5ad4
2024-07-12 22:41:18 +08:00
Floyd Wang
138fc9c7b5
Progress use positioning layout
2024-07-12 18:25:09 +08:00
Jason Lee
7c99584862
Add Indicator ( #25 )
...
https://github.com/user-attachments/assets/cd6410ca-e1c7-459e-8455-d76506b6d305
2024-07-12 17:33:05 +08:00
Floyd Wang
58dbf88af7
Add Radio ( #24 )
2024-07-12 16:37:31 +08:00
Jason Lee
2401d5d5a4
Add ResizablePanel ( #22 )
...
https://github.com/user-attachments/assets/b4067c1d-0ef0-4de4-bd7a-55f446d35ff0
2024-07-12 15:24:54 +08:00
Jason Lee
9e935bed56
Change switch use mouse_down to handle event fix Windows switch theme support.
2024-07-11 21:52:07 +08:00
Floyd Wang
e1aed0a03d
Add Progress ( #21 )
2024-07-11 19:10:46 +08:00
Jason Lee
56eb7147d9
Add a batch of color methods. ( #20 )
...
https://ui.shadcn.com/colors#colors
2024-07-11 18:16:57 +08:00
Jason Lee
eb43c78cea
Add to support open Popover as a child window. ( #18 )
...
## Goal
Change to let Popup elements open into a window, to make sure the Popup
windows, panels, menus render top than the WebView.
Then we can embed wry or other webview into GPUI.
https://github.com/huacnlee/gpui-component/assets/5518/ce005456-088f-4298-bf5d-2642cf96faff
----
This is also like other software, they are also used in child window to
render the menus, popups.
- https://github.com/huacnlee/gpui-component/pull/2
- https://github.com/zed-industries/zed/pull/13730
## Todos
- [x] Multiple display window position.
- [x] Windows transparent background. (No transparent, just render a
correct window border)
- [x] Disable window resize on Windows.
- [ ] Handle Menu action.
- [x] Provided `popover` or `window` two mode to uses.
2024-07-11 16:20:26 +08:00
Floyd Wang
4d9077fe85
Rename ui::stock to ui::stack
2024-07-09 16:25:07 +08:00
Floyd Wang
75e4451764
Add text align property for Label ( #19 )
2024-07-09 15:56:41 +08:00
Jason Lee
310e5e3cde
Avoid PickerStory clone vec.
2024-07-08 23:22:08 +08:00
Floyd Wang
cab6dc9f6e
Update the drag split edge fraction
2024-07-08 16:46:54 +08:00
Floyd Wang
84de8a88a4
Fix resize dock not work
2024-07-08 11:19:20 +08:00
Jason Lee
a02c981b74
table: Fix incorrect column selection bg render.
2024-07-08 09:47:13 +08:00
Jason Lee
9b51a5b998
Remove picker, add list instead. ( #17 )
2024-07-07 02:07:17 +08:00
Jason Lee
3c52d5f428
Rename ScrollableHandleElement to ScrollableMask.
2024-07-06 22:31:51 +08:00
Jason Lee
ac789b2379
Add Table ( #16 )
...
https://github.com/huacnlee/gpui-component/assets/5518/8603cbcc-c416-4d10-84a0-8cfe2e021e1a
2024-07-06 21:01:16 +08:00
Jason Lee
6eb63dfd28
Removed Button shadow in Light mode for ghost style button.
2024-07-05 11:26:11 +08:00
Jason Lee
c925a6aa61
Add ButtonStyle::Outline, ButtonStyle::Glost
2024-07-05 00:18:36 +08:00
Jason Lee
acbc029eed
Add PopupMenu ( #15 )
...

2024-07-05 00:04:34 +08:00
Jason Lee
3ccadf6cc3
Improve focus ( #14 )
...
- Add `FocusableCycle` trait to help impl cycle focus.
- Add `outline` style to StyledExt.
2024-07-04 14:05:14 +08:00
Jason Lee
24348ec874
Fix TitleBar
2024-07-04 10:14:44 +08:00
Jason Lee
f78d50b5e9
Update dock layout
2024-07-04 01:05:32 +08:00
Jason Lee
19930e46db
Add SvgImg to render svg, and with a Chart example ( #13 )
...
https://github.com/huacnlee/gpui-component/assets/5518/576da9f9-4bff-4faf-a17e-19860cf6f948
2024-07-03 19:09:59 +08:00
Floyd Wang
b8ffa12a90
Fix typo
2024-07-03 16:56:41 +08:00
Jason Lee
537dbfab9e
Fix Input avoid copy, cut a empty into into clipboard.
2024-07-02 17:35:23 +08:00
Jason Lee
88dcca590d
Simple Tooltip usage.
2024-07-02 00:13:07 +08:00
Jason Lee
f2703122b8
Move title_bar, util into workspace.
2024-07-01 23:51:47 +08:00
Jason Lee
f84e8b82ef
Add prefix and suffix to Input. ( #12 )
...
<img width="393" alt="image"
src="https://github.com/huacnlee/gpui-component/assets/5518/5df8d269-ea04-4d42-95c5-a3358cdee9b5 ">
2024-07-01 23:30:06 +08:00
Jason Lee
cbbd20867f
Add Icon Button support. ( #11 )
...
When the Button have no label present, it will use the Icon mode.
<img width="891" alt="image"
src="https://github.com/huacnlee/gpui-component/assets/5518/ca6240d5-02c8-4201-9a79-4afdf9938dd8 ">
2024-07-01 21:32:03 +08:00
Jason Lee
f9e075113e
Update README
2024-07-01 15:46:11 +08:00
Jason Lee
502d4df135
Add Dock & Panel ( #10 )
...
https://github.com/huacnlee/gpui-component/assets/5518/51622a5e-f51d-4ede-8cae-04cae703f8aa
2024-07-01 14:20:56 +08:00
Jason Lee
d183bacc73
Add Scrollbar ( #9 )
...
https://github.com/huacnlee/gpui-component/assets/5518/5e4b7809-f2d0-4e45-a0f2-b9578323a11e
2024-06-30 23:31:16 +08:00
Jason Lee
29dc803014
Fix dropdown selected icon.
2024-06-30 19:17:52 +08:00
Jason Lee
6503e00b69
Fix dropdown height.
2024-06-30 19:04:53 +08:00
Jason Lee
586569f241
Add a List example ( #8 )
...
https://github.com/huacnlee/gpui-component/assets/5518/2554bb6c-94f6-4808-87d6-9a04d7421b26
2024-06-30 16:56:23 +08:00
Jason Lee
93779164f0
Rewrite Popover ( #7 )
...
https://github.com/huacnlee/gpui-app/assets/5518/dfe0ba05-ecb7-4604-a057-56daed53c16c
2024-06-29 23:49:59 +08:00
Jason Lee
329b116980
Use Element to paint DropdownMenu to fix layer priority.
2024-06-29 18:04:47 +08:00
Jason Lee
08fc62ada0
Fix Windows Title button hover, active color.
2024-06-29 16:17:34 +08:00
Jason Lee
2785f38eeb
Add to blinking currsor support for Input.
2024-06-29 15:38:02 +08:00
Jason Lee
ddadcda140
Improve Picker details.
2024-06-29 14:39:15 +08:00
Jason Lee
3288270b49
Add Popover ( #6 )
2024-06-29 10:03:59 +08:00
Jason Lee
a3c14e1515
Sync with system appearance.
2024-06-29 09:06:52 +08:00
Jason Lee
3e8421c495
Fix Icon default use theme foreground and allows to override.
2024-06-29 03:10:14 +08:00
Jason Lee
3c4891cb69
Add icon support to Button.
2024-06-29 02:37:22 +08:00
Floyd Wang
a5aea36f75
Add Tooltip ( #5 )
2024-06-28 18:03:28 +08:00
Floyd Wang
11901dc1e4
Add Notification ( #4 )
2024-06-28 14:08:06 +08:00
Jason Lee
5393580789
Update Dropdown icon to ChevronsUpDown
2024-06-28 10:19:24 +08:00
Jason Lee
e0050c5ebe
Fix light theme
2024-06-28 10:11:00 +08:00
Jason Lee
5d3f19bdd8
Fix Label text_size support.
2024-06-28 10:11:00 +08:00
Jason Lee
63076725f2
Add up, down, enter, esc keybinding for Dropdown.
2024-06-28 10:11:00 +08:00
Jason Lee
720672b0e2
Update Input, Button, Dropdown based on theme.radius
2024-06-28 10:11:00 +08:00
Jason Lee
1a54a47ec8
Update foreground color in dark mode.
2024-06-28 10:11:00 +08:00
Jason Lee
daf4e713d1
Fix ListItem check icon.
2024-06-28 10:11:00 +08:00
Jason Lee
cb8067d89b
Fix Checkbox story.
2024-06-28 10:11:00 +08:00
Jason Lee
1d1803f348
Fix Input keybinding on Windows.
2024-06-28 10:11:00 +08:00
Jason Lee
910f27a66a
Add Dropdown.
2024-06-28 10:11:00 +08:00
Jason Lee
5590416c4b
Improve Picker to have on_mouse_click_out to dissmis.
2024-06-27 19:33:24 +08:00
Jason Lee
f50d4b351c
Set default text_color for workspace.
2024-06-27 19:32:56 +08:00
Jason Lee
10564f5140
Update KeyBinding for Picker.
2024-06-27 18:20:24 +08:00
Jason Lee
8489a3f7f7
Fix Picker to search filter.
2024-06-27 18:07:08 +08:00
Jason Lee
659f00c9a4
New input ( #1 )
...

Ref: https://github.com/zed-industries/zed/pull/13534
2024-06-27 15:36:07 +08:00
Jason Lee
a90f51d165
Fix ui dependency
2024-06-27 10:34:03 +08:00
Jason Lee
b562708318
windows: Fix title bar font for Windows 10.
2024-06-26 19:06:54 +08:00
Jason Lee
672240d750
Fix picker_story to display selected value.
2024-06-26 19:01:52 +08:00
Jason Lee
085b8e578b
Add ListItem and update PickerStory base on it.
2024-06-26 18:31:50 +08:00
Jason Lee
7bbc28b98e
Add small size for Switch.
2024-06-26 18:12:47 +08:00
Jason Lee
d5f446a351
Add to support no appearance for TextField and fix invalid key handle.
2024-06-26 17:47:42 +08:00
Jason Lee
4c278bfabc
Add span method, fix primary button text color
2024-06-26 17:25:26 +08:00
Jason Lee
a4601782f8
Add keyboard support for Picker.
2024-06-26 16:20:21 +08:00
Jason Lee
5c93282e1d
Add Picker
2024-06-26 16:16:08 +08:00
Jason Lee
1f21469e7b
Split story into a crate.
2024-06-26 14:38:06 +08:00
Jason Lee
4945be5a36
Chnage TextField to impl Render
2024-06-26 13:43:28 +08:00
Jason Lee
e4fcd24382
Add label to Switch
2024-06-26 10:25:51 +08:00
Jason Lee
2f2203b45b
Add Switch.
2024-06-25 23:01:29 +08:00
Jason Lee
4ae4cd615b
Fix windows max, min, close icon.
2024-06-25 21:35:25 +08:00
Jason Lee
5e4a16b62d
Fix windows startup.
2024-06-25 21:28:08 +08:00
Jason Lee
08a99217a2
Add TabBar
2024-06-25 19:07:05 +08:00
Jason Lee
8440df938a
Add checkbox, title_bar.
2024-06-25 17:16:04 +08:00
Jason Lee
22674e84c4
Fix input focus border.
2024-06-24 19:26:36 +08:00
Jason Lee
5c1f71a176
Add border to button
2024-06-24 19:14:11 +08:00
Jason Lee
3a745d2abe
Add invert method to Hsla.
2024-06-24 19:01:11 +08:00
Jason Lee
dad6f4c431
Update input new method
2024-06-24 17:39:56 +08:00
Jason Lee
94cb714ebf
Update to use shadcn ui theme
2024-06-24 15:39:26 +08:00
Jason Lee
11af9900eb
Fix stories switch.
2024-06-24 14:27:07 +08:00
Jason Lee
b70f5d6dc7
Add cursor_layout
2024-06-24 11:21:30 +08:00
Jason Lee
ae5e4f6149
Update input
2024-06-22 21:47:04 +08:00
Jason Lee
ae8c0ab657
Update input
2024-06-22 17:42:42 +08:00
Jason Lee
b503d5f7e3
Add input
2024-06-14 19:47:03 +08:00
Jason Lee
537edcae99
Add input
2024-06-14 10:20:29 +08:00
Jason Lee
0d1b1aa784
Add more example for buttons.
2024-06-13 22:12:10 +08:00
Jason Lee
9ffea5798e
First commit, with Button UI.
2024-06-13 21:46:28 +08:00