From 61de5e37f76af005034fc516eaa8514b1a56fcdb Mon Sep 17 00:00:00 2001 From: Billy Messenger Date: Thu, 15 Oct 2020 13:26:21 -0500 Subject: [PATCH] rename width, height to logical_width, logical_height --- examples/open_window.rs | 4 ++-- src/lib.rs | 4 ++-- src/x11/window.rs | 6 +++++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/examples/open_window.rs b/examples/open_window.rs index 0f67440..260e0ad 100644 --- a/examples/open_window.rs +++ b/examples/open_window.rs @@ -25,8 +25,8 @@ impl WindowHandler for MyProgram { fn main() { let window_open_options = baseview::WindowOpenOptions { title: "baseview".into(), - width: 512, - height: 512, + logical_width: 512, + logical_height: 512, scale: 1.0, parent: baseview::Parent::None, }; diff --git a/src/lib.rs b/src/lib.rs index f0ed8b7..be05a54 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -36,9 +36,9 @@ pub struct WindowOpenOptions { pub title: String, /// The logical width of the window - pub width: u32, + pub logical_width: u32, /// The logical height of the window - pub height: u32, + pub logical_height: u32, /// The dpi scale factor. This will used in conjunction with the dpi scale /// factor of the system. diff --git a/src/x11/window.rs b/src/x11/window.rs index 507c67d..13464a4 100644 --- a/src/x11/window.rs +++ b/src/x11/window.rs @@ -81,7 +81,11 @@ impl Window { let scaling = xcb_connection.get_scaling().unwrap_or(1.0) * options.scale; - let window_info = WindowInfo::from_logical_size(options.width, options.height, scaling); + let window_info = WindowInfo::from_logical_size( + options.logical_width, + options.logical_height, + scaling + ); let window_id = xcb_connection.conn.generate_id(); xcb::create_window(