mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-23 19:49:43 +01:00
Add some tooltips, and tighten up some phrasing (#555)
* Tags have their tooltip default to their text, if no `ToolTip` is explicitly set * add a `ctrl+k` tooltip to the more commands button * change the naming of "indexer" to be "file search" (which is what folks really care about) * change the naming of "shell commands" to be "Run commands" (again, this is more intuitive)
This commit is contained in:
@@ -106,7 +106,7 @@ namespace Microsoft.CmdPal.Ext.Shell.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Shell.
|
||||
/// Looks up a localized string similar to Run commands.
|
||||
/// </summary>
|
||||
public static string cmd_plugin_name {
|
||||
get {
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="cmd_plugin_name" xml:space="preserve">
|
||||
<value>Shell</value>
|
||||
<value>Run commands</value>
|
||||
</data>
|
||||
<data name="cmd_plugin_description" xml:space="preserve">
|
||||
<value>Executes commands (e.g. 'ping', 'cmd')</value>
|
||||
|
||||
@@ -11,11 +11,13 @@ public partial class TagViewModel(ITag _tag, IPageContext context) : ExtensionOb
|
||||
{
|
||||
private readonly ExtensionObject<ITag> _tagModel = new(_tag);
|
||||
|
||||
public string ToolTip => string.IsNullOrEmpty(ModelToolTip) ? Text : ModelToolTip;
|
||||
|
||||
// Remember - "observable" properties from the model (via PropChanged)
|
||||
// cannot be marked [ObservableProperty]
|
||||
public string Text { get; private set; } = string.Empty;
|
||||
|
||||
public string ToolTip { get; private set; } = string.Empty;
|
||||
public string ModelToolTip { get; private set; } = string.Empty;
|
||||
|
||||
public OptionalColor Foreground { get; private set; }
|
||||
|
||||
@@ -36,7 +38,7 @@ public partial class TagViewModel(ITag _tag, IPageContext context) : ExtensionOb
|
||||
Text = model.Text;
|
||||
Foreground = model.Foreground;
|
||||
Background = model.Background;
|
||||
ToolTip = model.ToolTip;
|
||||
ModelToolTip = model.ToolTip;
|
||||
Icon = new(model.Icon);
|
||||
Icon.InitializeProperties();
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
FontSize="12"
|
||||
Text="{x:Bind CurrentPageViewModel.Title, Mode=OneWay}"
|
||||
Visibility="{x:Bind CurrentPageViewModel.IsNested, Mode=OneWay}" />
|
||||
<!-- TO DO: Replace with ItemsRepeater and bind "Primary commands"? -->
|
||||
|
||||
<StackPanel
|
||||
Grid.Column="2"
|
||||
HorizontalAlignment="Right"
|
||||
@@ -230,6 +230,7 @@
|
||||
Content="{ui:FontIcon Glyph=,
|
||||
FontSize=16}"
|
||||
Style="{StaticResource SubtleButtonStyle}"
|
||||
ToolTipService.ToolTip="Ctrl+k"
|
||||
Visibility="{x:Bind ViewModel.ShouldShowContextMenu, Mode=OneWay}">
|
||||
<Button.Flyout>
|
||||
<Flyout Placement="TopEdgeAlignedRight">
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
<!-- https://learn.microsoft.com/windows/apps/design/controls/itemsview#specify-the-look-of-the-items -->
|
||||
<DataTemplate x:Key="ListItemViewModelTemplate" x:DataType="viewmodels:ListItemViewModel">
|
||||
|
||||
<!-- TODO: collapse item if it's empty -->
|
||||
<Grid Padding="0,12,0,12" ColumnSpacing="12">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="28" />
|
||||
@@ -161,6 +160,5 @@
|
||||
</controls:Case>
|
||||
</controls:SwitchPresenter>
|
||||
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
|
||||
@@ -14,7 +14,9 @@ public partial class IndexerCommandsProvider : CommandProvider
|
||||
|
||||
public IndexerCommandsProvider()
|
||||
{
|
||||
Id = "Files";
|
||||
DisplayName = Resources.IndexerCommandsProvider_DisplayName;
|
||||
Icon = Icons.FileExplorerSegoe;
|
||||
}
|
||||
|
||||
public override ICommandItem[] TopLevelCommands()
|
||||
|
||||
@@ -187,7 +187,7 @@ namespace Microsoft.CmdPal.Ext.Indexer.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Indexer file search commands.
|
||||
/// Looks up a localized string similar to File search.
|
||||
/// </summary>
|
||||
internal static string IndexerCommandsProvider_DisplayName {
|
||||
get {
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="IndexerCommandsProvider_DisplayName" xml:space="preserve">
|
||||
<value>Indexer file search commands</value>
|
||||
<value>File search</value>
|
||||
</data>
|
||||
<data name="Indexer_Command_Browse" xml:space="preserve">
|
||||
<value>Browse</value>
|
||||
|
||||
Reference in New Issue
Block a user