Skip to content

Commit 55000a6

Browse files
committed
Make the frame size of the event button configurable
1 parent f481ed9 commit 55000a6

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

CollapseLauncher/Classes/GameManagement/ImageBackground/ImageBackgroundManager.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,6 @@ private set
302302
}
303303
}
304304

305-
public double DesignWidth => 2560d;
306-
307-
public double DesignHeight => 1440d;
308-
309305
/// <summary>
310306
/// The collection of image context sources.<br/><br/>
311307
/// Notes to Dev:<br/>

CollapseLauncher/Classes/Helper/Metadata/PresetConfig.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
using System.Text.Json.Serialization;
2323
using System.Threading;
2424
using System.Threading.Tasks;
25+
using Windows.Foundation;
2526
using WinRT;
2627
using static Hi3Helper.Logger;
2728
// ReSharper disable InconsistentNaming
@@ -94,6 +95,7 @@ public partial class GameEventButtonPosition
9495

9596
public Thickness Position { get; init; } = new(256, 596, 0, 0);
9697
public double VSize { get; init; } = 80d;
98+
public Size FrameSize { get; init; } = new(2560, 1440);
9799
}
98100

99101
public class GameInstallFileInfo

CollapseLauncher/XAMLs/MainApp/Pages/HomePage.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@
184184
<Grid x:Name="ImageEventImgContainerGrid"
185185
DataContext="{x:Bind CurrentBackgroundManager, Mode=OneWay}"
186186
Visibility="{Binding CurrentSelectedBackgroundContext.IsCustom, Mode=OneWay, Converter={StaticResource InverseBooleanVisibilityConverter}}">
187-
<Grid Width="{Binding DesignWidth, Mode=OneWay}"
188-
Height="{Binding DesignHeight, Mode=OneWay}"
187+
<Grid Width="{x:Bind CurrentPresetConfig.GameEventButtonPosition.FrameSize.Width, Mode=OneWay}"
188+
Height="{x:Bind CurrentPresetConfig.GameEventButtonPosition.FrameSize.Height, Mode=OneWay}"
189189
HorizontalAlignment="Center"
190190
VerticalAlignment="Center">
191191
<Grid x:Name="ImageEventImg"

0 commit comments

Comments
 (0)