mirror of
https://github.com/microsoft/PowerToys
synced 2025-08-22 01:58:04 +00:00
More fixes
This commit is contained in:
parent
9890c0b935
commit
07a29f351b
@ -36,17 +36,17 @@
|
||||
Stretch="Uniform">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</Viewbox>
|
||||
<TextBlock
|
||||
<StackPanel
|
||||
Grid.Column="1"
|
||||
Margin="12,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
TextTrimming="CharacterEllipsis">
|
||||
<Run Text="{x:Bind Header}" />
|
||||
<LineBreak />
|
||||
<Run
|
||||
VerticalAlignment="Center">
|
||||
<TextBlock Text="{x:Bind Header}" />
|
||||
<TextBlock
|
||||
FontSize="12"
|
||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||
Text="{x:Bind Subtitle}" />
|
||||
</TextBlock>
|
||||
Text="{x:Bind Subtitle}"
|
||||
Visibility="{x:Bind Subtitle, Converter={StaticResource StringVisibilityConverter}}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="NoResultSearchResultTemplate" x:DataType="models:SuggestionItem">
|
||||
@ -69,7 +69,10 @@
|
||||
<RowDefinition Height="48" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<tkcontrols:TitleBar x:Name="AppTitleBar" PaneButtonClick="PaneToggleBtn_Click">
|
||||
<tkcontrols:TitleBar
|
||||
x:Name="AppTitleBar"
|
||||
AutoConfigureCustomTitleBar="True"
|
||||
PaneButtonClick="PaneToggleBtn_Click">
|
||||
<tkcontrols:TitleBar.Icon>
|
||||
<BitmapIcon ShowAsMonochrome="False" UriSource="/Assets/Settings/icon.ico" />
|
||||
</tkcontrols:TitleBar.Icon>
|
||||
@ -77,7 +80,6 @@
|
||||
<AutoSuggestBox
|
||||
x:Name="SearchBox"
|
||||
x:Uid="Shell_SearchBox"
|
||||
Width="400"
|
||||
MinWidth="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
BorderThickness="1"
|
||||
|
@ -43,7 +43,6 @@ namespace Microsoft.PowerToys.Settings.UI
|
||||
{
|
||||
var bootTime = new Stopwatch();
|
||||
bootTime.Start();
|
||||
SetTitleBar();
|
||||
this.Activated += Window_Activated_SetIcon;
|
||||
|
||||
App.ThemeService.ThemeChanged += OnThemeChanged;
|
||||
@ -176,6 +175,7 @@ namespace Microsoft.PowerToys.Settings.UI
|
||||
});
|
||||
|
||||
this.InitializeComponent();
|
||||
SetTitleBar();
|
||||
|
||||
// receive IPC Message
|
||||
App.IPCMessageReceivedCallback = (string msg) =>
|
||||
@ -209,10 +209,14 @@ namespace Microsoft.PowerToys.Settings.UI
|
||||
|
||||
private void SetTitleBar()
|
||||
{
|
||||
ExtendsContentIntoTitleBar = true;
|
||||
AppWindow.TitleBar.PreferredHeightOption = TitleBarHeightOption.Tall;
|
||||
AppTitleBar.Window = 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)
|
||||
@ -292,14 +296,6 @@ namespace Microsoft.PowerToys.Settings.UI
|
||||
private void ShellPage_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
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());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user