1
0
Fork 0

rename width, height to logical_width, logical_height

This commit is contained in:
Billy Messenger 2020-10-15 13:26:21 -05:00
parent ed1db27f52
commit 61de5e37f7
3 changed files with 9 additions and 5 deletions

View file

@ -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,
};

View file

@ -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.

View file

@ -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(