Set default width and height based on monitor resolution (#1046)
This commit is contained in:
parent
6a7b58e256
commit
92b17fc228
@ -91,6 +91,12 @@ namespace Ryujinx.Ui
|
||||
{
|
||||
builder.Autoconnect(this);
|
||||
|
||||
int monitorWidth = Display.PrimaryMonitor.Geometry.Width * Display.PrimaryMonitor.ScaleFactor;
|
||||
int monitorHeight = Display.PrimaryMonitor.Geometry.Height * Display.PrimaryMonitor.ScaleFactor;
|
||||
|
||||
this.DefaultWidth = monitorWidth < 1280 ? monitorWidth : 1280;
|
||||
this.DefaultHeight = monitorHeight < 760 ? monitorHeight : 760;
|
||||
|
||||
this.DeleteEvent += Window_Close;
|
||||
_fullScreen.Activated += FullScreen_Toggled;
|
||||
|
||||
|
@ -6,8 +6,6 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title" translatable="yes">Ryujinx</property>
|
||||
<property name="window_position">center</property>
|
||||
<property name="default_width">1280</property>
|
||||
<property name="default_height">760</property>
|
||||
<child type="titlebar">
|
||||
<placeholder/>
|
||||
</child>
|
||||
@ -399,7 +397,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="_footerBox">
|
||||
<property name="width_request">1280</property>
|
||||
<property name="height_request">19</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
|
Loading…
Reference in New Issue
Block a user