Commit graph

43 commits

Author SHA1 Message Date
Héctor Ramón Jiménez
4320ae6329
Use f32 instead of i32 for lengths
This allows users to use logical coordinates instead of physical ones.
2023-02-28 03:39:31 +01:00
Hojjat
2442422762 Add justification buttons to editor-libcosmic 2023-02-22 21:59:03 -07:00
Jeremy Soller
8cc988d374 Run cargo fmt 2023-01-04 20:03:03 -07:00
Jeremy Soller
ee54e7626b
Vi-style editor and other editor improvements (#40)
* WIP VI wrapper for editor

* WIP: block cursor

* Create Edit trait, run CI on all feature options

* Add prints describing build steps to ci.sh

* Custom rendering for Vi editor

* Clippy fixes

* More clippy fixes

* Show clippy results in CI

* Fix for Redox

* Fix clippy lint

* Add vi feature to enable vi-style editor

* Add escape to libcosmic text box
2022-11-15 12:26:59 -07:00
Hojjat
b253800383
Add Padding to the TextBox (#36)
* WIP: initial text-margin support

* Fix the selection issue when clicking the margins

* Move the margin size into the main

* using padding, consistent with iced text_input

* Added top and bottom margin

* bugfix: selection starting from the top margin works

* bugfix: left half of first glyph was being ignored
2022-11-10 11:55:12 -07:00
Jeremy Soller
ecf61a93b1
Update to use cosmic::theme::Theme 2022-11-09 08:03:13 -07:00
tarkah
06cb0c2637 Refactor to text::draw_pixel helper 2022-11-04 09:11:57 -06:00
tarkah
9e389b629b Resolve size using limits 2022-11-01 16:06:50 -06:00
Jeremy Soller
8efebfcd07
iced TextBox improvements 2022-11-01 09:09:36 -06:00
Jeremy Soller
a13fd9c591
Improve docs 2022-10-31 11:36:54 -06:00
Jeremy Soller
92cad6fe13
Decouple editing from buffer 2022-10-31 11:24:36 -06:00
Jeremy Soller
c247bbdad2 Move cache to text box state 2022-10-27 20:31:05 -06:00
Jeremy Soller
bd327e4a21
Add text color to TextBox, fix resizing 2022-10-27 18:28:52 -06:00
Jeremy Soller
a4a4eb7783
Fix rgba ordering 2022-10-27 18:16:42 -06:00
Jeremy Soller
cb7ec05d76
Improve Text widget 2022-10-27 17:40:01 -06:00
Jeremy Soller
c90dc58fef
Store text_box pixels in widget state 2022-10-27 15:17:52 -06:00
Jeremy Soller
5d38951338
Merge libcosmic examples - iced fork supports pixel perfect images 2022-10-27 15:06:00 -06:00
Jeremy Soller
e4c8d4ba6b
Make attribute spans use ranges and update docs 2022-10-27 09:56:53 -06:00
Jeremy Soller
3ece9236b3
Use Color in more places 2022-10-27 09:07:47 -06:00
Jeremy Soller
119a570ee9
Cache font matches, use usize for line index, use font system for swash 2022-10-26 12:23:03 -06:00
Jeremy Soller
e53956cb2d Fix scrolling with cursor 2022-10-25 20:49:15 -06:00
Jeremy Soller
330a736136
Add function to get layout runs 2022-10-25 11:40:10 -06:00
Jeremy Soller
564dab009c Relicense MIT OR Apache 2.0 2022-10-24 12:58:15 -06:00
Jeremy Soller
9b2bfbf3cb
Fix UDHR test and libcosmic compilation 2022-10-21 12:40:29 -06:00
Jeremy Soller
50dfd4e6ed
Performance improvements 2022-10-21 12:31:02 -06:00
Jeremy Soller
65f60d1565
Log font families again 2022-10-19 13:29:50 -06:00
Jeremy Soller
edc0631df6
Fix control character usage 2022-10-19 11:33:35 -06:00
Jeremy Soller
c29eed3a94
Implement Home/End 2022-10-19 11:08:15 -06:00
Jeremy Soller
190b41f387
Add selection 2022-10-19 10:12:52 -06:00
Jeremy Soller
e20552ad13
Improvements for cursor 2022-10-19 09:26:43 -06:00
Jeremy Soller
405c77bb47
More documentation 2022-10-19 08:34:34 -06:00
Jeremy Soller
fa00813c0b
Remove Arc wrapper for text buffer when using iced 2022-10-19 08:05:22 -06:00
Jeremy Soller
021782b92b
Move drawing and hit detection to buffer 2022-10-19 07:36:27 -06:00
Jeremy Soller
a242d817e9
Add documentation and improve API 2022-10-18 17:14:03 -06:00
Jeremy Soller
de572b1645
New TextMetrics type 2022-10-18 17:14:03 -06:00
Jeremy Soller
fa8ed07dab Improve scrolling on touchpads 2022-10-18 15:06:13 -06:00
Jeremy Soller
e62f8b9292
Appearance for iced text box 2022-10-18 14:35:16 -06:00
Jeremy Soller
38a4f7a09a
Add mouse scroll for iced example 2022-10-18 13:27:58 -06:00
Jeremy Soller
2f6a9d33d1
Move all scroll handling to buffer 2022-10-18 13:20:13 -06:00
Jeremy Soller
a21225c9a0
Use mutex for TextBuffer state 2022-10-18 13:12:25 -06:00
Jeremy Soller
a599d83ca0
Scroll on cursor movement 2022-10-18 13:05:36 -06:00
Jeremy Soller
3e04ffdfa4
Handle scroll in TextBuffer 2022-10-18 12:42:37 -06:00
Jeremy Soller
410d4ee674
Text library moved from libcosmic 2022-10-18 12:07:22 -06:00