Commit graph

5622 commits

Author SHA1 Message Date
Héctor Ramón Jiménez
dcc184b01b
Replace event::Status in Widget::on_event with Shell::capture_event 2024-11-05 23:52:58 +01:00
Héctor Ramón Jiménez
752403d70c
Split Shell::request_redraw into two different methods 2024-11-05 23:52:58 +01:00
Héctor Ramón Jiménez
7fbc195b11
Implement reactive-rendering for scrollable 2024-11-05 23:52:57 +01:00
Héctor Ramón Jiménez
908af3fed7
Implement reactive-rendering for menu 2024-11-05 23:52:57 +01:00
Héctor Ramón Jiménez
fdf046daff
Implement reactive-rendering for pick_list 2024-11-05 23:52:57 +01:00
Héctor Ramón Jiménez
7908b6eba9
Request a redraw when a window is resized
If we do not request it, macOS does not get any
`RedrawRequested` events. Shouldn't `winit`
[take care of this]? Probably a bug.

[take care of this]: https://docs.rs/winit/0.30.5/winit/event/enum.WindowEvent.html#variant.RedrawRequested
2024-11-05 23:52:57 +01:00
Héctor Ramón Jiménez
46017c6483
Implement reactive-rendering for toggler 2024-11-05 23:52:57 +01:00
Héctor Ramón Jiménez
0c77702187
Implement reactive-rendering for radio 2024-11-05 23:52:57 +01:00
Héctor Ramón Jiménez
f6c322f2f9
Implement reactive-rendering for checkbox 2024-11-05 23:52:57 +01:00
Héctor Ramón Jiménez
0691e617f3
Fix WindowManager::is_idle in iced_winit 2024-11-05 23:52:57 +01:00
Héctor Ramón Jiménez
52490397d6
Implement reactive-rendering for text_input
... and fix the redraw queue logic in `iced_winit`.
2024-11-05 23:52:56 +01:00
Héctor Ramón Jiménez
3ba7c71e3f
Implement reactive-rendering for slider 2024-11-05 23:52:56 +01:00
Héctor Ramón Jiménez
97bcca0400
Remove TODO about reactive rendering in iced_winit 2024-11-05 23:52:56 +01:00
Héctor Ramón Jiménez
5c33ce18ed
Draft reactive-rendering feature for button 2024-11-05 23:52:56 +01:00
Héctor
42a2cb6d4f
Merge pull request #2663 from iced-rs/update-wgpu-to-23.0
Update `wgpu` to `23.0`
2024-11-05 13:47:14 +01:00
Héctor Ramón Jiménez
ebc4e17ba8
Update wgpu to 23.0 2024-11-05 13:32:14 +01:00
Héctor
50340b4b43
Merge pull request #2651 from rhogenson/total-cmp
Use float total_cmp instead of partial_cmp to get a total order.
2024-10-28 17:38:54 +01:00
Rose Hogenson
f3733a811b Use float total_cmp instead of partial_cmp to get a total order.
Since Rust version 1.81, sort_by will panic if the provided comparison
function does not implement a total order.
See https://github.com/rust/lang/rust/issues/129561 for more details.
The simplest fix seems to be to use total_cmp instead of partial_cmp.
2024-10-26 09:28:20 -07:00
Héctor
d660fad33d
Merge pull request #2649 from kosayoda/window-focus-fix
Prevent unintended keyboard input during focus.
2024-10-25 14:41:40 +02:00
kosayoda
6ed88f7608 Prevent unintended keyboard input during focus. 2024-10-24 16:12:18 -04:00
Héctor
17b35df160
Merge pull request #2628 from tarkah/fix/pane-grid-continuity
Fix/pane grid continuity
2024-10-24 15:04:23 +02:00
Héctor Ramón Jiménez
d08bc6e45d
Add relabel helper to pane_grid::State 2024-10-24 14:17:38 +02:00
Héctor Ramón Jiménez
55504ffcd4
Rename state::Widget to pane_grid::Memory 2024-10-24 13:55:04 +02:00
Héctor Ramón Jiménez
089e629f41
Fix responsive diffing when Tree is emptied by ancestors 2024-10-24 13:48:42 +02:00
Héctor Ramón Jiménez
659669dd58
Remove duplicated maximized state in pane_grid 2024-10-24 13:48:34 +02:00
Cory Forsstrom
5ebd8ac83f
Keep Pane associated to state / layout after swap
State continuity is dependent on keeping a node associated
to it's original `Pane` id. When splitting -> swapping
nodes, we need to assign it back to the original `Pane`
to enforce continuity.
2024-10-24 13:05:42 +02:00
Cory Forsstrom
9ac3318357
Retain widget state against incoming panes
We can associate each state with a `Pane` and compare
that against the new panes to remove states w/ respective
panes which no longer exist.

