mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 14:50:03 -04:00
typo: fix typos
This commit is contained in:
@@ -316,6 +316,7 @@ pub struct EpiIntegration {
|
|||||||
pub beginning: Instant,
|
pub beginning: Instant,
|
||||||
pub egui_ctx: egui::Context,
|
pub egui_ctx: egui::Context,
|
||||||
pending_full_output: egui::FullOutput,
|
pending_full_output: egui::FullOutput,
|
||||||
|
|
||||||
/// When set, it is time to close the native window.
|
/// When set, it is time to close the native window.
|
||||||
close: bool,
|
close: bool,
|
||||||
|
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ trait WinitApp {
|
|||||||
) -> Option<Arc<RwLock<winit::window::Window>>>;
|
) -> Option<Arc<RwLock<winit::window::Window>>>;
|
||||||
|
|
||||||
fn get_window_winit_id(&self, id: ViewportId) -> Option<winit::window::WindowId>;
|
fn get_window_winit_id(&self, id: ViewportId) -> Option<winit::window::WindowId>;
|
||||||
|
|
||||||
fn get_window_id(&self, id: &winit::window::WindowId) -> Option<ViewportId>;
|
fn get_window_id(&self, id: &winit::window::WindowId) -> Option<ViewportId>;
|
||||||
|
|
||||||
fn save_and_destroy(&mut self);
|
fn save_and_destroy(&mut self);
|
||||||
@@ -471,6 +472,7 @@ mod glow_integration {
|
|||||||
render: Option<Arc<Box<ViewportRender>>>,
|
render: Option<Arc<Box<ViewportRender>>>,
|
||||||
pub egui_winit: Option<egui_winit::State>,
|
pub egui_winit: Option<egui_winit::State>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This struct will contain both persistent and temporary glutin state.
|
/// This struct will contain both persistent and temporary glutin state.
|
||||||
///
|
///
|
||||||
/// Platform Quirks:
|
/// Platform Quirks:
|
||||||
@@ -1246,7 +1248,7 @@ mod glow_integration {
|
|||||||
let glutin_ctx = self.running.read().as_ref().unwrap().glutin_ctx.clone();
|
let glutin_ctx = self.running.read().as_ref().unwrap().glutin_ctx.clone();
|
||||||
let painter = self.running.read().as_ref().unwrap().painter.clone();
|
let painter = self.running.read().as_ref().unwrap().painter.clone();
|
||||||
|
|
||||||
// This onlt will happend when a viewport is sync
|
// This will only happen if the viewport is sync
|
||||||
// That means that the viewport cannot be rendered by itself and needs his parent to be rendered
|
// That means that the viewport cannot be rendered by itself and needs his parent to be rendered
|
||||||
{
|
{
|
||||||
let win = glutin_ctx.read().windows.get(&viewport_id).unwrap().clone();
|
let win = glutin_ctx.read().windows.get(&viewport_id).unwrap().clone();
|
||||||
|
|||||||
@@ -927,7 +927,7 @@ pub fn process_viewport_commands(
|
|||||||
// if this is not checked on x11 the input will be permanently taken until the app is killed!
|
// if this is not checked on x11 the input will be permanently taken until the app is killed!
|
||||||
if let Some(focus) = focused {
|
if let Some(focus) = focused {
|
||||||
if focus == viewport_id {
|
if focus == viewport_id {
|
||||||
// TODO possibile return the error to `egui::Context`
|
// TODO possible return the error to `egui::Context`
|
||||||
let _ = win.drag_window();
|
let _ = win.drag_window();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -968,14 +968,14 @@ pub fn process_viewport_commands(
|
|||||||
ViewportCommand::Resizable(v) => win.set_resizable(v),
|
ViewportCommand::Resizable(v) => win.set_resizable(v),
|
||||||
ViewportCommand::EnableButtons {
|
ViewportCommand::EnableButtons {
|
||||||
close,
|
close,
|
||||||
mimimize,
|
minimized,
|
||||||
maximize,
|
maximize,
|
||||||
} => win.set_enabled_buttons(
|
} => win.set_enabled_buttons(
|
||||||
if close {
|
if close {
|
||||||
WindowButtons::CLOSE
|
WindowButtons::CLOSE
|
||||||
} else {
|
} else {
|
||||||
WindowButtons::empty()
|
WindowButtons::empty()
|
||||||
} | if mimimize {
|
} | if minimized {
|
||||||
WindowButtons::MINIMIZE
|
WindowButtons::MINIMIZE
|
||||||
} else {
|
} else {
|
||||||
WindowButtons::empty()
|
WindowButtons::empty()
|
||||||
@@ -1002,7 +1002,7 @@ pub fn process_viewport_commands(
|
|||||||
.expect("Invalid ICON data!")
|
.expect("Invalid ICON data!")
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
ViewportCommand::IMEPossition(x, y) => win.set_ime_position(LogicalPosition::new(x, y)),
|
ViewportCommand::IMEPosition(x, y) => win.set_ime_position(LogicalPosition::new(x, y)),
|
||||||
ViewportCommand::IMEAllowed(v) => win.set_ime_allowed(v),
|
ViewportCommand::IMEAllowed(v) => win.set_ime_allowed(v),
|
||||||
ViewportCommand::IMEPurpose(o) => win.set_ime_purpose(match o {
|
ViewportCommand::IMEPurpose(o) => win.set_ime_purpose(match o {
|
||||||
1 => winit::window::ImePurpose::Password,
|
1 => winit::window::ImePurpose::Password,
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ impl<'open> Window<'open> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// This will only be used on window creation!
|
/// This will only be used on window creation!
|
||||||
/// If embedded is false the window will be a native window, if is possibile
|
/// If embedded is false the window will be a native window, if is possible
|
||||||
/// Look at `Context::is_desktop` to see if is possible to create a native window!
|
/// Look at `Context::is_desktop` to see if is possible to create a native window!
|
||||||
pub fn default_embedded(mut self, embedded: bool) -> Self {
|
pub fn default_embedded(mut self, embedded: bool) -> Self {
|
||||||
self.default_embedded = embedded;
|
self.default_embedded = embedded;
|
||||||
@@ -1714,7 +1714,7 @@ impl TitleBar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Don't cover the close- and collapse buttons:
|
// Don't cover the close- and collapse buttons:
|
||||||
// After 32 is used for a temporary embedd button!
|
// After 32 is used for a temporary embedded button!
|
||||||
let double_click_rect = self.rect.shrink2(vec2(
|
let double_click_rect = self.rect.shrink2(vec2(
|
||||||
32.0 + ui.style().visuals.text_cursor.width + ui.style().spacing.icon_width,
|
32.0 + ui.style().visuals.text_cursor.width + ui.style().spacing.icon_width,
|
||||||
0.0,
|
0.0,
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ impl ViewportId {
|
|||||||
pub type ViewportRender = dyn Fn(&Context) + Sync + Send;
|
pub type ViewportRender = dyn Fn(&Context) + Sync + Send;
|
||||||
|
|
||||||
/// The filds in this struct should not be change directly, but is not problem tho!
|
/// The filds in this struct should not be change directly, but is not problem tho!
|
||||||
/// Every thing is wraped in Option<> indicates that thing should not be changed!
|
/// Every thing is wrapped in Option<> indicates that thing should not be changed!
|
||||||
#[derive(Hash, PartialEq, Eq, Clone)]
|
#[derive(Hash, PartialEq, Eq, Clone)]
|
||||||
pub struct ViewportBuilder {
|
pub struct ViewportBuilder {
|
||||||
pub id: Id,
|
pub id: Id,
|
||||||
@@ -114,6 +114,7 @@ impl ViewportBuilder {
|
|||||||
hittest: None,
|
hittest: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn with_title(mut self, title: impl Into<String>) -> Self {
|
pub fn with_title(mut self, title: impl Into<String>) -> Self {
|
||||||
self.title = title.into();
|
self.title = title.into();
|
||||||
self
|
self
|
||||||
@@ -149,7 +150,7 @@ impl ViewportBuilder {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The icon needs to be wraped in Arc because will be copyed every frame
|
/// The icon needs to be wrapped in Arc because will be copied every frame
|
||||||
pub fn with_window_icon(mut self, icon: Option<Arc<(u32, u32, Vec<u8>)>>) -> Self {
|
pub fn with_window_icon(mut self, icon: Option<Arc<(u32, u32, Vec<u8>)>>) -> Self {
|
||||||
self.icon = Some(icon);
|
self.icon = Some(icon);
|
||||||
self
|
self
|
||||||
@@ -246,27 +247,32 @@ pub enum ViewportCommand {
|
|||||||
MinInnerSize(Option<(u32, u32)>),
|
MinInnerSize(Option<(u32, u32)>),
|
||||||
MaxInnerSize(Option<(u32, u32)>),
|
MaxInnerSize(Option<(u32, u32)>),
|
||||||
ResizeIncrements(Option<(u32, u32)>),
|
ResizeIncrements(Option<(u32, u32)>),
|
||||||
|
|
||||||
/// Top, Bottom, Right, Left
|
/// Top, Bottom, Right, Left
|
||||||
Resize(bool, bool, bool, bool),
|
Resize(bool, bool, bool, bool),
|
||||||
Resizable(bool),
|
Resizable(bool),
|
||||||
EnableButtons {
|
EnableButtons {
|
||||||
close: bool,
|
close: bool,
|
||||||
mimimize: bool,
|
minimized: bool,
|
||||||
maximize: bool,
|
maximize: bool,
|
||||||
},
|
},
|
||||||
Minimized(bool),
|
Minimized(bool),
|
||||||
Maximized(bool),
|
Maximized(bool),
|
||||||
Fullscreen(bool),
|
Fullscreen(bool),
|
||||||
Decorations(bool),
|
Decorations(bool),
|
||||||
|
|
||||||
/// 0 = Normal, 1 = AlwaysOnBottom, 2 = AlwaysOnTop
|
/// 0 = Normal, 1 = AlwaysOnBottom, 2 = AlwaysOnTop
|
||||||
WindowLevel(u8),
|
WindowLevel(u8),
|
||||||
WindowIcon(Option<(Vec<u8>, u32, u32)>),
|
WindowIcon(Option<(Vec<u8>, u32, u32)>),
|
||||||
IMEPossition(u32, u32),
|
IMEPosition(u32, u32),
|
||||||
IMEAllowed(bool),
|
IMEAllowed(bool),
|
||||||
|
|
||||||
/// 0 = Normal, 1 = Password, 2 = Terminal
|
/// 0 = Normal, 1 = Password, 2 = Terminal
|
||||||
IMEPurpose(u8),
|
IMEPurpose(u8),
|
||||||
|
|
||||||
/// 0 = Informational, 1 = Critical
|
/// 0 = Informational, 1 = Critical
|
||||||
RequestUserAttention(Option<u8>),
|
RequestUserAttention(Option<u8>),
|
||||||
|
|
||||||
/// 0 = Light, 1 = Dark
|
/// 0 = Light, 1 = Dark
|
||||||
SetTheme(Option<u8>),
|
SetTheme(Option<u8>),
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user