Change Monitor dimensions functions to size functions (#911)

This commit is contained in:
Osspial 2019-06-13 02:33:44 -04:00 committed by Hal Gentz
parent 47b5dfa034
commit ea5c21950c
12 changed files with 34 additions and 34 deletions

View file

@ -162,7 +162,7 @@ impl MonitorHandle {
}
#[inline]
pub fn dimensions(&self) -> PhysicalSize {
pub fn size(&self) -> PhysicalSize {
self.dimensions.into()
}
@ -201,7 +201,7 @@ impl MonitorHandle {
assert!(mode.dmFields & REQUIRED_FIELDS == REQUIRED_FIELDS);
modes.insert(VideoMode {
dimensions: (mode.dmPelsWidth, mode.dmPelsHeight),
size: (mode.dmPelsWidth, mode.dmPelsHeight),
bit_depth: mode.dmBitsPerPel as u16,
refresh_rate: mode.dmDisplayFrequency as u16,
});

View file

@ -403,7 +403,7 @@ impl Window {
match &monitor {
&Some(RootMonitorHandle { ref inner }) => {
let (x, y): (i32, i32) = inner.position().into();
let (width, height): (u32, u32) = inner.dimensions().into();
let (width, height): (u32, u32) = inner.size().into();
let mut monitor = monitor.clone();
self.thread_executor.execute_in_thread(move || {