Open new windows with a default size and position (#9204)
This PR changes GPUI to open windows with a default size and location, and to otherwise inherit from their spawning window. Note: The linux build now crashes on startup. Release Notes: - N/A --------- Co-authored-by: Nathan <nathan@zed.dev> Co-authored-by: Ezekiel Warren <zaucy@users.noreply.github.com>
This commit is contained in:
parent
9a2dceeea1
commit
e792c1a5c5
30 changed files with 443 additions and 347 deletions
|
@ -6,7 +6,6 @@ use gpui::{
|
|||
actions, canvas, div, point, px, Action, AnyElement, AppContext, Element, Hsla,
|
||||
InteractiveElement, IntoElement, Model, ParentElement, Path, Render,
|
||||
StatefulInteractiveElement, Styled, Subscription, View, ViewContext, VisualContext, WeakView,
|
||||
WindowBounds,
|
||||
};
|
||||
use project::{Project, RepositoryEntry};
|
||||
use recent_projects::RecentProjects;
|
||||
|
@ -65,7 +64,7 @@ impl Render for CollabTitlebarItem {
|
|||
.w_full()
|
||||
.h(titlebar_height(cx))
|
||||
.map(|this| {
|
||||
if matches!(cx.window_bounds(), WindowBounds::Fullscreen) {
|
||||
if cx.is_full_screen() {
|
||||
this.pl_2()
|
||||
} else {
|
||||
// Use pixels here instead of a rem-based size because the macOS traffic
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue