Skip to content

Commit

Permalink
Add up/down arrows to App Grabber categories
Browse files Browse the repository at this point in the history
  • Loading branch information
dremin committed Mar 18, 2018
1 parent 3d5fcf9 commit 0744900
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
25 changes: 9 additions & 16 deletions Cairo Desktop/CairoDesktop.AppGrabber/AppGrabberUIResources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,8 @@
TargetType="Button">
<Setter Property="OverridesDefaultStyle"
Value="true" />
<Setter Property="FontFamily"
Value="Webdings" />
<Setter Property="Foreground"
Value="White" />
<Setter Property="FontSize"
Expand All @@ -386,21 +388,6 @@
<EventSetter Event="Click"
Handler="CategoryButtonClicked" />
</Style>
<Style x:Key="ButtonRotateStyle"
BasedOn="{StaticResource CategoryManipulationButtonStyle}"
TargetType="Button">
<Setter Property="Padding"
Value="0,0,0,3" />
<Setter Property="Foreground"
Value="White" />
<Setter Property="RenderTransform">
<Setter.Value>
<RotateTransform Angle="90" />
</Setter.Value>
</Setter>
<Setter Property="RenderTransformOrigin"
Value=".5,.5" />
</Style>
<Style x:Key="CategoryDisplayStyle"
TargetType="ItemsControl">
<Setter Property="AllowDrop"
Expand All @@ -424,7 +411,13 @@
</DockPanel.Background>
<Button DockPanel.Dock="Right"
Style="{StaticResource CategoryManipulationButtonStyle}"
CommandParameter="{Binding}" Name="CatDelButton" Initialized="DelCatButtonShown">X</Button>
CommandParameter="{Binding}" Name="CatDelButton" Initialized="DelCatButtonShown">r</Button>
<Button DockPanel.Dock="Right"
Style="{StaticResource CategoryManipulationButtonStyle}"
CommandParameter="{Binding}" Name="CatDownButton" Initialized="DelCatButtonShown">6</Button>
<Button DockPanel.Dock="Right"
Style="{StaticResource CategoryManipulationButtonStyle}"
CommandParameter="{Binding}" Name="CatUpButton" Initialized="DelCatButtonShown">5</Button>
<TextBox DockPanel.Dock="Left"
Visibility="Collapsed"
Text="{Binding Path=Name}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ private void CategoryButtonClicked(object sender, RoutedEventArgs e)
CategoryList catList = actionableCategory.ParentCategoryList;
switch (button.Content as String)
{
case "<":
case "5":
catList.MoveCategory(actionableCategory, -1);
break;
case ">":
case "6":
catList.MoveCategory(actionableCategory, 1);
break;
case "X":
case "r":
//Don't allow removal of special category
if (actionableCategory.Type > 0) return;

Expand Down

0 comments on commit 0744900

Please sign in to comment.