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
This commit is contained in:
parent
271ca5cf7a
commit
ee54e7626b
33 changed files with 982 additions and 616 deletions
|
|
@ -12,7 +12,7 @@ use crate::{CacheKey, Color, FontSystem};
|
|||
|
||||
pub use swash::scale::image::{Content as SwashContent, Image as SwashImage};
|
||||
|
||||
fn swash_image<'a>(font_system: &'a FontSystem, context: &mut ScaleContext, cache_key: CacheKey) -> Option<SwashImage> {
|
||||
fn swash_image(font_system: &FontSystem, context: &mut ScaleContext, cache_key: CacheKey) -> Option<SwashImage> {
|
||||
let font = match font_system.get_font(cache_key.font_id) {
|
||||
Some(some) => some,
|
||||
None => {
|
||||
|
|
@ -61,7 +61,7 @@ impl<'a> SwashCache<'a> {
|
|||
/// Create a new swash cache
|
||||
pub fn new(font_system: &'a FontSystem) -> Self {
|
||||
Self {
|
||||
font_system: font_system,
|
||||
font_system,
|
||||
context: ScaleContext::new(),
|
||||
image_cache: Map::new()
|
||||
}
|
||||
|
|
@ -101,7 +101,7 @@ impl<'a> SwashCache<'a> {
|
|||
y + off_y,
|
||||
Color(
|
||||
((image.data[i] as u32) << 24) |
|
||||
base.0 & 0xFFFFFF
|
||||
base.0 & 0xFF_FF_FF
|
||||
)
|
||||
);
|
||||
i += 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue