From 3c965a4106a9bf9bde7083755237be98ca5f5de2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Mon, 28 Sep 2026 03:43:07 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(client):=20follow=20the=20gp?= =?UTF-8?q?ui=200.6=20API=20and=20inherit=20the=20theme=20foreground?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Application::new() is gone in 0.3; the platform constructor is gpui_platform::application(). The container no longer forces a white text color, which used to cascade into Input and render typed text white on the light-theme input background. --- crates/client/src/gui.rs | 4 ++-- crates/client/src/main.rs | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/crates/client/src/gui.rs b/crates/client/src/gui.rs index c37f1a2..566b921 100644 --- a/crates/client/src/gui.rs +++ b/crates/client/src/gui.rs @@ -1,6 +1,6 @@ use common::user::User; use gpui::{IntoElement, ParentElement, Render, Styled, div, rgb}; -use gpui_component::{Root, WindowExt, button::Button, notification::Notification}; +use gpui_component::{ActiveTheme, Root, WindowExt, button::Button, notification::Notification}; use tokio::sync::mpsc; use crate::{ @@ -164,7 +164,7 @@ impl Render for Yumush { .items_center() .size_full() .bg(rgb(0x1e1e1e)) - .text_color(rgb(0xffffff)) + .text_color(cx.theme().foreground) .child(match self.current_route { Route::Register => self.register_page(cx).into_any_element(), Route::Login => self.login_page(cx).into_any_element(), diff --git a/crates/client/src/main.rs b/crates/client/src/main.rs index dd790e9..6b821c6 100644 --- a/crates/client/src/main.rs +++ b/crates/client/src/main.rs @@ -1,7 +1,5 @@ -use client::{ClientConfig, NAME, gui::Yumush, network}; -use gpui::{ - App, AppContext, Application, Bounds, TitlebarOptions, WindowBounds, WindowOptions, px, size, -}; +use client::{gui::Yumush, network, ClientConfig, NAME}; +use gpui::{px, size, App, AppContext, Bounds, TitlebarOptions, WindowBounds, WindowOptions}; use gpui_component::Root; fn main() { @@ -9,7 +7,7 @@ fn main() { let (network_handle, network_event_receiver) = network::start(ClientConfig::default()); - Application::new().run(|cx: &mut App| { + gpui_platform::application().run(|cx: &mut App| { gpui_component::init(cx); let window_bounds = Bounds::centered(None, size(px(800.0), px(600.0)), cx);