Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
//! * The **reserved box** is the rectangle containing a block's content, padding, borders, and
|
||||
//! margin - all space reserved for the block.
|
||||
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
geometry::{
|
||||
rect::RectF,
|
||||
vector::{Vector2F, vec2f},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
use num_traits::SaturatingSub;
|
||||
use sum_tree::SeekBias;
|
||||
use warpui::units::{IntoPixels, Pixels};
|
||||
use galaxyui::units::{IntoPixels, Pixels};
|
||||
|
||||
use string_offset::CharOffset;
|
||||
|
||||
|
||||
@@ -16,10 +16,10 @@ use std::{cell::Cell, sync::Arc};
|
||||
use string_offset::CharOffset;
|
||||
|
||||
use sum_tree::SumTree;
|
||||
use warpui::assets::asset_cache::AssetSource;
|
||||
use warpui::fonts::FamilyId;
|
||||
use warpui::text_layout::{CaretPosition, TextFrame};
|
||||
use warpui::units::IntoPixels;
|
||||
use galaxyui::assets::asset_cache::AssetSource;
|
||||
use galaxyui::fonts::FamilyId;
|
||||
use galaxyui::text_layout::{CaretPosition, TextFrame};
|
||||
use galaxyui::units::IntoPixels;
|
||||
|
||||
fn test_table_layout() -> LaidOutTable {
|
||||
let source = "aaa\tbbb\nccc\tddd\n";
|
||||
|
||||
@@ -21,11 +21,11 @@ use serde_yaml::Mapping;
|
||||
use sum_tree::{SeekBias, SumTree};
|
||||
use vec1::Vec1;
|
||||
use vim::vim::{MotionType, VimMode};
|
||||
use warp_core::{
|
||||
use galaxy_core::{
|
||||
channel::ChannelState,
|
||||
ui::{Icon, theme::Fill as ThemeFill},
|
||||
};
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
AppContext, Entity, EntityId, ModelContext, ModelHandle,
|
||||
assets::asset_cache::AssetSource,
|
||||
color::ColorU,
|
||||
@@ -69,7 +69,7 @@ use crate::{
|
||||
render::model::debug::Describe,
|
||||
};
|
||||
use string_offset::{CharOffset, impl_offset};
|
||||
use warpui::elements::ListIndentLevel;
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
|
||||
use super::{
|
||||
BLOCK_FOOTER_HEIGHT,
|
||||
@@ -664,7 +664,7 @@ impl LineCount {
|
||||
}
|
||||
|
||||
/// A character offset within a [`TextFrame`]. These offsets count characters in the Rust string
|
||||
/// passed to [`warpui::text_layout::LayoutCache::layout_text()`].
|
||||
/// passed to [`galaxyui::text_layout::LayoutCache::layout_text()`].
|
||||
///
|
||||
/// Frame offsets often, but not always, correspond to glyph indices and caret positions. However,
|
||||
/// they do not line up 1:1 if a glyph or grapheme contains multiple characters
|
||||
@@ -4305,7 +4305,7 @@ impl<'a> Positioned<'a, Paragraph> {
|
||||
vec2f(underline_width, UNDERLINE_THICKNESS),
|
||||
);
|
||||
|
||||
let dash = warpui::scene::Dash {
|
||||
let dash = galaxyui::scene::Dash {
|
||||
dash_length: DASHED_UNDERLINE_DASH_LENGTH,
|
||||
gap_length: DASHED_UNDERLINE_GAP_LENGTH,
|
||||
force_consistent_gap_length: true,
|
||||
@@ -4314,7 +4314,7 @@ impl<'a> Positioned<'a, Paragraph> {
|
||||
.scene
|
||||
.draw_rect_without_hit_recording(underline_rect)
|
||||
.with_border(
|
||||
warpui::scene::Border::bottom(UNDERLINE_THICKNESS)
|
||||
galaxyui::scene::Border::bottom(UNDERLINE_THICKNESS)
|
||||
.with_dashed_border(dash)
|
||||
.with_border_color(color),
|
||||
);
|
||||
|
||||
@@ -2,8 +2,8 @@ use rangemap::RangeSet;
|
||||
use std::{cell::Cell, sync::Arc};
|
||||
use sum_tree::SumTree;
|
||||
use vec1::{Vec1, vec1};
|
||||
use warpui::assets::asset_cache::AssetSource;
|
||||
use warpui::{
|
||||
use galaxyui::assets::asset_cache::AssetSource;
|
||||
use galaxyui::{
|
||||
color::ColorU,
|
||||
fonts::FamilyId,
|
||||
geometry::{rect::RectF, vector::vec2f},
|
||||
@@ -34,7 +34,7 @@ use crate::{
|
||||
};
|
||||
use markdown_parser::{FormattedTextStyles, Hyperlink};
|
||||
use string_offset::CharOffset;
|
||||
use warpui::elements::ListIndentLevel;
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
|
||||
#[test]
|
||||
fn test_height() {
|
||||
@@ -930,7 +930,7 @@ fn test_multiselect_autoscroll_bounding_box() {
|
||||
);
|
||||
}
|
||||
|
||||
// 18:09:15 [INFO] [warp_editor::render::model] Initial tree:
|
||||
// 18:09:15 [INFO] [galaxy_editor::render::model] Initial tree:
|
||||
// -------- 0.00px / 0 characters --------
|
||||
// Hidden (3067 characters, 87 lines, 20.00px tall)
|
||||
// -------- 20.00px / 3067 characters --------
|
||||
@@ -1033,7 +1033,7 @@ fn test_dedupe_hidden_ranges_logged_tree_is_unchanged() {
|
||||
assert_eq!(initial, resulting);
|
||||
}
|
||||
|
||||
// 18:09:14 [INFO] [warp_editor::render::model] Initial tree:
|
||||
// 18:09:14 [INFO] [galaxy_editor::render::model] Initial tree:
|
||||
// -------- 0.00px / 0 characters --------
|
||||
// Hidden (3066 characters, 87 lines, 20.00px tall)
|
||||
// -------- 20.00px / 3067 characters --------
|
||||
@@ -1158,17 +1158,17 @@ fn make_test_cell_layout() -> CellLayout {
|
||||
line_char_ranges: vec![CharOffset::from(0)..CharOffset::from(3)],
|
||||
line_widths: vec![30.0],
|
||||
line_caret_positions: vec![vec![
|
||||
warpui::text_layout::CaretPosition {
|
||||
galaxyui::text_layout::CaretPosition {
|
||||
position_in_line: 0.0,
|
||||
start_offset: 0,
|
||||
last_offset: 0,
|
||||
},
|
||||
warpui::text_layout::CaretPosition {
|
||||
galaxyui::text_layout::CaretPosition {
|
||||
position_in_line: 10.0,
|
||||
start_offset: 1,
|
||||
last_offset: 1,
|
||||
},
|
||||
warpui::text_layout::CaretPosition {
|
||||
galaxyui::text_layout::CaretPosition {
|
||||
position_in_line: 20.0,
|
||||
start_offset: 2,
|
||||
last_offset: 2,
|
||||
|
||||
@@ -19,7 +19,7 @@ mod tests;
|
||||
/// certain character runs are interactive. Within those runs, there's a 1:1 mapping between
|
||||
/// `char`s in the content model and `char`s in the text frame. It translates in two directions:
|
||||
/// * From a [`CharOffset`] relative to the start of the content model block (a [`super::Paragraph`])
|
||||
/// to the character index in the [`warpui::text_layout::TextFrame`].
|
||||
/// to the character index in the [`galaxyui::text_layout::TextFrame`].
|
||||
/// * From a [`FrameOffset`] in the `TextFrame` to the closest `CharOffset` in the content model
|
||||
/// block (for example, clicking within a placeholder should snap the cursor to a regular content
|
||||
/// character).
|
||||
|
||||
@@ -76,7 +76,7 @@ fn test_offset_map_placeholders() {
|
||||
fn test_end_to_end() {
|
||||
// Group imports here so they don't cause "unused import" warnings on other targets.
|
||||
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
App, color::ColorU, elements::Fill, fonts::Cache as FontCache, text_layout::LayoutCache,
|
||||
};
|
||||
|
||||
@@ -97,7 +97,7 @@ fn test_end_to_end() {
|
||||
};
|
||||
|
||||
App::test((), |mut app| async move {
|
||||
let mut font_cache = FontCache::new(Box::new(warpui::platform::current::FontDB::new()));
|
||||
let mut font_cache = FontCache::new(Box::new(galaxyui::platform::current::FontDB::new()));
|
||||
let layout_cache = LayoutCache::new();
|
||||
let paragraph_styles = ParagraphStyles {
|
||||
font_family: font_cache
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use sum_tree::{Cursor, Dimension};
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
geometry::vector::Vector2F,
|
||||
text_layout::Line,
|
||||
units::{IntoPixels, Pixels},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use warpui::EntityId;
|
||||
use galaxyui::EntityId;
|
||||
|
||||
/// Utility for consistently creating and referencing saved position IDs for
|
||||
/// rich text.
|
||||
@@ -17,16 +17,16 @@ impl SavedPositions {
|
||||
|
||||
/// Saved position ID for the cursor location.
|
||||
pub fn cursor_id(&self) -> String {
|
||||
format!("warp_editor:cursor_{}", self.model_id)
|
||||
format!("galaxy_editor:cursor_{}", self.model_id)
|
||||
}
|
||||
|
||||
/// The bounding box for the text selection.
|
||||
pub fn text_selection_id(&self) -> String {
|
||||
format!("warp_editor:text_selection_{}", self.model_id)
|
||||
format!("galaxy_editor:text_selection_{}", self.model_id)
|
||||
}
|
||||
|
||||
/// The first line of the block that the mouse is currently hovered over.
|
||||
pub fn hovered_block_start(&self) -> String {
|
||||
format!("warp_editor:hovered_block_start_{}", self.model_id)
|
||||
format!("galaxy_editor:hovered_block_start_{}", self.model_id)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ use vec1::{Vec1, vec1};
|
||||
|
||||
use crate::content::text::BufferBlockStyle;
|
||||
use ordered_float::OrderedFloat;
|
||||
use warpui::elements::ListIndentLevel;
|
||||
use warpui::{
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
use galaxyui::{
|
||||
color::ColorU,
|
||||
elements::{Border, Fill},
|
||||
fonts::{FamilyId, Weight},
|
||||
@@ -241,7 +241,7 @@ pub fn layout(text: &str, styles: &RichTextStyles, max_width: impl IntoPixels) -
|
||||
width: line_width.as_f32(),
|
||||
trailing_whitespace_width: 0.,
|
||||
runs: vec![Run {
|
||||
font_id: warpui::fonts::FontId(0),
|
||||
font_id: galaxyui::fonts::FontId(0),
|
||||
styles: Default::default(),
|
||||
glyphs: mem::take(&mut glyphs_acc),
|
||||
width: line_width.as_f32(),
|
||||
@@ -280,7 +280,7 @@ pub fn layout(text: &str, styles: &RichTextStyles, max_width: impl IntoPixels) -
|
||||
width: line_width.as_f32(),
|
||||
trailing_whitespace_width: 0.,
|
||||
runs: vec![Run {
|
||||
font_id: warpui::fonts::FontId(0),
|
||||
font_id: galaxyui::fonts::FontId(0),
|
||||
styles: Default::default(),
|
||||
glyphs: glyphs_acc,
|
||||
width: line_width.as_f32(),
|
||||
@@ -316,7 +316,7 @@ pub fn init_logging() {
|
||||
static INIT: Once = Once::new();
|
||||
INIT.call_once(|| {
|
||||
env_logger::builder()
|
||||
.parse_filters("warp_editor=trace")
|
||||
.parse_filters("galaxy_editor=trace")
|
||||
.is_test(true)
|
||||
.init();
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use float_cmp::ApproxEq;
|
||||
use sum_tree::{SeekBias, SumTree};
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
SizeConstraint,
|
||||
geometry::{
|
||||
rect::RectF,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use itertools::Itertools;
|
||||
use sum_tree::SumTree;
|
||||
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
SizeConstraint,
|
||||
geometry::vector::vec2f,
|
||||
units::{IntoPixels, Pixels},
|
||||
|
||||
Reference in New Issue
Block a user