mirror of
https://github.com/microsoft/PowerToys
synced 2025-08-30 05:57:42 +00:00
More fixes
This commit is contained in:
parent
9890c0b935
commit
07a29f351b
@ -36,17 +36,17 @@
|
|||||||
Stretch="Uniform">
|
Stretch="Uniform">
|
||||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||||
</Viewbox>
|
</Viewbox>
|
||||||
<TextBlock
|
<StackPanel
|
||||||
|
Grid.Column="1"
|
||||||
Margin="12,0,0,0"
|
Margin="12,0,0,0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center">
|
||||||
TextTrimming="CharacterEllipsis">
|
<TextBlock Text="{x:Bind Header}" />
|
||||||
<Run Text="{x:Bind Header}" />
|
<TextBlock
|
||||||
<LineBreak />
|
|
||||||
<Run
|
|
||||||
FontSize="12"
|
FontSize="12"
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||||
Text="{x:Bind Subtitle}" />
|
Text="{x:Bind Subtitle}"
|
||||||
</TextBlock>
|
Visibility="{x:Bind Subtitle, Converter={StaticResource StringVisibilityConverter}}" />
|
||||||
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate x:Key="NoResultSearchResultTemplate" x:DataType="models:SuggestionItem">
|
<DataTemplate x:Key="NoResultSearchResultTemplate" x:DataType="models:SuggestionItem">
|
||||||
@ -69,7 +69,10 @@
|
|||||||
<RowDefinition Height="48" />
|
<RowDefinition Height="48" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<tkcontrols:TitleBar x:Name="AppTitleBar" PaneButtonClick="PaneToggleBtn_Click">
|
<tkcontrols:TitleBar
|
||||||
|
x:Name="AppTitleBar"
|
||||||
|
AutoConfigureCustomTitleBar="True"
|
||||||
|
PaneButtonClick="PaneToggleBtn_Click">
|
||||||
<tkcontrols:TitleBar.Icon>
|
<tkcontrols:TitleBar.Icon>
|
||||||
<BitmapIcon ShowAsMonochrome="False" UriSource="/Assets/Settings/icon.ico" />
|
<BitmapIcon ShowAsMonochrome="False" UriSource="/Assets/Settings/icon.ico" />
|
||||||
</tkcontrols:TitleBar.Icon>
|
</tkcontrols:TitleBar.Icon>
|
||||||
@ -77,7 +80,6 @@
|
|||||||
<AutoSuggestBox
|
<AutoSuggestBox
|
||||||
x:Name="SearchBox"
|
x:Name="SearchBox"
|
||||||
x:Uid="Shell_SearchBox"
|
x:Uid="Shell_SearchBox"
|
||||||
Width="400"
|
|
||||||
MinWidth="0"
|
MinWidth="0"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
|
@ -43,7 +43,6 @@ namespace Microsoft.PowerToys.Settings.UI
|
|||||||
{
|
{
|
||||||
var bootTime = new Stopwatch();
|
var bootTime = new Stopwatch();
|
||||||
bootTime.Start();
|
bootTime.Start();
|
||||||
SetTitleBar();
|
|
||||||
this.Activated += Window_Activated_SetIcon;
|
this.Activated += Window_Activated_SetIcon;
|
||||||
|
|
||||||
App.ThemeService.ThemeChanged += OnThemeChanged;
|
App.ThemeService.ThemeChanged += OnThemeChanged;
|
||||||
@ -176,6 +175,7 @@ namespace Microsoft.PowerToys.Settings.UI
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.InitializeComponent();
|
this.InitializeComponent();
|
||||||
|
SetTitleBar();
|
||||||
|
|
||||||
// receive IPC Message
|
// receive IPC Message
|
||||||
App.IPCMessageReceivedCallback = (string msg) =>
|
App.IPCMessageReceivedCallback = (string msg) =>
|
||||||
@ -209,10 +209,14 @@ namespace Microsoft.PowerToys.Settings.UI
|
|||||||
|
|
||||||
private void SetTitleBar()
|
private void SetTitleBar()
|
||||||
{
|
{
|
||||||
ExtendsContentIntoTitleBar = true;
|
AppTitleBar.Window = this;
|
||||||
AppWindow.TitleBar.PreferredHeightOption = TitleBarHeightOption.Tall;
|
|
||||||
WindowHelpers.ForceTopBorder1PixelInsetOnWindows10(WindowNative.GetWindowHandle(this));
|
WindowHelpers.ForceTopBorder1PixelInsetOnWindows10(WindowNative.GetWindowHandle(this));
|
||||||
SetTitleBar(AppTitleBar);
|
var loader = ResourceLoaderInstance.ResourceLoader;
|
||||||
|
AppTitleBar.Title = App.IsElevated ? loader.GetString("SettingsWindow_AdminTitle") : loader.GetString("SettingsWindow_Title");
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
AppTitleBar.Subtitle = "Debug";
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
private void NavigationView_DisplayModeChanged(NavigationView sender, NavigationViewDisplayModeChangedEventArgs args)
|
private void NavigationView_DisplayModeChanged(NavigationView sender, NavigationViewDisplayModeChangedEventArgs args)
|
||||||
@ -292,14 +296,6 @@ namespace Microsoft.PowerToys.Settings.UI
|
|||||||
private void ShellPage_Loaded(object sender, RoutedEventArgs e)
|
private void ShellPage_Loaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
shellPage.NavView.DisplayModeChanged += NavigationView_DisplayModeChanged;
|
shellPage.NavView.DisplayModeChanged += NavigationView_DisplayModeChanged;
|
||||||
|
|
||||||
var loader = ResourceLoaderInstance.ResourceLoader;
|
|
||||||
AppTitleBar.Title = App.IsElevated ? loader.GetString("SettingsWindow_AdminTitle") : loader.GetString("SettingsWindow_Title");
|
|
||||||
|
|
||||||
#if DEBUG
|
|
||||||
AppTitleBar.Subtitle = "Debug";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
_searchService = new FuzzSearchService<NavigationViewItem>(shellPage.ViewModel.NavItems, (NavigationViewItem item) => item.Content.ToString());
|
_searchService = new FuzzSearchService<NavigationViewItem>(shellPage.ViewModel.NavItems, (NavigationViewItem item) => item.Content.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user