fix(desktop): make text rendering nicer

This commit is contained in:
Anna 2020-11-21 14:15:01 -05:00
parent 52ca110ccf
commit 952e10b9dc
15 changed files with 237 additions and 203 deletions

View File

@ -67,12 +67,7 @@ namespace XIVChat_Desktop {
this.UpdateTheme();
FrameworkElement.LanguageProperty.OverrideMetadata(
typeof(FrameworkElement),
new FrameworkPropertyMetadata(
XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag)
)
);
LocaliseAllElements();
// I guess this gets initialised where you call it the first time, so initialise it on the UI thread
this.Dispatcher.Invoke(() => { });
@ -88,6 +83,15 @@ namespace XIVChat_Desktop {
this.InitialiseWindow();
}
private static void LocaliseAllElements() {
FrameworkElement.LanguageProperty.OverrideMetadata(
typeof(FrameworkElement),
new FrameworkPropertyMetadata(
XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag)
)
);
}
public void InitialiseWindow() {
var wnd = new MainWindow();
this.Window = wnd;

View File

@ -1,20 +1,19 @@
<Window x:Class="XIVChat_Desktop.ConfigWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:XIVChat_Desktop"
xmlns:cc="clr-namespace:XIVChat_Desktop.Controls"
xmlns:ui="http://schemas.modernwpf.com/2019"
ui:WindowHelper.UseModernWindowStyle="True"
mc:Ignorable="d"
MinWidth="450"
MinHeight="350"
WindowStartupLocation="CenterOwner"
ContentRendered="ConfigWindow_OnContentRendered"
SizeToContent="WidthAndHeight"
Title="Configuration"
d:DataContext="{d:DesignInstance local:ConfigWindow}">
<local:XivChatWindow x:Class="XIVChat_Desktop.ConfigWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:XIVChat_Desktop"
xmlns:cc="clr-namespace:XIVChat_Desktop.Controls"
xmlns:ui="http://schemas.modernwpf.com/2019"
ui:WindowHelper.UseModernWindowStyle="True"
mc:Ignorable="d"
MinWidth="450"
MinHeight="350"
WindowStartupLocation="CenterOwner"
SizeToContent="WidthAndHeight"
Title="Configuration"
d:DataContext="{d:DesignInstance local:ConfigWindow}">
<TabControl>
<TabItem Header="Servers">
<cc:SavedServers ItemsSource="{Binding Config.Servers}"
@ -86,4 +85,4 @@
</Grid>
</TabItem>
</TabControl>
</Window>
</local:XivChatWindow>

View File

@ -1,20 +1,19 @@
<Window x:Class="XIVChat_Desktop.ConnectDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:XIVChat_Desktop"
xmlns:cc="clr-namespace:XIVChat_Desktop.Controls"
xmlns:ui="http://schemas.modernwpf.com/2019"
ui:WindowHelper.UseModernWindowStyle="True"
mc:Ignorable="d"
ContentRendered="ConnectDialog_OnContentRendered"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
ResizeMode="CanResizeWithGrip"
ShowInTaskbar="False"
Title="Connect"
d:DataContext="{d:DesignInstance local:ConnectDialog}">
<local:XivChatWindow x:Class="XIVChat_Desktop.ConnectDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:XIVChat_Desktop"
xmlns:cc="clr-namespace:XIVChat_Desktop.Controls"
xmlns:ui="http://schemas.modernwpf.com/2019"
ui:WindowHelper.UseModernWindowStyle="True"
mc:Ignorable="d"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
ResizeMode="CanResizeWithGrip"
ShowInTaskbar="False"
Title="Connect"
d:DataContext="{d:DesignInstance local:ConnectDialog}">
<Grid Margin="16">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@ -41,4 +40,4 @@
</Button>
</WrapPanel>
</Grid>
</Window>
</local:XivChatWindow>

View File

@ -1,20 +1,18 @@
<Window x:Class="XIVChat_Desktop.Export"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:XIVChat_Desktop"
xmlns:cc="clr-namespace:XIVChat_Desktop.Controls"
xmlns:xiv="clr-namespace:XIVChatCommon;assembly=XIVChatCommon"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:sdl="http://schemas.sdl.com/xaml"
ui:WindowHelper.UseModernWindowStyle="True"
mc:Ignorable="d"
Title="Export"
x:Name="Main"
d:DataContext="{d:DesignInstance local:Export}"
Height="600"
Width="800">
<local:XivChatWindow x:Class="XIVChat_Desktop.Export"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:XIVChat_Desktop"
xmlns:cc="clr-namespace:XIVChat_Desktop.Controls"
xmlns:ui="http://schemas.modernwpf.com/2019"
ui:WindowHelper.UseModernWindowStyle="True"
mc:Ignorable="d"
Title="Export"
x:Name="Main"
d:DataContext="{d:DesignInstance local:Export}"
Height="600"
Width="800">
<Grid Margin="8">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
@ -149,4 +147,4 @@
HorizontalAlignment="Right" />
</Grid>
</Grid>
</Window>
</local:XivChatWindow>

View File

@ -1,20 +1,20 @@
<Window x:Class="XIVChat_Desktop.FriendList"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:XIVChat_Desktop"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:message="clr-namespace:XIVChatCommon.Message;assembly=XIVChatCommon"
ui:WindowHelper.UseModernWindowStyle="True"
mc:Ignorable="d"
Title="Friend list"
WindowStartupLocation="CenterOwner"
Height="400"
Width="700"
x:Name="Main"
Closed="FriendList_OnClosed"
d:DataContext="{d:DesignInstance local:FriendList}">
<local:XivChatWindow x:Class="XIVChat_Desktop.FriendList"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:XIVChat_Desktop"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:message="clr-namespace:XIVChatCommon.Message;assembly=XIVChatCommon"
ui:WindowHelper.UseModernWindowStyle="True"
mc:Ignorable="d"
Title="Friend list"
WindowStartupLocation="CenterOwner"
Height="400"
Width="700"
x:Name="Main"
Closed="FriendList_OnClosed"
d:DataContext="{d:DesignInstance local:FriendList}">
<Grid Margin="8">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
@ -85,4 +85,4 @@
Margin="0,8,0,0"
Click="Refresh_Click" />
</Grid>
</Window>
</local:XivChatWindow>

View File

@ -1,17 +1,16 @@
<Window x:Class="XIVChat_Desktop.LicenceWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:XIVChat_Desktop"
xmlns:ui="http://schemas.modernwpf.com/2019"
ui:WindowHelper.UseModernWindowStyle="True"
mc:Ignorable="d"
Title="Licence"
WindowStartupLocation="CenterOwner"
ContentRendered="LicenceWindow_OnContentRendered"
SizeToContent="WidthAndHeight"
d:DataContext="{d:DesignInstance local:LicenceWindow}">
<local:XivChatWindow x:Class="XIVChat_Desktop.LicenceWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:XIVChat_Desktop"
xmlns:ui="http://schemas.modernwpf.com/2019"
ui:WindowHelper.UseModernWindowStyle="True"
mc:Ignorable="d"
Title="Licence"
WindowStartupLocation="CenterOwner"
SizeToContent="WidthAndHeight"
d:DataContext="{d:DesignInstance local:LicenceWindow}">
<StackPanel Margin="8">
<ProgressBar x:Name="Loading"
IsIndeterminate="True" />
@ -29,4 +28,4 @@
IsEnabled="False" />
</StackPanel>
</StackPanel>
</Window>
</local:XivChatWindow>

View File

@ -1,24 +1,24 @@
<Window x:Class="XIVChat_Desktop.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:XIVChat_Desktop"
xmlns:cc="clr-namespace:XIVChat_Desktop.Controls"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:server="clr-namespace:XIVChatCommon.Message.Server;assembly=XIVChatCommon"
ui:WindowHelper.UseModernWindowStyle="True"
ui:TitleBar.ExtendViewIntoTitleBar="{Binding App.Config.CompactMode}"
mc:Ignorable="d"
Title="XIVChat for Windows"
Height="450"
Width="800"
x:Name="Main"
WindowStyle="None"
AllowsTransparency="True"
Opacity="{Binding App.Config.Opacity}"
Icon="/Resources/logo.ico"
d:DataContext="{d:DesignInstance local:MainWindow}">
<local:XivChatWindow x:Class="XIVChat_Desktop.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:XIVChat_Desktop"
xmlns:cc="clr-namespace:XIVChat_Desktop.Controls"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:server="clr-namespace:XIVChatCommon.Message.Server;assembly=XIVChatCommon"
ui:WindowHelper.UseModernWindowStyle="True"
ui:TitleBar.ExtendViewIntoTitleBar="{Binding App.Config.CompactMode}"
mc:Ignorable="d"
Title="XIVChat for Windows"
Height="450"
Width="800"
x:Name="Main"
WindowStyle="None"
AllowsTransparency="True"
Opacity="{Binding App.Config.Opacity}"
Icon="/Resources/logo.ico"
d:DataContext="{d:DesignInstance local:MainWindow}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@ -208,4 +208,4 @@
Visibility="Collapsed" />
</StatusBar>
</Grid>
</Window>
</local:XivChatWindow>

View File

@ -1,17 +1,16 @@
<Window x:Class="XIVChat_Desktop.ManageServer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:XIVChat_Desktop"
mc:Ignorable="d"
xmlns:ui="http://schemas.modernwpf.com/2019"
ui:WindowHelper.UseModernWindowStyle="True"
WindowStartupLocation="CenterOwner"
SizeToContent="WidthAndHeight"
ContentRendered="ManageServer_OnContentRendered"
Title="Manage server"
d:DataContext="{d:DesignInstance local:ManageServer}">
<local:XivChatWindow x:Class="XIVChat_Desktop.ManageServer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:XIVChat_Desktop"
mc:Ignorable="d"
xmlns:ui="http://schemas.modernwpf.com/2019"
ui:WindowHelper.UseModernWindowStyle="True"
WindowStartupLocation="CenterOwner"
SizeToContent="WidthAndHeight"
Title="Manage server"
d:DataContext="{d:DesignInstance local:ManageServer}">
<Grid Margin="8">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@ -75,4 +74,4 @@
</Button>
</WrapPanel>
</Grid>
</Window>
</local:XivChatWindow>

View File

@ -1,17 +1,17 @@
<Window x:Class="XIVChat_Desktop.ManageTab"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:XIVChat_Desktop"
xmlns:ui="http://schemas.modernwpf.com/2019"
ui:WindowHelper.UseModernWindowStyle="True"
WindowStartupLocation="CenterOwner"
mc:Ignorable="d"
Title="Manage tab"
Height="450"
Width="400"
d:DataContext="{d:DesignInstance local:ManageTab}">
<local:XivChatWindow x:Class="XIVChat_Desktop.ManageTab"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:XIVChat_Desktop"
xmlns:ui="http://schemas.modernwpf.com/2019"
ui:WindowHelper.UseModernWindowStyle="True"
WindowStartupLocation="CenterOwner"
mc:Ignorable="d"
Title="Manage tab"
Height="450"
Width="400"
d:DataContext="{d:DesignInstance local:ManageTab}">
<Grid Margin="8">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@ -38,4 +38,4 @@
Content="Save"
Click="Save_Click" />
</Grid>
</Window>
</local:XivChatWindow>

View File

@ -1,31 +1,50 @@
<Window x:Class="XIVChat_Desktop.ManageTabs"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:XIVChat_Desktop"
xmlns:ui="http://schemas.modernwpf.com/2019"
ui:WindowHelper.UseModernWindowStyle="True"
WindowStartupLocation="CenterOwner"
mc:Ignorable="d"
Title="Manage tabs" Height="250" Width="400"
d:DataContext="{d:DesignInstance local:ManageTabs}">
<local:XivChatWindow x:Class="XIVChat_Desktop.ManageTabs"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:XIVChat_Desktop"
xmlns:ui="http://schemas.modernwpf.com/2019"
ui:WindowHelper.UseModernWindowStyle="True"
WindowStartupLocation="CenterOwner"
mc:Ignorable="d"
Title="Manage tabs"
Height="250"
Width="400"
d:DataContext="{d:DesignInstance local:ManageTabs}">
<Grid Margin="8">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ListView x:Name="Tabs" Grid.Column="0" ItemsSource="{Binding App.Config.Tabs}" MouseDoubleClick="Tab_MouseDoubleClick">
<ListView x:Name="Tabs"
Grid.Column="0"
ItemsSource="{Binding App.Config.Tabs}"
MouseDoubleClick="Tab_MouseDoubleClick">
<ListView.View>
<GridView>
<GridViewColumn Header="Name" DisplayMemberBinding="{Binding Name}"/>
<GridViewColumn Header="Name"
DisplayMemberBinding="{Binding Name}" />
</GridView>
</ListView.View>
</ListView>
<WrapPanel Grid.Column="1" Orientation="Vertical" Margin="8,0,0,0">
<Button HorizontalAlignment="Stretch" Margin="0,0,0,4" Click="AddTab_Click">Add</Button>
<Button HorizontalAlignment="Stretch" Margin="0,0,0,4" Click="EditTab_Click">Edit</Button>
<Button HorizontalAlignment="Stretch" Click="DeleteTab_Click">Delete</Button>
<WrapPanel Grid.Column="1"
Orientation="Vertical"
Margin="8,0,0,0">
<Button HorizontalAlignment="Stretch"
Margin="0,0,0,4"
Click="AddTab_Click">
Add
</Button>
<Button HorizontalAlignment="Stretch"
Margin="0,0,0,4"
Click="EditTab_Click">
Edit
</Button>
<Button HorizontalAlignment="Stretch"
Click="DeleteTab_Click">
Delete
</Button>
</WrapPanel>
</Grid>
</Window>
</local:XivChatWindow>

View File

@ -1,23 +1,23 @@
<Window x:Class="XIVChat_Desktop.ServerScan"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:XIVChat_Desktop"
xmlns:cc="clr-namespace:XIVChat_Desktop.Controls"
mc:Ignorable="d"
xmlns:ui="http://schemas.modernwpf.com/2019"
ui:WindowHelper.UseModernWindowStyle="True"
Title="Server scan"
Closing="ServerScan_OnClosing"
ContentRendered="ServerScan_OnContentRendered"
MinWidth="400"
MinHeight="250"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
ResizeMode="CanResizeWithGrip"
ShowInTaskbar="False"
d:DataContext="{d:DesignInstance local:ServerScan}">
<local:XivChatWindow x:Class="XIVChat_Desktop.ServerScan"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:XIVChat_Desktop"
xmlns:cc="clr-namespace:XIVChat_Desktop.Controls"
mc:Ignorable="d"
xmlns:ui="http://schemas.modernwpf.com/2019"
ui:WindowHelper.UseModernWindowStyle="True"
Title="Server scan"
Closing="ServerScan_OnClosing"
ContentRendered="ServerScan_OnContentRendered"
MinWidth="400"
MinHeight="250"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
ResizeMode="CanResizeWithGrip"
ShowInTaskbar="False"
d:DataContext="{d:DesignInstance local:ServerScan}">
<Grid Margin="8">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@ -41,4 +41,4 @@
Add
</Button>
</Grid>
</Window>
</local:XivChatWindow>

View File

@ -94,7 +94,6 @@ namespace XIVChat_Desktop {
}
private void ServerScan_OnContentRendered(object? sender, EventArgs e) {
this.InvalidateVisual();
this.udpThread ??= Task.Run(this.Scanner);
}

View File

@ -1,16 +1,15 @@
<Window x:Class="XIVChat_Desktop.TrustDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:XIVChat_Desktop"
xmlns:ui="http://schemas.modernwpf.com/2019"
ui:WindowHelper.UseModernWindowStyle="True"
SizeToContent="WidthAndHeight"
ContentRendered="TrustDialog_OnContentRendered"
WindowStartupLocation="CenterOwner"
mc:Ignorable="d"
Title="Key verification">
<local:XivChatWindow x:Class="XIVChat_Desktop.TrustDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:XIVChat_Desktop"
xmlns:ui="http://schemas.modernwpf.com/2019"
ui:WindowHelper.UseModernWindowStyle="True"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
mc:Ignorable="d"
Title="Key verification">
<Grid Margin="8">
<Grid.RowDefinitions>
@ -139,4 +138,4 @@
<Button Click="No_Click">No</Button>
</WrapPanel>
</Grid>
</Window>
</local:XivChatWindow>

View File

@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Windows.Threading;
using Windows.UI.Xaml.Data;
namespace XIVChat_Desktop {
public static class Util {

View File

@ -0,0 +1,20 @@
using System;
using System.Windows;
using System.Windows.Media;
namespace XIVChat_Desktop {
public class XivChatWindow : Window {
// ReSharper disable once MemberCanBeProtected.Global
public XivChatWindow() {
this.SetValue(TextOptions.TextRenderingModeProperty, TextRenderingMode.Auto);
this.SetValue(TextOptions.TextFormattingModeProperty, TextFormattingMode.Display);
this.SetValue(TextOptions.TextHintingModeProperty, TextHintingMode.Fixed);
this.ContentRendered += this.FixRendering;
}
private void FixRendering(object? sender, EventArgs eventArgs) {
this.InvalidateVisual();
}
}
}