mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
[General]Display in titlebar/tray if running as admin (#28425)
* display in titlebar if running as admin * show run as admin in tray tooltip
This commit is contained in:
committed by
GitHub
parent
63975600f1
commit
ebd051ff61
@@ -50,8 +50,8 @@ namespace Microsoft.PowerToys.Settings.UI
|
||||
|
||||
NativeMethods.SetWindowPlacement(hWnd, ref placement);
|
||||
|
||||
var loader = Helpers.ResourceLoaderInstance.ResourceLoader;
|
||||
Title = loader.GetString("SettingsWindow_Title");
|
||||
var loader = ResourceLoaderInstance.ResourceLoader;
|
||||
Title = App.IsElevated ? loader.GetString("SettingsWindow_AdminTitle") : loader.GetString("SettingsWindow_Title");
|
||||
|
||||
// send IPC Message
|
||||
ShellPage.SetDefaultSndMessageCallback(msg =>
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
Source="/Assets/Settings/icon.ico" />
|
||||
<TextBlock
|
||||
x:Name="AppTitleBarText"
|
||||
x:Uid="SettingsWindow_TitleTxt"
|
||||
Margin="12,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
|
||||
@@ -373,6 +373,8 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
// https://docs.microsoft.com/windows/apps/develop/title-bar?tabs=winui3#full-customization
|
||||
u.ExtendsContentIntoTitleBar = true;
|
||||
u.SetTitleBar(AppTitleBar);
|
||||
var loader = ResourceLoaderInstance.ResourceLoader;
|
||||
AppTitleBarText.Text = App.IsElevated ? loader.GetString("SettingsWindow_AdminTitle") : loader.GetString("SettingsWindow_Title");
|
||||
#if DEBUG
|
||||
DebugMessage.Visibility = Visibility.Visible;
|
||||
#endif
|
||||
|
||||
@@ -2152,6 +2152,7 @@ From there, simply click on one of the supported files in the File Explorer and
|
||||
</data>
|
||||
<data name="SettingsWindow_Title" xml:space="preserve">
|
||||
<value>PowerToys Settings</value>
|
||||
<comment>Title of the settings window when running as user</comment>
|
||||
</data>
|
||||
<data name="Awake.ModuleTitle" xml:space="preserve">
|
||||
<value>Awake</value>
|
||||
@@ -3612,9 +3613,6 @@ Activate by holding the key for the character you want to add an accent to, then
|
||||
<value>Maximum width (px)</value>
|
||||
<comment>px = pixels</comment>
|
||||
</data>
|
||||
<data name="SettingsWindow_TitleTxt.Text" xml:space="preserve">
|
||||
<value>PowerToys Settings</value>
|
||||
</data>
|
||||
<data name="Oobe_Peek.Description" xml:space="preserve">
|
||||
<value>A lightning fast file preview feature for Windows.</value>
|
||||
</data>
|
||||
@@ -3674,4 +3672,8 @@ Activate by holding the key for the character you want to add an accent to, then
|
||||
<data name="MouseUtils_FindMyMouse_ActivationShortcut.Header" xml:space="preserve">
|
||||
<value>Activation shortcut</value>
|
||||
</data>
|
||||
<data name="SettingsWindow_AdminTitle" xml:space="preserve">
|
||||
<value>Administrator: PowerToys Settings</value>
|
||||
<comment>Title of the settings window when running as administrator</comment>
|
||||
</data>
|
||||
</root>
|
||||
Reference in New Issue
Block a user