mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-21 12:28:12 +08:00
Desktop: Fix missing resize events causing all-gray window on Mac after launch (#3445)
* okayish solution should be improved at some point but for now it works well enough. * do leftover renames * better solution * less weird resize frames * move surface reconfiguration * fix recent desktop mac breakages * better looking resize on mac * fix background color * Fix blank screen on window initialization * cleanup --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
+5
-5
@@ -55,8 +55,8 @@ pub(crate) trait CefEventHandler: Send + Sync + 'static {
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub(crate) struct ViewInfo {
|
||||
width: usize,
|
||||
height: usize,
|
||||
width: u32,
|
||||
height: u32,
|
||||
scale: f64,
|
||||
}
|
||||
impl ViewInfo {
|
||||
@@ -78,10 +78,10 @@ impl ViewInfo {
|
||||
pub(crate) fn zoom(&self) -> f64 {
|
||||
self.scale.ln() / 1.2_f64.ln()
|
||||
}
|
||||
pub(crate) fn width(&self) -> usize {
|
||||
pub(crate) fn width(&self) -> u32 {
|
||||
self.width
|
||||
}
|
||||
pub(crate) fn height(&self) -> usize {
|
||||
pub(crate) fn height(&self) -> u32 {
|
||||
self.height
|
||||
}
|
||||
}
|
||||
@@ -92,7 +92,7 @@ impl Default for ViewInfo {
|
||||
}
|
||||
|
||||
pub(crate) enum ViewInfoUpdate {
|
||||
Size { width: usize, height: usize },
|
||||
Size { width: u32, height: u32 },
|
||||
Scale(f64),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user