mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
Remove number placeholder in the right of result item.
This commit is contained in:
@@ -12,10 +12,9 @@
|
|||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="32"></ColumnDefinition>
|
<ColumnDefinition Width="32"></ColumnDefinition>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition Width="73.064"></ColumnDefinition>
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image x:Name="imgIco" Width="32" Height="32" HorizontalAlignment="Left" ></Image>
|
<Image x:Name="imgIco" Width="32" Height="32" HorizontalAlignment="Left" ></Image>
|
||||||
<Grid Margin="5 0 0 0" Grid.Column="1">
|
<Grid Margin="5 0 5 0" Grid.Column="1">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*"></RowDefinition>
|
<RowDefinition Height="*"></RowDefinition>
|
||||||
<RowDefinition x:Name="SubTitleRowDefinition"></RowDefinition>
|
<RowDefinition x:Name="SubTitleRowDefinition"></RowDefinition>
|
||||||
@@ -23,9 +22,5 @@
|
|||||||
<TextBlock Style="{DynamicResource ItemTitleStyle}" VerticalAlignment="Center" x:Name="tbTitle">Title</TextBlock>
|
<TextBlock Style="{DynamicResource ItemTitleStyle}" VerticalAlignment="Center" x:Name="tbTitle">Title</TextBlock>
|
||||||
<TextBlock Style="{DynamicResource ItemSubTitleStyle}" Grid.Row="1" x:Name="tbSubTitle">sub title</TextBlock>
|
<TextBlock Style="{DynamicResource ItemSubTitleStyle}" Grid.Row="1" x:Name="tbSubTitle">sub title</TextBlock>
|
||||||
</Grid>
|
</Grid>
|
||||||
<DockPanel Grid.Column="2" Visibility="Hidden">
|
|
||||||
<Image x:Name="img" Source="Images\ctrl.png" VerticalAlignment="Center"/>
|
|
||||||
<TextBlock x:Name="tbIndex" Visibility="Hidden" FontSize="16" Foreground="#5c1f87" Margin="0 5 0 0" Text="1" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
|
||||||
</DockPanel>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -30,24 +30,10 @@ namespace Wox
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
selected = value;
|
selected = value;
|
||||||
if (selected)
|
|
||||||
{
|
|
||||||
img.Visibility = Visibility.Visible;
|
|
||||||
img.Source = new BitmapImage(new Uri(Directory.GetCurrentDirectory() + "\\Images\\enter.png"));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
img.Visibility = Visibility.Hidden;
|
|
||||||
}
|
|
||||||
OnPropertyChanged("Selected");
|
OnPropertyChanged("Selected");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetIndex(int index)
|
|
||||||
{
|
|
||||||
tbIndex.Text = index.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public ResultItem(Result result)
|
public ResultItem(Result result)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ namespace Wox
|
|||||||
if (!CheckExisted(result))
|
if (!CheckExisted(result))
|
||||||
{
|
{
|
||||||
ResultItem control = new ResultItem(result);
|
ResultItem control = new ResultItem(result);
|
||||||
control.SetIndex(i + 1);
|
|
||||||
pnlContainer.Children.Insert(GetInsertLocation(result.Score), control);
|
pnlContainer.Children.Insert(GetInsertLocation(result.Score), control);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user