/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v3.2.4
src/Files.App/App.xaml
96 строк
6 KB
0x5bfa
Fix: Fixed high contrast support in menu flyouts (#14664)
09 фев 2024, 18:40
Не верифицирован
09 фев 2024, 18:40
9914ebb
Код
Авторство
О чём код?
<!-- Copyright (c) 2023 Files Community. Licensed under the MIT License. See the LICENSE. --> <Application x:Class="Files.App.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Application.Resources> <ResourceDictionary> <!-- Default list view item height --> <x:Double x:Key="ListItemHeight">36</x:Double> <!-- Default list view item margin --> <x:Double x:Key="ListItemMargin">0</x:Double> <!-- Fix caption buttons background --> <SolidColorBrush x:Key="WindowCaptionBackground" Color="Transparent" /> <SolidColorBrush x:Key="WindowCaptionBackgroundDisabled" Color="Transparent" /> <!-- Workaround for https://github.com/microsoft/microsoft-ui-xaml/issues/5441 --> <x:Double x:Key="MediaTransportControlsMinWidth">50</x:Double> <!-- Workaround for an issue where the shadow was showing on the tab control --> <x:Double x:Key="TabViewShadowDepth">0</x:Double> <CornerRadius x:Key="GridViewThumbnailCornerRadius">2</CornerRadius> <CornerRadius x:Key="DetailsLayoutThumbnailCornerRadius">2</CornerRadius> <!-- Workaround for https://github.com/files-community/Files/issues/13078 --> <Style TargetType="FlyoutPresenter"> <Setter Target="HighContrastAdjustment" Value="None" /> </Style> <Style TargetType="MenuFlyoutPresenter"> <Setter Target="HighContrastAdjustment" Value="None" /> </Style> <ResourceDictionary.MergedDictionaries> <XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" /> <!-- Styles for the custom icons --> <ResourceDictionary Source="ms-appx:///ResourceDictionaries/PathIcons.xaml" /> <ResourceDictionary Source="ms-appx:///UserControls/SideBar/SideBarControls.xaml" /> <ResourceDictionary Source="ms-appx:///ResourceDictionaries/App.Theme.TextBlockStyles.xaml" /> <ResourceDictionary Source="ms-appx:///ResourceDictionaries/MenuFlyoutSubItemWithImageStyle.xaml" /> <ResourceDictionary> <ResourceDictionary.ThemeDictionaries> <ResourceDictionary x:Key="Light"> <SolidColorBrush x:Key="App.Theme.BackgroundBrush" Color="Transparent" /> <SolidColorBrush x:Key="App.Theme.AddressBar.BackgroundBrush" Color="{StaticResource LayerOnMicaBaseAltFillColorDefault}" /> <SolidColorBrush x:Key="App.Theme.Sidebar.BackgroundBrush" Color="{StaticResource LayerOnMicaBaseAltFillColorDefault}" /> <SolidColorBrush x:Key="App.Theme.FileArea.BackgroundBrush" Color="#C0FCFCFC" /> <SolidColorBrush x:Key="TabViewItemHeaderBackground" Color="{StaticResource SubtleFillColorTransparent}" /> <SolidColorBrush x:Key="TabViewItemHeaderBackgroundSelected" Color="{StaticResource LayerOnMicaBaseAltFillColorDefault}" /> <SolidColorBrush x:Key="TabViewItemHeaderBackgroundPressed" Color="{StaticResource SubtleFillColorTertiary}" /> <SolidColorBrush x:Key="TabViewItemHeaderBackgroundPointerOver" Color="{StaticResource SubtleFillColorSecondary}" /> <Color x:Key="App.Theme.FillColorAttention">#0070CB</Color> <SolidColorBrush x:Key="App.Theme.FillColorAttentionBrush" Color="{StaticResource App.Theme.FillColorAttention}" /> </ResourceDictionary> <ResourceDictionary x:Key="Dark"> <SolidColorBrush x:Key="App.Theme.BackgroundBrush" Color="Transparent" /> <SolidColorBrush x:Key="App.Theme.AddressBar.BackgroundBrush" Color="{StaticResource LayerOnMicaBaseAltFillColorDefault}" /> <SolidColorBrush x:Key="App.Theme.Sidebar.BackgroundBrush" Color="{StaticResource LayerOnMicaBaseAltFillColorDefault}" /> <SolidColorBrush x:Key="App.Theme.FileArea.BackgroundBrush" Color="#10f9f9f9" /> <SolidColorBrush x:Key="TabViewItemHeaderBackground" Color="{StaticResource SubtleFillColorTransparent}" /> <SolidColorBrush x:Key="TabViewItemHeaderBackgroundSelected" Color="{StaticResource LayerOnMicaBaseAltFillColorDefault}" /> <SolidColorBrush x:Key="TabViewItemHeaderBackgroundPressed" Color="{StaticResource SubtleFillColorTertiary}" /> <SolidColorBrush x:Key="TabViewItemHeaderBackgroundPointerOver" Color="{StaticResource SubtleFillColorSecondary}" /> <Color x:Key="App.Theme.FillColorAttention">#50C0FF</Color> <SolidColorBrush x:Key="App.Theme.FillColorAttentionBrush" Color="{StaticResource App.Theme.FillColorAttention}" /> </ResourceDictionary> <ResourceDictionary x:Key="HighContrast"> <SolidColorBrush x:Key="App.Theme.BackgroundBrush" Color="Transparent" /> <SolidColorBrush x:Key="App.Theme.AddressBar.BackgroundBrush" Color="Transparent" /> <SolidColorBrush x:Key="App.Theme.Sidebar.BackgroundBrush" Color="Transparent" /> <SolidColorBrush x:Key="App.Theme.FileArea.BackgroundBrush" Color="Transparent" /> <SolidColorBrush x:Key="TabViewItemHeaderBackground" Color="{StaticResource SystemColorWindowColor}" /> <SolidColorBrush x:Key="TabViewItemHeaderBackgroundSelected" Color="{StaticResource SystemColorHighlightColor}" /> <SolidColorBrush x:Key="TabViewItemHeaderBackgroundPressed" Color="{StaticResource SystemColorHighlightColor}" /> <SolidColorBrush x:Key="TabViewItemHeaderBackgroundPointerOver" Color="{StaticResource SystemColorHighlightColor}" /> <Color x:Key="App.Theme.FillColorAttention">#50C0FF</Color> <SolidColorBrush x:Key="App.Theme.FillColorAttentionBrush" Color="{StaticResource App.Theme.FillColorAttention}" /> </ResourceDictionary> </ResourceDictionary.ThemeDictionaries> </ResourceDictionary> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources> </Application>