Commit graph

505 commits

Author SHA1 Message Date
Héctor Ramón Jiménez
10d6df73e3 Remove max_width and max_height from image::Viewer
The support for these layout constraints is currently not ideal. We
should reintroduce these methods once our layout engine improves.
2020-12-18 11:35:01 +01:00
Héctor Ramón Jiménez
c54a6446a3 Use intra-doc links in image::viewer 2020-12-18 11:35:01 +01:00
Héctor Ramón Jiménez
6a51282933 Simplify cursor_to_center in image::Viewer 2020-12-18 11:34:52 +01:00
Héctor Ramón Jiménez
149098cb68 Remove use of unwrap in image::Viewer 2020-12-18 11:20:48 +01:00
Héctor Ramón Jiménez
43ef85ae5c Rename starting_cursor_pos to cursor_grabbed_at in image::Viewer 2020-12-18 11:20:18 +01:00
Héctor Ramón Jiménez
8245a11766 Negate values instead of multipling by -1.0 in image::Viewer 2020-12-18 11:01:20 +01:00
Héctor Ramón Jiménez
4eb5779542 Remove redundant f32 conversions in image::Viewer 2020-12-18 11:00:32 +01:00
Héctor Ramón Jiménez
64af860ad2 Remove unnecessary Option in image::viewer::State 2020-12-18 10:55:18 +01:00
Héctor Ramón Jiménez
e6f23e3771 Rename scale_pct to scale_step in image::Viewer 2020-12-18 10:53:38 +01:00
Héctor Ramón Jiménez
ca3e4e9f1b Simplify pattern match in image::Viewer::on_event 2020-12-18 10:49:10 +01:00
Héctor Ramón Jiménez
add167d6a0 Pan image::Viewer even if the cursor is out of bounds 2020-12-18 10:47:29 +01:00
Héctor Ramón Jiménez
21b10dc103 Fix layout of image::Viewer 2020-12-18 10:44:24 +01:00
Héctor Ramón Jiménez
71de341684 Turn methods into helper functions in image::viewer 2020-12-18 10:24:04 +01:00
Héctor Ramón Jiménez
0b73e5fbfa Merge remote-tracking branch 'tarkah/image-pane' into image-pane 2020-12-18 10:15:30 +01:00
Héctor Ramón Jiménez
70164f68a6 Fix text selection with touch events in TextInput 2020-12-15 06:48:12 +01:00
Héctor Ramón Jiménez
3bdf931925 Turn Touch into a touch::Event enum 2020-12-15 06:38:46 +01:00
Héctor Ramón Jiménez
09110a93b0 Merge branch 'ios-support-wip' into feature/touch-support 2020-12-15 06:13:19 +01:00
Héctor Ramón Jiménez
f78108a514 Bump versions 🎉 2020-11-26 16:47:41 +01:00
Héctor Ramón Jiménez
745aa49025 Update example links to point to 0.2 branch 2020-11-26 16:37:33 +01:00
Héctor Ramón Jiménez
7de72d6a27 Update READMEs of subcrates 2020-11-26 07:40:00 +01:00
Héctor Ramón Jiménez
11798dcc03 Update graphs in crate docs 2020-11-26 07:22:03 +01:00
Héctor Ramón Jiménez
01322f69a4 Use recently stabilized intra-doc links
See RFC: https://github.com/rust-lang/rfcs/blob/master/text/1946-intra-rustdoc-links.md
2020-11-26 02:05:43 +01:00
Héctor Ramón Jiménez
d612bf5678 Rename keyboard::ModifiersState to Modifiers 2020-11-26 02:05:42 +01:00
Héctor Ramón Jiménez
08e0b9ffbd Fix broken links in API documentation 2020-11-26 01:59:20 +01:00
Héctor Ramón Jiménez
1d23db1866 Track keyboard modifiers in text_input 2020-11-25 04:10:23 +01:00
Zak
d275a4ed32 This PR fixes a bug with select all (CMD + A on MacOS) when using a text_input.
Previous behaviour: when selecting all (CMD + A) would delete the current text inside the input and replace the content with just the letter 'a'.

