Skip to content

Commit

Permalink
Fixed tab overhang (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesVaughan authored Aug 10, 2023
1 parent 74a871c commit 2e3bb42
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
21 changes: 3 additions & 18 deletions Code/XTMF.Gui/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@
KeyboardNavigation.TabIndex="1" Panel.ZIndex="1"
ItemTemplate="{TemplateBinding HeaderItemTemplate}"
Style="{StaticResource TabablzDragablzItemsControlStyle}"
Margin="1,0,1,-2"
Padding="0">
Margin="1,0,1,0"
Padding="0">
<dragablz:DragablzItemsControl.MaxWidth>
<MultiBinding>
<MultiBinding.Converter>
Expand All @@ -153,19 +153,7 @@
</MultiBinding>
</dragablz:DragablzItemsControl.MaxWidth>
</dragablz:DragablzItemsControl>
<Button Style="{StaticResource MaterialDesignAddItemCommandButtonStyle}"
x:Name="DefaultAddButton"
Grid.Column="2"
Command="{x:Static dragablz:TabablzControl.AddItemCommand}"
Visibility="{TemplateBinding ShowDefaultAddButton, Converter={StaticResource BooleanToVisibilityConverter}}"
/>
<ContentControl Grid.Column="3" x:Name="SuffixContentControl"
Content="{TemplateBinding HeaderSuffixContent}"
ContentStringFormat="{TemplateBinding HeaderSuffixContentStringFormat}"
ContentTemplate="{TemplateBinding HeaderSuffixContentStringFormat}"
ContentTemplateSelector="{TemplateBinding HeaderSuffixContentTemplateSelector}"
HorizontalAlignment="Stretch"
/>

</Grid>
</Grid>
<ControlTemplate.Triggers>
Expand All @@ -178,9 +166,6 @@
<Trigger Property="IsEnabled" Value="false">
<Setter Property="TextElement.Foreground" TargetName="templateRoot" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
<Trigger Property="IsDraggingWindow" Value="True">
<Setter TargetName="DefaultAddButton" Property="Visibility" Value="Hidden" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
Expand Down
2 changes: 1 addition & 1 deletion Code/XTMF.Gui/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<Border Name="WindowGrid" Margin="0,0,0,0" BorderBrush="{DynamicResource PrimaryHueMidBrush}" BorderThickness="0">
<Grid>
<materialDesign:DialogHost Identifier="RootDialog" CloseOnClickAway="True" Name="RootDialogHost" >
<materialDesign:DrawerHost Name="DrawerHost" materialDesign:ShadowAssist.ShadowDepth="Depth4"
<materialDesign:DrawerHost Name="DrawerHost" materialDesign:ElevationAssist.Elevation="Dp4"
IsLeftDrawerOpen="{Binding ElementName=MenuToggleButton, Path=IsChecked}"
PreviewKeyDown="DrawerHost_PreviewKeyDown">
<Grid Name="ExternalGrid" Margin="0,0,0,0" Background="Transparent">
Expand Down
6 changes: 3 additions & 3 deletions Code/XTMF.Gui/UserControls/StartWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@
<RowDefinition Height="AUTO" MinHeight="0" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="600" />
<ColumnDefinition Width="400" />
</Grid.ColumnDefinitions>
<materialDesign:Card Grid.Row="0" Grid.Column="0" Padding="15" Margin="5">
<StackPanel Orientation="Vertical" HorizontalAlignment="Left" Name="ProjectsStackPanel">
<Label Content="Projects" FontSize="18" Foreground="{DynamicResource MaterialDesignBody}" />
<Button HorizontalAlignment="Left" Style="{DynamicResource MaterialDesignFlatButton}" Content="Create a new project" Margin="0.25cm,0,0,0" FontSize="14" Click="ButtonBase_OnClick" />
<Button HorizontalAlignment="Left" Style="{DynamicResource MaterialDesignFlatButton}" Content="Open a project" Margin="0.25cm,0,0,0" FontSize="14" Name="OpenProjectButton" Click="OpenProjectButton_OnClick" />
<Button HorizontalAlignment="Left" Style="{DynamicResource MaterialDesignFlatButton}" Content="Create a new project" Margin="0.25cm,0,0,0" FontSize="14" Click="ButtonBase_OnClick" />
<Button HorizontalAlignment="Left" Style="{DynamicResource MaterialDesignFlatButton}" Content="Open a project" Margin="0.25cm,0,0,0" FontSize="14" Name="OpenProjectButton" Click="OpenProjectButton_OnClick" />
</StackPanel>
</materialDesign:Card>
<materialDesign:Card Grid.Row="1" Grid.Column="0" Padding="15" Margin="5">
Expand Down

0 comments on commit 2e3bb42

Please sign in to comment.