Commit graph

451 commits

Author SHA1 Message Date
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)
![2024-11-03 11 36
16](https://github.com/user-attachments/assets/4879d5dd-e337-41a5-9411-d64c06166b3c)

---------

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

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

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

![2024-10-21 20 27
00](https://github.com/user-attachments/assets/599ef72d-3ec8-4fe5-a26c-10263044db6f)
2024-10-21 20:01:49 +08:00
Jason Lee
38fc226c22 title_bar: Export TitleBarElement. (#369) 2024-10-21 19:23:20 +08:00
Jason Lee
2aaf424df9
title_bar: Fix move window support for Linux. (#368) 2024-10-21 15:23:36 +08:00
Jason Lee
2c979c32c5
linux: Fix #104 Linux platform crash with BorrowMutError. (#367)
![Screenshot from 2024-10-19
01-20-24](https://github.com/user-attachments/assets/cc0d2250-38ae-4381-a06c-c64ec309ee4c)
2024-10-19 01:21:31 +08:00
Jason Lee
6ea9e69b98
script: Fix install script on Ubuntu. (#366) 2024-10-18 23:14:55 +08:00
xda
8dbf1dd5d5
Add the Preset Ranges and add border for today (#365)
Preset Ranges have been added. The “Today” border has also been added.


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

---------

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

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

---------

Co-authored-by: Julien Leclercq <julien-leclercq@users.noreply.github.com>
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2024-10-18 10:03:32 +08:00
Jason Lee
f35db249a6
theme: Update GPUI and imporve dark color. (#358)
## Before

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

## After 

<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/da393ea9-79ee-4535-a46d-68684d7ad738">
2024-10-17 19:14:42 +08:00
Jason Lee
6b54396c9c
title_bar: Fix TitleBar prefix padding when is zoomed and support double click to toggle zoom. (#357) 2024-10-17 18:22:32 +08:00
xda
913775c632
resizable: Fix the bug for parent groups when initializing Panels with sizes Some and None (#356)
Optimization of https://github.com/longbridgeapp/gpui-component/pull/329

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

---------

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

## Example

<img width="1472" alt="image"
src="https://github.com/user-attachments/assets/3a05f58c-2720-436c-8df9-c582871d87d5">
<img width="1472" alt="image"
src="https://github.com/user-attachments/assets/5b8db494-1402-4785-8d98-a87173b15284">
<img width="1472" alt="image"
src="https://github.com/user-attachments/assets/0305c05b-c2fb-4fea-9a50-5aa00de504fe">
<img width="1472" alt="image"
src="https://github.com/user-attachments/assets/91fbb7b6-7494-440d-95bf-2de37d6bbb44">
2024-10-16 18:38:21 +08:00
Jason Lee
41c64e2912
chore: Update controls detail. (#352)
- Better icon style in Input, Dropdown, DatePicker.
2024-10-16 17:51:39 +08:00
Floyd Wang
000c0bec57
dropdown: Add set_disabled for &mut self (#351) 2024-10-16 17:33:46 +08:00