Browse Source

Context actions popup has pencil icon.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@6340 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Martin Koníček 16 years ago
parent
commit
e7f82a9a83
  1. 2
      src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
  2. 40
      src/Main/Base/Project/Src/Services/RefactoringService/ContextActions/ContextActionsBulbControl.xaml
  3. 3
      src/Main/Base/Project/Src/Services/RefactoringService/ContextActions/ContextActionsBulbControl.xaml.cs
  4. BIN
      src/Main/Base/Project/Src/Services/RefactoringService/ContextActions/bulb.png
  5. BIN
      src/Main/Base/Project/Src/Services/RefactoringService/ContextActions/pencil.png

2
src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj

@ -364,6 +364,8 @@
<Compile Include="Src\Services\ProjectBinding\IProjectBinding.cs" /> <Compile Include="Src\Services\ProjectBinding\IProjectBinding.cs" />
<Compile Include="Src\Internal\Templates\Project\ProjectCreateInformation.cs" /> <Compile Include="Src\Internal\Templates\Project\ProjectCreateInformation.cs" />
<Compile Include="Src\Services\ProjectBinding\ProjectBindingService.cs" /> <Compile Include="Src\Services\ProjectBinding\ProjectBindingService.cs" />
<Resource Include="Src\Services\RefactoringService\ContextActions\bulb.png" />
<Resource Include="Src\Services\RefactoringService\ContextActions\pencil.png" />
<Resource Include="Src\Services\Debugger\Tooltips\magnifier.png"> <Resource Include="Src\Services\Debugger\Tooltips\magnifier.png">
<CopyToOutputDirectory>Never</CopyToOutputDirectory> <CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Resource> </Resource>

40
src/Main/Base/Project/Src/Services/RefactoringService/ContextActions/ContextActionsBulbControl.xaml

@ -1,11 +1,13 @@
<UserControl x:Class="ICSharpCode.SharpDevelop.Refactoring.ContextActionsBulbControl" <UserControl x:Class="ICSharpCode.SharpDevelop.Refactoring.ContextActionsBulbControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:ICSharpCode.SharpDevelop.Refactoring" xmlns:local="clr-namespace:ICSharpCode.SharpDevelop.Refactoring"
xmlns:aero="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"> xmlns:aero="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero">
<UserControl.Resources> <UserControl.Resources>
<SolidColorBrush x:Key="OuterBorderBrush" Color="#436C82"></SolidColorBrush> <!--<BitmapImage x:Key="BulbImage" UriSource="bulb.png" />-->
<BitmapImage x:Key="PencilImage" UriSource="pencil.png" />
<Geometry x:Key="DownArrowGeometry">M 0 0 L 2 3 L 4 0 Z</Geometry>
</UserControl.Resources> </UserControl.Resources>
<Grid Background="Transparent"> <Grid Background="Transparent">
@ -18,17 +20,31 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- Header --> <!-- Header -->
<Border x:Name="Header" Grid.Row="0" Grid.Column="0" Padding="4" BorderThickness="1" <Border x:Name="Header" Grid.Row="0" Grid.Column="0" Padding="2" BorderThickness="1" CornerRadius="2"
BorderBrush="{StaticResource OuterBorderBrush}" HorizontalAlignment="Left" MouseUp="Header_MouseUp"> BorderBrush="#485763" HorizontalAlignment="Left" MouseUp="Header_MouseUp">
<Border.Background> <Border.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="#D6E9FF" Offset="0"/> <GradientStop Color="#F2F2F2" Offset="0"/>
<GradientStop Color="#A3CEFF" Offset="0.5"/> <GradientStop Color="#FFFFFF" Offset="0.2"/>
</LinearGradientBrush> </LinearGradientBrush>
</Border.Background> </Border.Background>
<StackPanel Orientation="Horizontal"> <Grid>
<TextBlock Text="###"></TextBlock> <Grid.ColumnDefinitions>
</StackPanel> <ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Width="12" Height="12" Stretch="Fill" Source="{StaticResource PencilImage}" />
<!-- <Path Grid.Column="1" x:Name="Arrow" Fill="Black" Margin="0" HorizontalAlignment="Center" VerticalAlignment="Center" Data="{StaticResource DownArrowGeometry}"/>-->
</Grid>
<!--<Border.Style>
<Style TargetType="{x:Type Border}">
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsOpen}" Value="True">
<Setter Property="Background" Value="Red"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>-->
</Border> </Border>
<!-- Content - TreeView --> <!-- Content - TreeView -->

3
src/Main/Base/Project/Src/Services/RefactoringService/ContextActions/ContextActionsBulbControl.xaml.cs

@ -24,6 +24,7 @@ namespace ICSharpCode.SharpDevelop.Refactoring
public ContextActionsBulbControl() public ContextActionsBulbControl()
{ {
InitializeComponent(); InitializeComponent();
this.IsOpen = false;
} }
public event EventHandler ActionExecuted public event EventHandler ActionExecuted
@ -37,7 +38,7 @@ namespace ICSharpCode.SharpDevelop.Refactoring
get { return isOpen; } get { return isOpen; }
set { set {
isOpen = value; isOpen = value;
this.Header.Opacity = isOpen ? 1.0 : 0.5; this.Header.Opacity = isOpen ? 1.0 : 1.0;
this.Header.BorderThickness = isOpen ? new Thickness(1, 1, 1, 0) : new Thickness(1); this.Header.BorderThickness = isOpen ? new Thickness(1, 1, 1, 0) : new Thickness(1);
this.ActionsTreeView.Visibility = isOpen ? Visibility.Visible : Visibility.Collapsed; this.ActionsTreeView.Visibility = isOpen ? Visibility.Visible : Visibility.Collapsed;
} }

BIN
src/Main/Base/Project/Src/Services/RefactoringService/ContextActions/bulb.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
src/Main/Base/Project/Src/Services/RefactoringService/ContextActions/pencil.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B

Loading…
Cancel
Save