some fixes and default resources

This commit is contained in:
2022-10-15 03:14:16 +06:00
parent 89ddbc19d9
commit e31df8e029
25 changed files with 97 additions and 38 deletions

View File

@@ -18,7 +18,13 @@
<Style Selector="TextBox.MyTextBoxStyle" />
<Style Selector="Label.MyLabelStyle" />
<Style Selector="Button.MyButtonStyle" />
<Style Selector="Button.MyButtonStyle" >
<Setter Property="Background" Value="Transparent"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
</Application.Styles>
</Application>

View File

@@ -8,7 +8,7 @@
MinWidth="800"
MinHeight="500"
Background="{DynamicResource MyBackgroundColor}">
<Grid ColumnDefinitions="5,*,5" RowDefinitions="5,40,5,*,5">
<Grid ColumnDefinitions="5,*,5" RowDefinitions="5,35,5,*,5">
<Image x:Name="BackgroundImage"
Grid.RowSpan="5"
Grid.ColumnSpan="3"

View File

@@ -5,9 +5,6 @@ public partial class MessageBox : Window
public MessageBox()
{
InitializeComponent();
#if DEBUG
this.AttachDevTools();
#endif
}
public static void Show(string title, string text)

View File

@@ -1,11 +1,17 @@
namespace Launcher.Client.Avalonia.GUI;
using Avalonia.Styling;
public class TabButton : Button
namespace Launcher.Client.Avalonia.GUI;
public partial class TabButton : Button, IStyleable
{
Type IStyleable.StyleKey => typeof(Button);
public static readonly StyledProperty<Grid> TabGridProp = AvaloniaProperty.Register<TabButton, Grid>("TabGrid");
public Grid TabGrid
{
get => GetValue(TabGridProp);
set => SetValue(TabGridProp, value);
}
public TabButton() :base() {}
}