-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into features/config-indentation
- Loading branch information
Showing
33 changed files
with
725 additions
and
294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<UserControl xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:ui="using:FluentAvalonia.UI.Controls" | ||
x:Class="SkEditor.Controls.SideBarControl"> | ||
|
||
<UserControl.Styles> | ||
<Style Selector="Button.barButton"> | ||
<Setter Property="Background" Value="Transparent"/> | ||
<Setter Property="BorderThickness" Value="0"/> | ||
<Setter Property="Padding" Value="0"/> | ||
</Style> | ||
<Style Selector="Separator"> | ||
<Setter Property="Margin" Value="0,1"/> | ||
</Style> | ||
<Style Selector="TreeViewItem"> | ||
<Setter Property="FontWeight" Value="Regular"/> | ||
</Style> | ||
</UserControl.Styles> | ||
|
||
<Grid ColumnDefinitions="auto,auto" RowDefinitions="*"> | ||
<Border Grid.Column="0" Width="36" Background="{DynamicResource SkEditorBorderBackground}" CornerRadius="7"> | ||
<StackPanel Spacing="10" HorizontalAlignment="Center"> | ||
<Button Name="ProjectsButton" Height="36" Width="36" Classes="barButton"> | ||
<Button.Content> | ||
<ui:SymbolIcon Symbol="Folder" FontSize="24" Foreground="#bfffffff" /> | ||
</Button.Content> | ||
</Button> | ||
</StackPanel> | ||
</Border> | ||
|
||
<Border Name="ExtendedSideBar" Grid.Column="1" Width="0" Background="{DynamicResource SkEditorBorderBackground}" CornerRadius="7" Margin="10,0,0,0"> | ||
<Border.Transitions> | ||
<Transitions> | ||
<DoubleTransition Property="Width" Duration="0:0:0.05" Easing="QuadraticEaseIn"/> | ||
</Transitions> | ||
</Border.Transitions> | ||
|
||
<Grid RowDefinitions="auto,auto,*"> | ||
<TextBlock Grid.Row="0" Text="Explorer" FontWeight="DemiBold" Margin="20,10,20,10"/> | ||
<Separator Grid.Row="1" Margin="0,0,0,10"/> | ||
<TreeView Grid.Row="2" Name="FileTreeView"> | ||
|
||
</TreeView> | ||
</Grid> | ||
</Border> | ||
</Grid> | ||
</UserControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using Avalonia.Controls; | ||
using CommunityToolkit.Mvvm.Input; | ||
|
||
namespace SkEditor.Controls; | ||
public partial class SideBarControl : UserControl | ||
{ | ||
public SideBarControl() | ||
{ | ||
InitializeComponent(); | ||
|
||
AssignCommands(); | ||
} | ||
|
||
private void AssignCommands() | ||
{ | ||
ProjectsButton.Command = new RelayCommand(() => | ||
{ | ||
ScrollViewer.SetHorizontalScrollBarVisibility(FileTreeView, Avalonia.Controls.Primitives.ScrollBarVisibility.Disabled); | ||
ScrollViewer.SetVerticalScrollBarVisibility(FileTreeView, Avalonia.Controls.Primitives.ScrollBarVisibility.Auto); | ||
ExtendedSideBar.Width = ExtendedSideBar.Width == 0 ? 250 : 0; | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.