Make GP editor GUI working better on different resolutions

This commit is contained in:
Deve 2018-09-03 22:10:33 +02:00
parent 3d34c2893b
commit 6bd5b5276a
2 changed files with 16 additions and 11 deletions

View File

@ -2,25 +2,26 @@
<stkgui> <stkgui>
<div x="2%" y="1%" width="96%" height="98%" layout="vertical-row" padding="10"> <div x="2%" y="1%" width="96%" height="98%" layout="vertical-row" padding="10">
<header id="selected_track" width="80%" height="30" <header id="selected_track" width="80%"
I18N="No neeed to translate this, it will be overwritten by the track name" I18N="No neeed to translate this, it will be overwritten by the track name"
text="" align="center" text_align="center" /> text="" align="center" text_align="center" />
<spacer height="20" /> <spacer height="20" />
<!-- Track selection --> <!-- Track selection -->
<box width="100%" height="60%" layout="vertical-row"> <box proportion="3" width="100%" layout="vertical-row">
<ribbon_grid id="tracks" proportion="1" width="100%" height="100%" square_items="true" <ribbon_grid id="tracks" proportion="1" width="100%" square_items="true"
label_location="each" align="center" child_width="240" child_height="160" /> label_location="each" align="center" max_rows="2" child_width="160"
child_height="120"/>
</box> </box>
<!-- Populated dynamically at runtime --> <!-- Populated dynamically at runtime -->
<tabs width="100%" height="5%" id="trackgroups"> </tabs> <tabs width="100%" height="5%" id="trackgroups"> </tabs>
<spacer height="50" /> <spacer height="10%" />
<!-- Laps and reverse --> <!-- Laps and reverse -->
<div width="100%" height="100" layout="horizontal-row" align="center"> <div width="100%" height="fit" layout="horizontal-row" align="center">
<spacer proportion="1" /> <spacer proportion="1" />
@ -40,8 +41,10 @@
<spacer proportion="1" /> <spacer proportion="1" />
</div> </div>
<spacer height="5%" />
<!-- Dialog buttons --> <!-- Dialog buttons -->
<div width="100%" height="60" layout="horizontal-row"> <div width="100%" height="fit" layout="horizontal-row">
<spacer proportion="2" /> <spacer proportion="2" />
<button id="ok" text="OK" proportion="1" /> <button id="ok" text="OK" proportion="1" />
<spacer proportion="1" /> <spacer proportion="1" />
@ -49,5 +52,7 @@
<spacer proportion="2" /> <spacer proportion="2" />
</div> </div>
<spacer height="2%" />
</div> </div>
</stkgui> </stkgui>

View File

@ -7,9 +7,9 @@
<header width="80%" I18N="Title in grand prix editor screen" text="Grand Prix editor" <header width="80%" I18N="Title in grand prix editor screen" text="Grand Prix editor"
align="center" text_align="center" /> align="center" text_align="center" />
<spacer height="20" /> <spacer height="10" />
<box proportion="4" width="100%" layout="vertical-row"> <box proportion="8" width="100%" layout="vertical-row">
<ribbon_grid id="gplist" proportion="1" width="100%" square_items="true" <ribbon_grid id="gplist" proportion="1" width="100%" square_items="true"
label_location="each" align="left" max_rows="2" child_width="160" label_location="each" align="left" max_rows="2" child_width="160"
child_height="120" keep_selection="true" /> child_height="120" keep_selection="true" />
@ -20,7 +20,7 @@
<spacer height="20" /> <spacer height="20" />
<box proportion="2" width="100%" layout="vertical-row"> <box proportion="5" width="100%" layout="vertical-row">
<label id="gpname" text_align="center" width="100%" text="" /> <label id="gpname" text_align="center" width="100%" text="" />
<ribbon_grid id="tracks" proportion="1" width="100%" square_items="true" <ribbon_grid id="tracks" proportion="1" width="100%" square_items="true"
label_location="each" align="left" max_rows="1" label_location="each" align="left" max_rows="1"
@ -29,7 +29,7 @@
<spacer height="20" /> <spacer height="20" />
<buttonbar proportion="1" id="menu" height="135" width="100%" align="center"> <buttonbar proportion="3" id="menu" height="135" width="100%" align="center">
<icon-button id="new" width="128" height="128" icon="gui/gp_new.png" <icon-button id="new" width="128" height="128" icon="gui/gp_new.png"
I18N="Menu item" text="New" /> I18N="Menu item" text="New" />
<icon-button id="copy" width="128" height="128" icon="gui/gp_copy.png" <icon-button id="copy" width="128" height="128" icon="gui/gp_copy.png"