Commit graph

824 commits

Author SHA1 Message Date
Héctor Ramón
59ef7f074c
Merge pull request #46 from memoryruins/from-array
impl From<Array> for Color
2019-11-07 17:44:27 +01:00
memoryruins
e7bd24c13e use Color's From impl in more places 2019-11-07 01:03:29 -05:00
Héctor Ramón Jiménez
79f31b66c3 Increase initial size of text cache in iced_wgpu
This reduces the amount of cache updates in general when text changes.

The new cache should take 4MB of VRAM. I think this is reasonable for a
modern GUI toolkit. In any case, we should be able to reduce this value in the
future.
2019-11-07 06:59:27 +01:00
Héctor Ramón Jiménez
5fd0c724b2 Align text position to pixel grid in iced_wgpu
This avoids re-rasterizing glyphs and cache reuploads when the HiDPI factor is
nonintegral.
2019-11-07 06:51:42 +01:00
Héctor Ramón Jiménez
8dc4bd5a1d Update wgpu to 0.4 in iced_wgpu 2019-11-07 02:38:34 +01:00
Héctor Ramón Jiménez
904818ccb0 Floor layer coords to avoid excessive clipping 2019-11-07 02:05:11 +01:00
Héctor Ramón Jiménez
8074bca8a0 Fix integer overflow with nested clip primitives 2019-11-06 21:34:57 +01:00
Héctor Ramón Jiménez
6216f197e9 Fix panic in Transformation::scale 2019-11-06 19:35:28 +01:00
Héctor Ramón Jiménez
2026048053 Remove hardcoded HiDPI scaling 2019-11-06 02:47:01 +01:00
Matthias Fauconneau
1e021fd034 Fix Tour for HiDPI (stub) 2019-11-06 02:43:38 +01:00
Héctor Ramón Jiménez
96acb74bda Fix checkbox border radius 2019-11-05 20:43:09 +01:00
Héctor Ramón Jiménez
5ff05b7f02 Apply HiDPI scaling to quads
The anti-aliasing strategy is pretty naive, but we will manage for now.
2019-11-05 20:40:17 +01:00
Héctor Ramón Jiménez
db716b3bdf Apply HiDPI to text, images, and clip primitives
Quads are a bit trickier to handle. We may need to change the shaders a
bit.
2019-11-05 05:26:20 +01:00
Héctor Ramón Jiménez
0157121038 Improve default font loading 2019-11-05 03:57:13 +01:00
Héctor Ramón Jiménez
40e9a2f6ae Use new Layer in draw_overlay 2019-11-05 03:49:10 +01:00
Héctor Ramón Jiménez
b68ac3aa47 Merge branch 'master' into feature/performance-metrics 2019-11-05 03:43:54 +01:00
Héctor Ramón Jiménez
a2161586da Implement state-less scrolling in TextInput 2019-11-05 03:33:24 +01:00
Héctor Ramón Jiménez
470266f540 Add horizontal offset to Primitive::Clip 2019-11-05 03:16:46 +01:00
Héctor Ramón Jiménez
81cfb863ab Use SystemSource instead of FontconfigSource 2019-11-03 05:16:27 +01:00
Héctor Ramón Jiménez
2c6bfdbc8c Implement debug view and load system fonts 2019-11-03 04:39:11 +01:00
Héctor Ramón Jiménez
ef056d8489 Move Target to its own module 2019-11-02 20:20:35 +01:00
Héctor Ramón Jiménez
58e04af824 Draft Metrics and improve Target abstraction 2019-11-02 19:58:49 +01:00
Héctor Ramón Jiménez
1242b334fe Merge branch 'feature/scrollables' into feature/text-input 2019-11-02 01:50:29 +01:00
Héctor Ramón Jiménez
58d04cadef Add scrollable section to tour 2019-11-02 01:42:51 +01:00
Héctor Ramón Jiménez
8a0a31c513 Fix text measurement (needs further testing) 2019-11-02 01:14:07 +01:00
Héctor Ramón Jiménez
d3cdee1d9b Render TextInput cursor inside the clipping area 2019-10-31 04:43:53 +01:00
Héctor Ramón Jiménez
51a0e99097 Implement cursor movement in TextInput 2019-10-31 03:50:40 +01:00
Héctor Ramón Jiménez
374b54c3ec Merge branch 'feature/scrollables' into feature/text-input 2019-10-31 02:14:14 +01:00
Héctor Ramón Jiménez
298c42ac5f Replace nalgebra with glam
`glam` compiles much faster and leverages SIMD nicely.
2019-10-31 01:41:04 +01:00
Héctor Ramón Jiménez
43f348dc4a Show text cursor in TextInput 2019-10-30 05:20:41 +01:00
Héctor Ramón Jiménez
fedcab6f4f Handle some TextInput events 2019-10-30 05:00:12 +01:00
Héctor Ramón Jiménez
63cd0fd8eb Draft TextInput widget structure
Also started a `todos` example to showcase it!
2019-10-30 03:31:07 +01:00
Héctor Ramón Jiménez
85916c9e87 Rename Primitive::Scrollable to Clip 2019-10-29 19:50:34 +01:00
Héctor Ramón Jiménez
ace4217b22 Fix Transformation docs 2019-10-29 19:45:47 +01:00
Héctor Ramón Jiménez
29588f604a Implement scrollbar interactions! 🎉 2019-10-29 05:09:54 +01:00
Héctor Ramón Jiménez
a3c55f7517 Stop leaking impl details in scrollable Renderer 2019-10-29 02:13:22 +01:00
Héctor Ramón Jiménez
be488ac738 Draw scrollbar on top of scrollable content 2019-10-29 02:00:17 +01:00
Héctor Ramón Jiménez
23ebfb707a Issue draw calls only when necessary 2019-10-29 01:21:28 +01:00
Héctor Ramón Jiménez
2b23e0986c Implement text clipping (caching still broken) 2019-10-28 04:28:21 +01:00
Héctor Ramón Jiménez
35e94f5a32 Draft text scrolling (no clipping yet!) 2019-10-27 03:11:54 +01:00
Héctor Ramón Jiménez
21eb2f692c Implement clipping for quads 2019-10-27 03:10:49 +01:00
Héctor Ramón Jiménez
e2668b882a Remove adapter from iced_wgpu::Renderer 2019-10-27 02:30:19 +01:00
Héctor Ramón Jiménez
0a0aa3edd9 Implement clipping for images 2019-10-27 02:29:23 +01:00
Héctor Ramón Jiménez
09bd2c46c0 Expose scrollable offset properly 2019-10-27 01:24:08 +02:00
Héctor Ramón Jiménez
719c073fc6 Draft Scrollable widget (no clipping yet!) 2019-10-25 03:47:34 +02:00
Héctor Ramón Jiménez
2f8e9dbe59 Remove warnings in wgpu::image 2019-10-23 02:34:30 +02:00
Héctor Ramón Jiménez
871eb41430 Add TODO to image::Renderer::node 2019-10-23 01:34:58 +02:00
Héctor Ramón Jiménez
38b6c84e77 Implement basic image rendering in iced_wgpu 2019-10-23 01:21:23 +02:00
Héctor Ramón Jiménez
f8a232c8af Remove generic handle in Image
For now, we will simply assume images will be loaded from a given path.
2019-10-22 23:20:24 +02:00
Héctor Ramón Jiménez
523736f08b Fix wgpu_glyph dependency in iced_wgpu 2019-10-13 18:57:34 +02:00