Because we always increment `Pane`, new states are always
added to the end, so this retain + add new state approach
will ensure continuity when panes are added & removed
2024-10-24 13:05:42 +02:00
Cory Forsstrom
415fd4f643
Use BTreeMap for Ord iteration of panes
This ensures continuity in how panes are iterated on
when building widget state
2024-10-24 13:05:42 +02:00
Héctor Ramón Jiménez
f4d03870dd
Dismiss large-enum-variant lint 2024-10-22 03:01:24 +02:00
Kevin Day
ad34f03df4 Modified clock example to make the clock more readable. Added numbers on the clock face and took the portion of the hour passed into consideration for the hour hand. It now looks like a reasonable clock. 2024-10-19 16:12:38 +10:00
Michelle Granat
ab2adb11be
Update button Catalog and Style documentation (#2590)
* Update button Catalog and Style documentation

* Clarified button documentation

* fix code typo

* Run `cargo fmt`

* Fixed docs to pass tests

---------

Co-authored-by: Héctor Ramón Jiménez <hector@hecrj.dev>
2024-10-17 04:29:31 +00:00
Héctor Ramón Jiménez
4e0a63091c
Fix new elided lifetime lint in the beta toolchain 2024-10-17 06:14:30 +02:00
Héctor
f19bb02c6e
Merge pull request #2639 from l-const/consecutive-click-distance
Introduce consecutive click distance check like other toolkit do such as gtk,qt, imgui.
2024-10-15 05:31:12 +02:00
l-const
6c5799e759
Introduce consecutive click distance like other toolkits such as gtk,qt, imgui. 2024-10-14 23:01:07 +03:00
Héctor
c01ef5bdbb
Merge pull request #2632 from leo030303/fix_delete_key_bug
Fixed bug where delete key wasn't working in the text editor
2024-10-14 21:16:42 +02:00
Héctor
5d8fc922c8
Merge pull request #2637 from Brady-Simon/style-partialeq
Add PartialEq derives for widget styles
2024-10-14 21:09:16 +02:00
Leo Ring
da1331169c
Fix Binding::Delete not triggering in text_editor 2024-10-14 21:07:08 +02:00
BradySimon
f912d26d64
Add PartialEq derives for widget styles 2024-10-14 20:59:32 +02:00
bbb651
dd08f98f0e Add window::Settings::fullscreen
Corresponds to `winit:🪟:WindowAttributes::with_fullscreen`.

Currently only allows to set `Fullscreen::Borderless(None)` meaning
borderless on the current monitor, exclusive fullscreen does not
make sense for a GUI and iced does not expose monitors yet.
2024-10-04 21:20:43 +03:00
bbb651
13c649881e Add window::Settings::maximized
Corresponds to `winit:🪟:WindowAttributes::with_maximized`
2024-10-04 21:14:06 +03:00
Héctor Ramón Jiménez
c217500a5a
Fix mouse::Cursor fighting in stack widget 2024-10-04 17:33:38 +02:00
Héctor Ramón Jiménez
d057b16153
Fix responsive, component, and lazy always returning an overlay 2024-10-04 17:13:44 +02:00
Héctor Ramón Jiménez
fca5d8038a
Implement Overlay::operate for responsive::Overlay 2024-10-04 16:58:05 +02:00
Héctor Ramón Jiménez
89c6654810
Fix Task::chain when chained task is Task::none 2024-10-04 16:48:46 +02:00
Héctor
bc215f6077
Merge pull request #2623 from boondocklabs/markdown-lifetime
Change lifetime of markdown IntoIterator Item, as it does not need to live as long as the returned Element
2024-10-02 18:08:11 +02:00
Héctor
4a080e27ab
Merge pull request #2606 from tvolk131/qr_code_fixed_size
feat: set total size of QRCode
2024-10-02 17:23:33 +02:00
Héctor
d5f278b31d
Merge pull request #2611 from tarkah/fix/ignore-out-of-viewport-text
Don't fill out of viewport text
2024-10-02 17:21:22 +02:00
Héctor Ramón Jiménez
b02ec8b6b2
Make cell_size and total_size generic over Pixels in qr_code 2024-10-02 17:14:03 +02:00
Héctor Ramón Jiménez
a1e2bd22ec
Simplify total size logic in qr_code example 2024-10-02 17:14:00 +02:00
Héctor
5ee82b2ef0
Merge pull request #2608 from ibaryshnikov/haskell
added physical_key to KeyReleased event
2024-10-02 17:02:13 +02:00