Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though

This commit is contained in:
Ryan Ward
2026-05-07 11:29:34 -05:00
parent f4e2475c60
commit a41cbd8cc7
2433 changed files with 14208 additions and 9409 deletions
+28 -28
View File
@@ -81,8 +81,8 @@ use pathfinder_color::ColorU;
use pathfinder_geometry::vector::{vec2f, Vector2F};
use std::{any::Any, collections::HashMap, sync::Arc};
use url::Url;
use warp_core::{context_flag::ContextFlag, settings::Setting, ui::theme::color::internal_colors};
use warpui::{
use galaxy_core::{context_flag::ContextFlag, settings::Setting, ui::theme::color::internal_colors};
use galaxyui::{
clipboard::ClipboardContent,
elements::{
Align, AnchorPair, Border, ChildAnchor, ChildView, ClippedScrollStateHandle,
@@ -575,7 +575,7 @@ pub struct DriveIndex {
}
pub fn init(app: &mut AppContext) {
use warpui::keymap::macros::*;
use galaxyui::keymap::macros::*;
app.register_fixed_bindings(vec![
FixedBinding::new("up", DriveIndexAction::FocusPreviousItem, id!("DriveIndex")),
@@ -1314,7 +1314,7 @@ impl DriveIndex {
let icon = Container::new(
ConstrainedBox::new(
Icon::CreateTeam
.to_warpui_icon(
.to_galaxyui_icon(
appearance
.theme()
.main_text_color(appearance.theme().surface_1()),
@@ -1461,7 +1461,7 @@ impl DriveIndex {
if let Some(focused_index) = self.focused_index {
if Some(&WarpDriveItemId::Space(space)) == self.ordered_items.get(focused_index) {
container = container.with_background(
warp_core::ui::theme::color::internal_colors::fg_overlay_4(
galaxy_core::ui::theme::color::internal_colors::fg_overlay_4(
appearance.theme(),
),
);
@@ -1476,7 +1476,7 @@ impl DriveIndex {
// If the item is hovered, set a hover background that matches the hover state of warp drive items.
if mouse_state.is_hovered() && !is_focused || section_state.menu_open {
container = container.with_background(
warp_core::ui::theme::color::internal_colors::fg_overlay_2(
galaxy_core::ui::theme::color::internal_colors::fg_overlay_2(
appearance.theme(),
),
);
@@ -1570,7 +1570,7 @@ impl DriveIndex {
font_color: Some(empty_trash_default_font_color),
font_size: Some(14.),
font_family_id: Some(appearance.ui_font_family()),
font_weight: Some(warpui::fonts::Weight::Semibold),
font_weight: Some(galaxyui::fonts::Weight::Semibold),
padding: Some(Coords::uniform(6.)),
border_radius: Some(CornerRadius::with_all(Radius::Pixels(6.))),
..Default::default()
@@ -1664,7 +1664,7 @@ impl DriveIndex {
if let Some(focused_index) = self.focused_index {
if Some(&WarpDriveItemId::Space(space)) == self.ordered_items.get(focused_index) {
container = container.with_background(
warp_core::ui::theme::color::internal_colors::fg_overlay_4(
galaxy_core::ui::theme::color::internal_colors::fg_overlay_4(
appearance.theme(),
),
);
@@ -1679,7 +1679,7 @@ impl DriveIndex {
// If the item is hovered, set a hover background that matches the hover state of warp drive items.
if mouse_state.is_hovered() && !is_focused || section_state.menu_open {
container = container.with_background(
warp_core::ui::theme::color::internal_colors::fg_overlay_2(
galaxy_core::ui::theme::color::internal_colors::fg_overlay_2(
appearance.theme(),
),
);
@@ -1801,7 +1801,7 @@ impl DriveIndex {
fn render_trash_row(&self, appearance: &Appearance, _: &AppContext) -> Box<dyn Element> {
let font_color = self.font_color_based_on_focused_state(appearance, WarpDriveItemId::Trash);
let icon = Container::new(
ConstrainedBox::new(Icon::Trash.to_warpui_icon(font_color.into()).finish())
ConstrainedBox::new(Icon::Trash.to_galaxyui_icon(font_color.into()).finish())
.with_width(SECTION_HEADER_FONT_SIZE)
.with_height(SECTION_HEADER_FONT_SIZE)
.finish(),
@@ -1850,7 +1850,7 @@ impl DriveIndex {
if let Some(focused_index) = self.focused_index {
if Some(&WarpDriveItemId::Trash) == self.ordered_items.get(focused_index) {
container = container.with_background(
warp_core::ui::theme::color::internal_colors::fg_overlay_4(appearance.theme()),
galaxy_core::ui::theme::color::internal_colors::fg_overlay_4(appearance.theme()),
);
is_focused = true;
}
@@ -1863,7 +1863,7 @@ impl DriveIndex {
if mouse_state.is_hovered() && !is_focused {
container
.with_background(
warp_core::ui::theme::color::internal_colors::fg_overlay_2(
galaxy_core::ui::theme::color::internal_colors::fg_overlay_2(
appearance.theme(),
),
)
@@ -2042,7 +2042,7 @@ impl DriveIndex {
appearance: &Appearance,
) -> Box<dyn Element> {
let rendered_icon = ConstrainedBox::new(
icon.to_warpui_icon(appearance.theme().nonactive_ui_text_color())
icon.to_galaxyui_icon(appearance.theme().nonactive_ui_text_color())
.finish(),
)
.with_width(ITEM_FONT_SIZE)
@@ -2384,7 +2384,7 @@ impl DriveIndex {
Container::new(
ConstrainedBox::new(
Icon::CloudOffline
.to_warpui_icon(
.to_galaxyui_icon(
appearance
.theme()
.sub_text_color(appearance.theme().surface_2()),
@@ -2600,7 +2600,7 @@ impl DriveIndex {
Container::new(
ConstrainedBox::new(
Icon::Info
.to_warpui_icon(appearance.theme().nonactive_ui_text_color())
.to_galaxyui_icon(appearance.theme().nonactive_ui_text_color())
.finish(),
)
.with_height(15.)
@@ -2913,7 +2913,7 @@ impl DriveIndex {
section: DriveIndexSection,
is_collapsed: bool,
appearance: &Appearance,
) -> Box<dyn warpui::Element> {
) -> Box<dyn galaxyui::Element> {
let icon = if is_collapsed {
Icon::ListCollapsed
} else {
@@ -2937,7 +2937,7 @@ impl DriveIndex {
// This icon should render the same as other WarpDrive icons but with no click or hover states.
Container::new(
ConstrainedBox::new(icon.to_warpui_icon(icon_color).finish())
ConstrainedBox::new(icon.to_galaxyui_icon(icon_color).finish())
.with_width(SECTION_HEADER_FONT_SIZE)
.with_height(SECTION_HEADER_FONT_SIZE)
.finish(),
@@ -2946,13 +2946,13 @@ impl DriveIndex {
.finish()
}
fn render_warp_drive_loading_icon(&self, appearance: &Appearance) -> Box<dyn warpui::Element> {
fn render_warp_drive_loading_icon(&self, appearance: &Appearance) -> Box<dyn galaxyui::Element> {
// Use same padding as icon_button (4px) to center the icon within ICON_DIMENSIONS
let icon_button_padding = (ICON_DIMENSIONS - LOADING_ICON_WIDTH) / 2.;
let loading_icon = Container::new(
ConstrainedBox::new(
Icon::Refresh
.to_warpui_icon(
.to_galaxyui_icon(
appearance
.theme()
.sub_text_color(appearance.theme().surface_1()),
@@ -2995,7 +2995,7 @@ impl DriveIndex {
hoverable.finish()
}
fn render_sorting_button(&self, appearance: &Appearance) -> Box<dyn warpui::Element> {
fn render_sorting_button(&self, appearance: &Appearance) -> Box<dyn galaxyui::Element> {
let mut button = icon_button_with_context_menu(
Icon::Sort,
move |ctx, _, _| ctx.dispatch_typed_action(DriveIndexAction::ToggleSortingMenu),
@@ -3033,7 +3033,7 @@ impl DriveIndex {
hoverable.finish()
}
fn render_retry_button(&self, appearance: &Appearance) -> Box<dyn warpui::Element> {
fn render_retry_button(&self, appearance: &Appearance) -> Box<dyn galaxyui::Element> {
let ui_builder = appearance.ui_builder().clone();
icon_button(
@@ -3061,7 +3061,7 @@ impl DriveIndex {
space: Space,
state: &DriveIndexSectionState,
app: &AppContext,
) -> Box<dyn warpui::Element> {
) -> Box<dyn galaxyui::Element> {
let mut button;
// Set color contrast correctly when focused
if self.focused_index.is_some()
@@ -3139,7 +3139,7 @@ impl DriveIndex {
appearance: &Appearance,
state: &DriveIndexSectionState,
space: Space,
) -> Box<dyn warpui::Element> {
) -> Box<dyn galaxyui::Element> {
let mut button = icon_button(
appearance,
Icon::AddTeammates,
@@ -3940,7 +3940,7 @@ impl DriveIndex {
|_| {
ConstrainedBox::new(
Icon::X
.to_warpui_icon(appearance.theme().main_text_color(background_color))
.to_galaxyui_icon(appearance.theme().main_text_color(background_color))
.finish(),
)
.with_width(12.)
@@ -3961,7 +3961,7 @@ impl DriveIndex {
Text::new_inline("Warp Drive".to_string(), appearance.ui_font_family(), 14.)
.with_color(theme.main_text_color(background_color).into())
.with_style(Properties {
weight: warpui::fonts::Weight::Bold,
weight: galaxyui::fonts::Weight::Bold,
..Default::default()
})
.finish(),
@@ -4694,7 +4694,7 @@ impl DriveIndex {
.into_item(),
);
}
if !warpui::platform::is_mobile_device()
if !galaxyui::platform::is_mobile_device()
&& !ContextFlag::HideOpenOnDesktopButton.is_enabled()
&& *UserAppInstallDetectionSettings::as_ref(app)
.user_app_installation_detected
@@ -5075,7 +5075,7 @@ impl View for DriveIndex {
}
}
fn keymap_context(&self, _ctx: &AppContext) -> warpui::keymap::Context {
fn keymap_context(&self, _ctx: &AppContext) -> galaxyui::keymap::Context {
let mut context = Self::default_keymap_context();
// Disable WD Vim keybindings when a dialog is open
@@ -5088,7 +5088,7 @@ impl View for DriveIndex {
context
}
fn render(&self, app: &AppContext) -> Box<dyn warpui::Element> {
fn render(&self, app: &AppContext) -> Box<dyn galaxyui::Element> {
let appearance = Appearance::as_ref(app);
let workspaces = UserWorkspaces::as_ref(app);