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
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
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