Now we check if the logo key (modifier key) has been pressed before checking any other key and save it to the state level. This way we can prevent any text being deleted when using the select all shortcut or text being entered at all when a modifier key is pressed (this behaviour matches other text input behaviour i.e text inputs in the browser etc...).
2020-11-25 03:57:18 +01:00
Héctor Ramón Jiménez
140bea352e Disable dragging in TextInput after double click
When using a trackpad, mouse move events may happen between the
press/release events. This was incorrectly triggering selection dragging in
the `TextInput` widget.

Eventually, we should implement proper word-aware selection dragging.
2020-11-19 02:45:47 +01:00
Héctor Ramón Jiménez
c03d46719e Remove Focus in pane_grid
Since #608, the `PaneGrid` widget does not handle pane focus.
2020-11-17 06:13:56 +01:00
Héctor Ramón Jiménez
df712f9ccf Implement flexible TextInput::draw helper 2020-11-17 05:13:06 +01:00
Héctor Ramón Jiménez
bf2d2561b8 Batch event processing in UserInterface::update 2020-11-12 02:51:26 +01:00
Héctor Ramón Jiménez
69c50c8511 Introduce event::Status to Subscription 2020-11-12 02:22:22 +01:00
Héctor Ramón Jiménez
33d80b5a0b Return event::Status in UserInterface::update 2020-11-12 02:00:08 +01:00
Héctor Ramón Jiménez
6e9bd0d9d1 Make Overlay::on_event return event::Status 2020-11-12 01:29:11 +01:00
Héctor Ramón Jiménez
bf6c65b5ad Implement event capturing for TextInput 2020-11-12 01:11:09 +01:00
Héctor Ramón Jiménez
c361fe48c7 Implement event capturing for Slider 2020-11-12 00:56:50 +01:00
Héctor Ramón Jiménez
fd275a2fee Implement event capturing for Scrollable 2020-11-12 00:53:39 +01:00
Héctor Ramón Jiménez
451bf8dc84 Implement event capturing for Row 2020-11-12 00:48:40 +01:00
Héctor Ramón Jiménez
18172f80c9 Implement event capturing for Radio 2020-11-12 00:47:58 +01:00
Héctor Ramón Jiménez
7ff95f3a88 Implement event capturing for PickList 2020-11-12 00:47:21 +01:00
Héctor Ramón Jiménez
31c509b206 Implement event capturing for PaneGrid 2020-11-12 00:40:55 +01:00
Héctor Ramón Jiménez
3bcee62beb Implement event capturing for Column 2020-11-12 00:40:52 +01:00
Héctor Ramón Jiménez
04468a7147 Implement event capturing for Checkbox 2020-11-12 00:20:09 +01:00
Héctor Ramón Jiménez
a44cd07212 Implement event capturing for Button 2020-11-12 00:19:12 +01:00
Héctor Ramón Jiménez
3f968b8c87 Make Widget::on_event return an event::Status 2020-11-12 00:09:52 +01:00
Héctor Ramón Jiménez
1db11ba69a Introduce event::Status in iced_native 2020-11-11 23:54:59 +01:00
Héctor Ramón Jiménez
3b2ed0d6f0 Remove unnecessary move in PaneGrid::new 2020-11-10 03:18:46 +01:00
Héctor Ramón Jiménez
d6d5cf0294 Restore hotkeys in pane_grid example
- Implement `subscription::events_with`
- Remove `pane_grid::KeyPressEvent`
- Return closest sibling in `pane_grid::State::close`
2020-11-10 02:32:57 +01:00
Héctor Ramón Jiménez
c53022e8df Fix typo in documentation of pane_grid::Content 2020-11-10 01:51:27 +01:00
Héctor Ramón Jiménez
8008ea5286 Introduce on_click handler in PaneGrid 2020-11-10 01:48:11 +01:00
Héctor Ramón Jiménez
5681c83d3c Remove focus concept from pane_grid 2020-11-10 01:38:27 +01:00