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