protected override bool OnConfigureEvent(EventConfigure evnt) { var result = base.OnConfigureEvent(evnt); Gdk.Monitor monitor = Display.GetMonitorAtWindow(Window); _renderer.Window.SetSize(evnt.Width * monitor.ScaleFactor, evnt.Height * monitor.ScaleFactor); return(result); }
protected override bool OnConfigureEvent(EventConfigure evnt) { bool result = base.OnConfigureEvent(evnt); Gdk.Monitor monitor = Display.GetMonitorAtWindow(Window); _windowWidth = evnt.Width * monitor.ScaleFactor; _windowHeight = evnt.Height * monitor.ScaleFactor; Renderer?.Window?.SetSize(_windowWidth, _windowHeight); return(result); }
protected override void OnGetPreferredWidth(out int minimumWidth, out int naturalWidth) { Gdk.Monitor monitor = Display.GetMonitorAtWindow(Window); // If the monitor is at least 1080p, use the Switch panel size as minimal size. if (monitor.Geometry.Height >= 1080) { minimumWidth = SwitchPanelWidth; } // Otherwise, we default minimal size to 480p 16:9. else { minimumWidth = 854; } naturalWidth = minimumWidth; }