mirror of
https://github.com/emilk/egui.git
synced 2026-06-27 23:13:13 -04:00
typo: fix typos
This commit is contained in:
@@ -316,6 +316,7 @@ pub struct EpiIntegration {
|
||||
pub beginning: Instant,
|
||||
pub egui_ctx: egui::Context,
|
||||
pending_full_output: egui::FullOutput,
|
||||
|
||||
/// When set, it is time to close the native window.
|
||||
close: bool,
|
||||
|
||||
|
||||
@@ -90,6 +90,7 @@ trait WinitApp {
|
||||
) -> Option<Arc<RwLock<winit::window::Window>>>;
|
||||
|
||||
fn get_window_winit_id(&self, id: ViewportId) -> Option<winit::window::WindowId>;
|
||||
|
||||
fn get_window_id(&self, id: &winit::window::WindowId) -> Option<ViewportId>;
|
||||
|
||||
fn save_and_destroy(&mut self);
|
||||
@@ -471,6 +472,7 @@ mod glow_integration {
|
||||
render: Option<Arc<Box<ViewportRender>>>,
|
||||
pub egui_winit: Option<egui_winit::State>,
|
||||
}
|
||||
|
||||
/// This struct will contain both persistent and temporary glutin state.
|
||||
///
|
||||
/// Platform Quirks:
|
||||
@@ -1246,7 +1248,7 @@ mod glow_integration {
|
||||
let glutin_ctx = self.running.read().as_ref().unwrap().glutin_ctx.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
|
||||
{
|
||||
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 let Some(focus) = focused {
|
||||
if focus == viewport_id {
|
||||
// TODO possibile return the error to `egui::Context`
|
||||
// TODO possible return the error to `egui::Context`
|
||||
let _ = win.drag_window();
|
||||
}
|
||||
}
|
||||
@@ -968,14 +968,14 @@ pub fn process_viewport_commands(
|
||||
ViewportCommand::Resizable(v) => win.set_resizable(v),
|
||||
ViewportCommand::EnableButtons {
|
||||
close,
|
||||
mimimize,
|
||||
minimized,
|
||||
maximize,
|
||||
} => win.set_enabled_buttons(
|
||||
if close {
|
||||
WindowButtons::CLOSE
|
||||
} else {
|
||||
WindowButtons::empty()
|
||||
} | if mimimize {
|
||||
} | if minimized {
|
||||
WindowButtons::MINIMIZE
|
||||
} else {
|
||||
WindowButtons::empty()
|
||||
@@ -1002,7 +1002,7 @@ pub fn process_viewport_commands(
|
||||
.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::IMEPurpose(o) => win.set_ime_purpose(match o {
|
||||
1 => winit::window::ImePurpose::Password,
|
||||
|
||||
@@ -85,7 +85,7 @@ impl<'open> Window<'open> {
|
||||
}
|
||||
|
||||
/// 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!
|
||||
pub fn default_embedded(mut self, embedded: bool) -> Self {
|
||||
self.default_embedded = embedded;
|
||||
@@ -1714,7 +1714,7 @@ impl TitleBar {
|
||||
}
|
||||
|
||||
// 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(
|
||||
32.0 + ui.style().visuals.text_cursor.width + ui.style().spacing.icon_width,
|
||||
0.0,
|
||||
|
||||
@@ -23,7 +23,7 @@ impl ViewportId {
|
||||
pub type ViewportRender = dyn Fn(&Context) + Sync + Send;
|
||||
|
||||
/// 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)]
|
||||
pub struct ViewportBuilder {
|
||||
pub id: Id,
|
||||
@@ -114,6 +114,7 @@ impl ViewportBuilder {
|
||||
hittest: None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn with_title(mut self, title: impl Into<String>) -> Self {
|
||||
self.title = title.into();
|
||||
self
|
||||
@@ -149,7 +150,7 @@ impl ViewportBuilder {
|
||||
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 {
|
||||
self.icon = Some(icon);
|
||||
self
|
||||
@@ -246,27 +247,32 @@ pub enum ViewportCommand {
|
||||
MinInnerSize(Option<(u32, u32)>),
|
||||
MaxInnerSize(Option<(u32, u32)>),
|
||||
ResizeIncrements(Option<(u32, u32)>),
|
||||
|
||||
/// Top, Bottom, Right, Left
|
||||
Resize(bool, bool, bool, bool),
|
||||
Resizable(bool),
|
||||
EnableButtons {
|
||||
close: bool,
|
||||
mimimize: bool,
|
||||
minimized: bool,
|
||||
maximize: bool,
|
||||
},
|
||||
Minimized(bool),
|
||||
Maximized(bool),
|
||||
Fullscreen(bool),
|
||||
Decorations(bool),
|
||||
|
||||
/// 0 = Normal, 1 = AlwaysOnBottom, 2 = AlwaysOnTop
|
||||
WindowLevel(u8),
|
||||
WindowIcon(Option<(Vec<u8>, u32, u32)>),
|
||||
IMEPossition(u32, u32),
|
||||
IMEPosition(u32, u32),
|
||||
IMEAllowed(bool),
|
||||
|
||||
/// 0 = Normal, 1 = Password, 2 = Terminal
|
||||
IMEPurpose(u8),
|
||||
|
||||
/// 0 = Informational, 1 = Critical
|
||||
RequestUserAttention(Option<u8>),
|
||||
|
||||
/// 0 = Light, 1 = Dark
|
||||
SetTheme(Option<u8>),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user