Skip to content

Commit

Permalink
Fix toolbar components alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
MRmlik12 committed May 25, 2024
1 parent 10ec637 commit 23cb6c0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
26 changes: 16 additions & 10 deletions src/NoteSHR/Views/BoardToolbar.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="NoteSHR.Views.BoardToolbar">

<DockPanel Background="Transparent">
<DockPanel Background="White">
<DockPanel.Styles>
<Style Selector="TextBox:pointerover">
<Setter Property="Background" Value="Transparent"/>
Expand All @@ -17,15 +17,21 @@
<Setter Property="BorderThickness" Value="0" />
</Style>
</DockPanel.Styles>
<TextBox Foreground="Black" Background="Transparent" FontSize="24" Width="600" x:Name="BoardNameTextBox" />
<Button DockPanel.Dock="Right" x:Name="ExportBoardButton" Click="ExportBoardButton_OnClick"
Background="Transparent" Foreground="GhostWhite">
<Svg Path="/Assets/Icons/save-outline.svg" Width="32" Height="32" />
</Button>
<Button DockPanel.Dock="Right" x:Name="ImportBoardButton" Click="ImportBoardButton_OnClick"
Background="Transparent" Foreground="GhostWhite">
<Svg Path="/Assets/Icons/download-outline.svg" Width="32" Height="32" />
</Button>
<StackPanel>
<TextBox DockPanel.Dock="Left" Foreground="Black" Background="Transparent" FontSize="24" Width="600" x:Name="BoardNameTextBox" />
</StackPanel>
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal">
<Button DockPanel.Dock="Right" x:Name="ImportBoardButton" Click="ImportBoardButton_OnClick"
Background="Transparent" Foreground="GhostWhite" HorizontalAlignment="Right"
Cursor="Hand">
<Svg Path="/Assets/Icons/download-outline.svg" Width="32" Height="32" />
</Button>
<Button x:Name="ExportBoardButton" Click="ExportBoardButton_OnClick"
Background="Transparent" Foreground="GhostWhite" HorizontalAlignment="Right"
Cursor="Hand">
<Svg Path="/Assets/Icons/save-outline.svg" Width="32" Height="32" />
</Button>
</StackPanel>
</DockPanel>

</UserControl>
10 changes: 5 additions & 5 deletions src/NoteSHR/Views/BoardView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
<converters:ColorToHexConverter x:Key="ColorToHexConverter" />
</UserControl.Resources>

<DockPanel>
<Canvas ZIndex="1000" HorizontalAlignment="Stretch">
<Grid RowDefinitions="Auto, 100*">
<Grid Grid.Row="0" ZIndex="1000" HorizontalAlignment="Stretch">
<views:BoardToolbar Width="NaN" BoardName="{Binding Name}" HorizontalAlignment="Stretch">
<i:Interaction.Behaviors>
<ia:EventTriggerBehavior EventName="ExportBoard">
Expand All @@ -36,9 +36,9 @@
</ia:EventTriggerBehavior>
</i:Interaction.Behaviors>
</views:BoardToolbar>
</Canvas>
</Grid>

<paz:ZoomBorder Name="ZoomBorder" Stretch="Fill" ZoomSpeed="1.2"
<paz:ZoomBorder Grid.Row="1" Name="ZoomBorder" Stretch="Fill" ZoomSpeed="1.2"
ClipToBounds="True" Focusable="True">
<ItemsControl x:Name="NoteItemsControl" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<ItemsControl.ItemsPanel>
Expand Down Expand Up @@ -155,5 +155,5 @@
</ItemsControl.ItemContainerTheme>
</ItemsControl>
</paz:ZoomBorder>
</DockPanel>
</Grid>
</UserControl>

0 comments on commit 23cb6c0

Please sign in to comment.