mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-25 01:34:02 +00:00
Make the default window size non-zero
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
parent
c7c7a197d1
commit
5cfb948b2b
1 changed files with 11 additions and 2 deletions
|
@ -13,7 +13,7 @@ use crate::{
|
|||
fonts::{FontId, GlyphId, Metrics as FontMetrics, Properties as FontProperties},
|
||||
geometry::{
|
||||
rect::{RectF, RectI},
|
||||
vector::Vector2F,
|
||||
vector::{vec2f, Vector2F},
|
||||
},
|
||||
text_layout::LineLayout,
|
||||
ClipboardItem, Menu, Scene,
|
||||
|
@ -96,7 +96,6 @@ pub trait WindowContext {
|
|||
fn present_scene(&mut self, scene: Scene);
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct WindowOptions<'a> {
|
||||
pub bounds: RectF,
|
||||
pub title: Option<&'a str>,
|
||||
|
@ -141,3 +140,13 @@ pub trait FontSystem: Send + Sync {
|
|||
) -> LineLayout;
|
||||
fn wrap_line(&self, text: &str, font_id: FontId, font_size: f32, width: f32) -> Vec<usize>;
|
||||
}
|
||||
|
||||
impl<'a> Default for WindowOptions<'a> {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
bounds: RectF::new(Default::default(), vec2f(1024.0, 768.0)),
|
||||
title: Default::default(),
|
||||
titlebar_appears_transparent: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue