Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use asset_macro::bundled_or_fetched_asset;
|
||||
use pathfinder_color::ColorU;
|
||||
use warp_core::ui::{
|
||||
use galaxy_core::ui::{
|
||||
color::{blend::Blend, coloru_with_opacity, OPAQUE},
|
||||
theme::{
|
||||
color::CustomDetails, AnsiColor, AnsiColors, Details, Fill, HorizontalGradient, Image,
|
||||
@@ -112,6 +112,47 @@ const DRACULA_BRIGHT_COLORS: AnsiColors = AnsiColors::new(
|
||||
AnsiColor::from_u32(0x8BE9FDFF),
|
||||
AnsiColor::from_u32(0xFFFFFFFF),
|
||||
);
|
||||
const SAMSUNG_DARK_NORMAL_COLORS: AnsiColors = AnsiColors::new(
|
||||
AnsiColor::from_u32(0x1C1E25FF),
|
||||
AnsiColor::from_u32(0xF05767FF),
|
||||
AnsiColor::from_u32(0x4FB37FFF),
|
||||
AnsiColor::from_u32(0xE2B44FFF),
|
||||
AnsiColor::from_u32(0x3E6FF4FF),
|
||||
AnsiColor::from_u32(0xA680F2FF),
|
||||
AnsiColor::from_u32(0x4EAEDCFF),
|
||||
AnsiColor::from_u32(0xE9ECF3FF),
|
||||
);
|
||||
const SAMSUNG_DARK_BRIGHT_COLORS: AnsiColors = AnsiColors::new(
|
||||
AnsiColor::from_u32(0x343944FF),
|
||||
AnsiColor::from_u32(0xFF7D8BFF),
|
||||
AnsiColor::from_u32(0x73C99CFF),
|
||||
AnsiColor::from_u32(0xF0C971FF),
|
||||
AnsiColor::from_u32(0x5F8EFFFF),
|
||||
AnsiColor::from_u32(0xB99CFFFF),
|
||||
AnsiColor::from_u32(0x70C5EBFF),
|
||||
AnsiColor::from_u32(0xFFFFFFFF),
|
||||
);
|
||||
|
||||
const SAMSUNG_LIGHT_NORMAL_COLORS: AnsiColors = AnsiColors::new(
|
||||
AnsiColor::from_u32(0xD8DEE8FF),
|
||||
AnsiColor::from_u32(0xB93E4DFF),
|
||||
AnsiColor::from_u32(0x2D8C5DFF),
|
||||
AnsiColor::from_u32(0xA87D2EFF),
|
||||
AnsiColor::from_u32(0x0056D8FF),
|
||||
AnsiColor::from_u32(0x7858C7FF),
|
||||
AnsiColor::from_u32(0x2D7EA4FF),
|
||||
AnsiColor::from_u32(0x1A1F2BFF),
|
||||
);
|
||||
const SAMSUNG_LIGHT_BRIGHT_COLORS: AnsiColors = AnsiColors::new(
|
||||
AnsiColor::from_u32(0xC4CDDCFF),
|
||||
AnsiColor::from_u32(0xD35765FF),
|
||||
AnsiColor::from_u32(0x3FA472FF),
|
||||
AnsiColor::from_u32(0xC2983FFF),
|
||||
AnsiColor::from_u32(0x2674F4FF),
|
||||
AnsiColor::from_u32(0x9372DEFF),
|
||||
AnsiColor::from_u32(0x4297C1FF),
|
||||
AnsiColor::from_u32(0x04080FFF),
|
||||
);
|
||||
|
||||
const PHENOMENON_NORMAL_COLORS: AnsiColors = AnsiColors::new(
|
||||
AnsiColor::from_u32(0x121212FF),
|
||||
@@ -258,6 +299,14 @@ pub(super) fn adeberry_colors() -> TerminalColors {
|
||||
TerminalColors::new(ADEBERRY_NORMAL_COLORS, ADEBERRY_BRIGHT_COLORS)
|
||||
}
|
||||
|
||||
pub(super) fn samsung_dark_colors() -> TerminalColors {
|
||||
TerminalColors::new(SAMSUNG_DARK_NORMAL_COLORS, SAMSUNG_DARK_BRIGHT_COLORS)
|
||||
}
|
||||
|
||||
pub(super) fn samsung_light_colors() -> TerminalColors {
|
||||
TerminalColors::new(SAMSUNG_LIGHT_NORMAL_COLORS, SAMSUNG_LIGHT_BRIGHT_COLORS)
|
||||
}
|
||||
|
||||
/// Default bundled themes
|
||||
pub fn dark_theme() -> WarpTheme {
|
||||
WarpTheme::new(
|
||||
@@ -614,6 +663,31 @@ pub(super) fn adeberry() -> WarpTheme {
|
||||
)
|
||||
}
|
||||
|
||||
pub(super) fn samsung_dark() -> WarpTheme {
|
||||
WarpTheme::new(
|
||||
Fill::Solid(ColorU::from_u32(0x0C0F16FF)),
|
||||
ColorU::from_u32(0xEEF2FAFF),
|
||||
Fill::Solid(ColorU::from_u32(0x1F6FFFFF)),
|
||||
None,
|
||||
Some(Details::Darker),
|
||||
samsung_dark_colors(),
|
||||
None,
|
||||
Some("Samsung Dark".to_string()),
|
||||
)
|
||||
}
|
||||
|
||||
pub(super) fn samsung_light() -> WarpTheme {
|
||||
WarpTheme::new(
|
||||
Fill::Solid(ColorU::from_u32(0xF7F9FCFF)),
|
||||
ColorU::from_u32(0x10131BFF),
|
||||
Fill::Solid(ColorU::from_u32(0x034AE5FF)),
|
||||
None,
|
||||
Some(Details::Lighter),
|
||||
samsung_light_colors(),
|
||||
None,
|
||||
Some("Samsung Light".to_string()),
|
||||
)
|
||||
}
|
||||
pub(super) fn received_referral_reward() -> WarpTheme {
|
||||
WarpTheme::new(
|
||||
Fill::Solid(ColorU::from_u32(0xFFFFFFFF)),
|
||||
|
||||
@@ -7,7 +7,7 @@ pub mod theme_creator_modal;
|
||||
pub mod theme_deletion_body;
|
||||
pub mod theme_deletion_modal;
|
||||
|
||||
use warp_core::ui::theme::WarpTheme;
|
||||
use galaxy_core::ui::theme::WarpTheme;
|
||||
|
||||
pub fn onboarding_theme_picker_themes() -> [WarpTheme; 4] {
|
||||
[
|
||||
|
||||
+15
-7
@@ -4,9 +4,9 @@ use serde::{Deserialize, Serialize};
|
||||
use std::collections::HashMap;
|
||||
use std::iter::FromIterator;
|
||||
use std::path::PathBuf;
|
||||
use warp_core::ui::color::pick_foreground_color;
|
||||
use warpui::assets::asset_cache::AssetSource;
|
||||
use warpui::{
|
||||
use galaxy_core::ui::color::pick_foreground_color;
|
||||
use galaxyui::assets::asset_cache::AssetSource;
|
||||
use galaxyui::{
|
||||
color::ColorU,
|
||||
elements::{
|
||||
Align, Border, ConstrainedBox, Container, Element, Empty, Flex, ParentElement, Rect,
|
||||
@@ -17,8 +17,8 @@ use warpui::{
|
||||
|
||||
use super::theme_creator::{pick_accent_color_from_options, top_colors_for_image};
|
||||
|
||||
pub use warp_core::ui::color::blend::Blend;
|
||||
pub use warp_core::ui::theme::*;
|
||||
pub use galaxy_core::ui::color::blend::Blend;
|
||||
pub use galaxy_core::ui::theme::*;
|
||||
|
||||
const THUMBNAIL_MARGIN: f32 = 10.;
|
||||
|
||||
@@ -49,6 +49,10 @@ pub enum ThemeKind {
|
||||
ReceivedReferralReward,
|
||||
#[schemars(description = "Adeberry")]
|
||||
Adeberry,
|
||||
#[schemars(description = "Samsung Dark")]
|
||||
SamsungDark,
|
||||
#[schemars(description = "Samsung Light")]
|
||||
SamsungLight,
|
||||
#[schemars(description = "Phenomenon")]
|
||||
Phenomenon,
|
||||
#[default]
|
||||
@@ -133,6 +137,8 @@ impl std::fmt::Display for ThemeKind {
|
||||
ThemeKind::Phenomenon => "Phenomenon",
|
||||
ThemeKind::SolarFlare => "Solar Flare",
|
||||
ThemeKind::Adeberry => "Adeberry",
|
||||
ThemeKind::SamsungDark => "Samsung Dark",
|
||||
ThemeKind::SamsungLight => "Samsung Light",
|
||||
ThemeKind::SentReferralReward => "Warp Referral",
|
||||
ThemeKind::ReceivedReferralReward => "Referred to Warp",
|
||||
ThemeKind::Custom(custom_theme) => custom_theme.name.as_str(),
|
||||
@@ -321,6 +327,8 @@ impl WarpThemeConfig {
|
||||
(ThemeKind::Phenomenon, phenomenon()),
|
||||
(ThemeKind::SolarFlare, solar_flare()),
|
||||
(ThemeKind::Adeberry, adeberry()),
|
||||
(ThemeKind::SamsungDark, samsung_dark()),
|
||||
(ThemeKind::SamsungLight, samsung_light()),
|
||||
]);
|
||||
WarpThemeConfig { theme_map }
|
||||
}
|
||||
@@ -517,9 +525,9 @@ pub fn render_preview(
|
||||
thumbnail.add_child(
|
||||
Shrinkable::new(
|
||||
1.,
|
||||
warpui::elements::Image::new(
|
||||
galaxyui::elements::Image::new(
|
||||
background_image.source(),
|
||||
warpui::elements::CacheOption::BySize,
|
||||
galaxyui::elements::CacheOption::BySize,
|
||||
)
|
||||
.cover()
|
||||
.finish(),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use pathfinder_color::ColorU;
|
||||
use settings::Setting as _;
|
||||
use warp_editor::editor::NavigationKey;
|
||||
use warpui::{
|
||||
use galaxy_editor::editor::NavigationKey;
|
||||
use galaxyui::{
|
||||
accessibility::{AccessibilityContent, WarpA11yRole},
|
||||
elements::{
|
||||
Align, ChildAnchor, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment,
|
||||
@@ -150,7 +150,7 @@ pub struct ThemeChooser {
|
||||
search_editor: ViewHandle<EditorView>,
|
||||
referral_theme_status: ModelHandle<ReferralThemeStatus>,
|
||||
tips_completed: ModelHandle<TipsCompleted>,
|
||||
window_id: warpui::WindowId,
|
||||
window_id: galaxyui::WindowId,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -165,7 +165,7 @@ pub enum ThemeChooserAction {
|
||||
}
|
||||
|
||||
pub fn init(app: &mut AppContext) {
|
||||
use warpui::keymap::macros::*;
|
||||
use galaxyui::keymap::macros::*;
|
||||
|
||||
app.register_fixed_bindings(vec![
|
||||
FixedBinding::new("up", ThemeChooserAction::Up, id!("ThemeChooser")),
|
||||
|
||||
@@ -14,18 +14,18 @@ use std::path::PathBuf;
|
||||
#[cfg(feature = "local_fs")]
|
||||
use std::{fs::copy, io::Write};
|
||||
#[cfg(feature = "local_fs")]
|
||||
use warp_core::ui::theme::WarpTheme;
|
||||
use warpui::elements::{
|
||||
use galaxy_core::ui::theme::WarpTheme;
|
||||
use galaxyui::elements::{
|
||||
Border, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, DispatchEventResult,
|
||||
EventHandler, Fill, Flex, Icon, MainAxisAlignment, MainAxisSize, MouseStateHandle,
|
||||
ParentElement, Radius, Rect, SavePosition, Shrinkable, Text,
|
||||
};
|
||||
use warpui::fonts::Weight;
|
||||
use warpui::ui_components::button::{ButtonVariant, TextAndIcon, TextAndIconAlignment};
|
||||
use warpui::ui_components::components::{Coords, UiComponent, UiComponentStyles};
|
||||
use warpui::ui_components::text_input::TextInput;
|
||||
use warpui::ViewHandle;
|
||||
use warpui::{
|
||||
use galaxyui::fonts::Weight;
|
||||
use galaxyui::ui_components::button::{ButtonVariant, TextAndIcon, TextAndIconAlignment};
|
||||
use galaxyui::ui_components::components::{Coords, UiComponent, UiComponentStyles};
|
||||
use galaxyui::ui_components::text_input::TextInput;
|
||||
use galaxyui::ViewHandle;
|
||||
use galaxyui::{
|
||||
platform::Cursor, AppContext, Element, Entity, SingletonEntity, TypedActionView, View,
|
||||
ViewContext,
|
||||
};
|
||||
|
||||
@@ -7,14 +7,14 @@ use crate::view_components::DismissibleToast;
|
||||
use crate::workspace::ToastStack;
|
||||
use std::default::Default;
|
||||
use std::path::PathBuf;
|
||||
use warpui::fonts::Weight;
|
||||
use warpui::keymap::FixedBinding;
|
||||
use warpui::platform::{FilePickerConfiguration, FileType};
|
||||
use warpui::presenter::ChildView;
|
||||
use warpui::ui_components::components::{Coords, UiComponentStyles};
|
||||
use warpui::ViewHandle;
|
||||
use warpui::{AppContext, SingletonEntity as _};
|
||||
use warpui::{Element, Entity, TypedActionView, View, ViewContext};
|
||||
use galaxyui::fonts::Weight;
|
||||
use galaxyui::keymap::FixedBinding;
|
||||
use galaxyui::platform::{FilePickerConfiguration, FileType};
|
||||
use galaxyui::presenter::ChildView;
|
||||
use galaxyui::ui_components::components::{Coords, UiComponentStyles};
|
||||
use galaxyui::ViewHandle;
|
||||
use galaxyui::{AppContext, SingletonEntity as _};
|
||||
use galaxyui::{Element, Entity, TypedActionView, View, ViewContext};
|
||||
|
||||
const THEME_CREATOR_MODAL_HEADER: &str = "Create new theme from image";
|
||||
|
||||
@@ -34,7 +34,7 @@ pub enum ThemeCreatorModalEvent {
|
||||
}
|
||||
|
||||
pub fn init(app: &mut AppContext) {
|
||||
use warpui::keymap::macros::*;
|
||||
use galaxyui::keymap::macros::*;
|
||||
|
||||
app.register_fixed_bindings([FixedBinding::new(
|
||||
"escape",
|
||||
|
||||
@@ -8,15 +8,15 @@ use crate::user_config::util::from_yaml;
|
||||
use std::default::Default;
|
||||
use std::fs;
|
||||
use std::fs::remove_file;
|
||||
use warpui::assets::asset_cache::AssetSource;
|
||||
use warpui::elements::{
|
||||
use galaxyui::assets::asset_cache::AssetSource;
|
||||
use galaxyui::elements::{
|
||||
Container, CornerRadius, CrossAxisAlignment, Flex, MainAxisSize, MouseStateHandle,
|
||||
ParentElement, Radius, SavePosition, Shrinkable, Text,
|
||||
};
|
||||
use warpui::fonts::Weight;
|
||||
use warpui::ui_components::button::ButtonVariant;
|
||||
use warpui::ui_components::components::{Coords, UiComponent, UiComponentStyles};
|
||||
use warpui::{
|
||||
use galaxyui::fonts::Weight;
|
||||
use galaxyui::ui_components::button::ButtonVariant;
|
||||
use galaxyui::ui_components::components::{Coords, UiComponent, UiComponentStyles};
|
||||
use galaxyui::{
|
||||
platform::Cursor, AppContext, Element, Entity, SingletonEntity, TypedActionView, View,
|
||||
ViewContext,
|
||||
};
|
||||
|
||||
@@ -2,13 +2,13 @@ use crate::modal::Modal;
|
||||
use crate::themes::theme::ThemeKind;
|
||||
use crate::themes::theme_deletion_body::{ThemeDeletionBody, ThemeDeletionBodyEvent};
|
||||
use std::default::Default;
|
||||
use warpui::fonts::Weight;
|
||||
use warpui::keymap::FixedBinding;
|
||||
use warpui::presenter::ChildView;
|
||||
use warpui::ui_components::components::{Coords, UiComponentStyles};
|
||||
use warpui::AppContext;
|
||||
use warpui::ViewHandle;
|
||||
use warpui::{Element, Entity, TypedActionView, View, ViewContext};
|
||||
use galaxyui::fonts::Weight;
|
||||
use galaxyui::keymap::FixedBinding;
|
||||
use galaxyui::presenter::ChildView;
|
||||
use galaxyui::ui_components::components::{Coords, UiComponentStyles};
|
||||
use galaxyui::AppContext;
|
||||
use galaxyui::ViewHandle;
|
||||
use galaxyui::{Element, Entity, TypedActionView, View, ViewContext};
|
||||
|
||||
const THEME_DELETION_MODAL_HEADER: &str = "Are you sure you want to delete this theme?";
|
||||
|
||||
@@ -28,7 +28,7 @@ pub enum ThemeDeletionModalEvent {
|
||||
}
|
||||
|
||||
pub fn init(app: &mut AppContext) {
|
||||
use warpui::keymap::macros::*;
|
||||
use galaxyui::keymap::macros::*;
|
||||
|
||||
app.register_fixed_bindings([FixedBinding::new(
|
||||
"escape",
|
||||
|
||||
@@ -14,7 +14,7 @@ fn in_memory_theme_generation_test() {
|
||||
.iter()
|
||||
.collect();
|
||||
|
||||
let mut in_memory_theme = warpui::r#async::block_on(InMemoryThemeOptions::new(
|
||||
let mut in_memory_theme = galaxyui::r#async::block_on(InMemoryThemeOptions::new(
|
||||
"mountains".to_string(),
|
||||
mountains_bg_path.clone(),
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user