Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though
This commit is contained in:
@@ -8,8 +8,8 @@ use ui_components::{
|
||||
lightbox::{self, LightboxImage, LightboxImageSource, NavigationDirection},
|
||||
switch, tooltip,
|
||||
};
|
||||
use warp_core::ui::{Icon, appearance::Appearance, theme::color::internal_colors};
|
||||
use warpui::{
|
||||
use galaxy_core::ui::{Icon, appearance::Appearance, theme::color::internal_colors};
|
||||
use galaxyui::{
|
||||
AssetProvider, SingletonEntity, Tracked,
|
||||
assets::asset_cache::{AssetCache, AssetSource, AssetState},
|
||||
r#async::Timer,
|
||||
@@ -37,7 +37,7 @@ impl AssetProvider for Assets {
|
||||
}
|
||||
}
|
||||
|
||||
fn main() -> warpui::platform::app::TerminationResult {
|
||||
fn main() -> galaxyui::platform::app::TerminationResult {
|
||||
// Initialize the TLS provider so reqwest can make HTTPS requests.
|
||||
rustls::crypto::aws_lc_rs::default_provider()
|
||||
.install_default()
|
||||
@@ -54,7 +54,7 @@ fn main() -> warpui::platform::app::TerminationResult {
|
||||
"Noto Sans".to_string()
|
||||
};
|
||||
|
||||
let font_family = warpui::fonts::Cache::handle(ctx).update(ctx, |cache, _ctx| {
|
||||
let font_family = galaxyui::fonts::Cache::handle(ctx).update(ctx, |cache, _ctx| {
|
||||
cache.load_system_font(&font_name).unwrap()
|
||||
});
|
||||
ctx.add_singleton_model(|ctx| {
|
||||
@@ -64,7 +64,7 @@ fn main() -> warpui::platform::app::TerminationResult {
|
||||
});
|
||||
|
||||
{
|
||||
use warpui::keymap::macros::*;
|
||||
use galaxyui::keymap::macros::*;
|
||||
let lightbox_open = id!("RootView") & id!("RootView_LightboxOpen");
|
||||
ctx.register_fixed_bindings([
|
||||
FixedBinding::new(
|
||||
@@ -82,7 +82,7 @@ fn main() -> warpui::platform::app::TerminationResult {
|
||||
]);
|
||||
}
|
||||
|
||||
ctx.add_window(warpui::AddWindowOptions::default(), RootView::new);
|
||||
ctx.add_window(galaxyui::AddWindowOptions::default(), RootView::new);
|
||||
})
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ impl View for RootView {
|
||||
"RootView"
|
||||
}
|
||||
|
||||
fn keymap_context(&self, _: &AppContext) -> warpui::keymap::Context {
|
||||
fn keymap_context(&self, _: &AppContext) -> galaxyui::keymap::Context {
|
||||
let mut context = Self::default_keymap_context();
|
||||
if *self.dialog_open {
|
||||
context.set.insert("RootView_DialogOpen");
|
||||
@@ -240,7 +240,7 @@ impl RootView {
|
||||
options: switch::Options {
|
||||
hover_border_size: Some(10.),
|
||||
label: Some(Box::new(move |appearance: &Appearance| {
|
||||
warpui::elements::Text::new(
|
||||
galaxyui::elements::Text::new(
|
||||
"Switch",
|
||||
appearance.ui_font_family(),
|
||||
appearance.ui_font_size(),
|
||||
@@ -260,7 +260,7 @@ impl RootView {
|
||||
tooltip::Params {
|
||||
label: "Tooltip label".into(),
|
||||
options: tooltip::Options {
|
||||
keyboard_shortcut: Some(warpui::keymap::Keystroke {
|
||||
keyboard_shortcut: Some(galaxyui::keymap::Keystroke {
|
||||
ctrl: true,
|
||||
key: "k".to_string(),
|
||||
..Default::default()
|
||||
@@ -282,7 +282,7 @@ impl RootView {
|
||||
content: button::Content::Label("Primary".into()),
|
||||
theme: &button::themes::Primary,
|
||||
options: button::Options {
|
||||
keystroke: Some(warpui::keymap::Keystroke {
|
||||
keystroke: Some(galaxyui::keymap::Keystroke {
|
||||
ctrl: true,
|
||||
key: "k".to_string(),
|
||||
..Default::default()
|
||||
@@ -304,7 +304,7 @@ impl RootView {
|
||||
content: button::Content::Label("Secondary".into()),
|
||||
theme: &button::themes::Secondary,
|
||||
options: button::Options {
|
||||
keystroke: Some(warpui::keymap::Keystroke {
|
||||
keystroke: Some(galaxyui::keymap::Keystroke {
|
||||
cmd: true,
|
||||
key: "enter".to_string(),
|
||||
..Default::default()
|
||||
@@ -327,7 +327,7 @@ impl RootView {
|
||||
theme: &button::themes::Primary,
|
||||
options: button::Options {
|
||||
disabled: true,
|
||||
keystroke: Some(warpui::keymap::Keystroke {
|
||||
keystroke: Some(galaxyui::keymap::Keystroke {
|
||||
shift: true,
|
||||
key: "d".to_string(),
|
||||
..Default::default()
|
||||
@@ -368,7 +368,7 @@ impl RootView {
|
||||
theme: &button::themes::Primary,
|
||||
options: button::Options {
|
||||
size: button::Size::Small,
|
||||
keystroke: Some(warpui::keymap::Keystroke {
|
||||
keystroke: Some(galaxyui::keymap::Keystroke {
|
||||
ctrl: true,
|
||||
key: "k".to_string(),
|
||||
..Default::default()
|
||||
@@ -391,7 +391,7 @@ impl RootView {
|
||||
theme: &button::themes::Secondary,
|
||||
options: button::Options {
|
||||
size: button::Size::Small,
|
||||
keystroke: Some(warpui::keymap::Keystroke {
|
||||
keystroke: Some(galaxyui::keymap::Keystroke {
|
||||
cmd: true,
|
||||
key: "enter".to_string(),
|
||||
..Default::default()
|
||||
@@ -415,7 +415,7 @@ impl RootView {
|
||||
options: button::Options {
|
||||
disabled: true,
|
||||
size: button::Size::Small,
|
||||
keystroke: Some(warpui::keymap::Keystroke {
|
||||
keystroke: Some(galaxyui::keymap::Keystroke {
|
||||
shift: true,
|
||||
key: "d".to_string(),
|
||||
..Default::default()
|
||||
@@ -438,7 +438,7 @@ impl RootView {
|
||||
theme: &button::themes::Secondary,
|
||||
options: button::Options {
|
||||
size: button::Size::Small,
|
||||
keystroke: Some(warpui::keymap::Keystroke {
|
||||
keystroke: Some(galaxyui::keymap::Keystroke {
|
||||
key: "escape".to_string(),
|
||||
..Default::default()
|
||||
}),
|
||||
@@ -498,7 +498,7 @@ impl RootView {
|
||||
on_dismiss: Some(Arc::new(|ctx, _app| {
|
||||
ctx.dispatch_typed_action(Action::CloseDialog);
|
||||
})),
|
||||
dismiss_keystroke: Some(warpui::keymap::Keystroke {
|
||||
dismiss_keystroke: Some(galaxyui::keymap::Keystroke {
|
||||
key: "escape".to_string(),
|
||||
..Default::default()
|
||||
}),
|
||||
@@ -564,7 +564,7 @@ impl RootView {
|
||||
}),
|
||||
current_image_native_size,
|
||||
options: lightbox::Options {
|
||||
dismiss_keystroke: Some(warpui::keymap::Keystroke {
|
||||
dismiss_keystroke: Some(galaxyui::keymap::Keystroke {
|
||||
key: "escape".to_string(),
|
||||
..Default::default()
|
||||
}),
|
||||
@@ -597,7 +597,7 @@ impl RootView {
|
||||
}),
|
||||
current_image_native_size,
|
||||
options: lightbox::Options {
|
||||
dismiss_keystroke: Some(warpui::keymap::Keystroke {
|
||||
dismiss_keystroke: Some(galaxyui::keymap::Keystroke {
|
||||
key: "escape".to_string(),
|
||||
..Default::default()
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user