Browse Source

Added background to DialogTitleBar

Krzysztof Krysiński 1 year ago
parent
commit
750faa7de6

+ 3 - 2
src/PixiEditor.AvaloniaUI/Views/Dialogs/DialogTitleBar.axaml

@@ -15,14 +15,15 @@
     Height="36"
     Height="36"
     d:DesignWidth="300">
     d:DesignWidth="300">
     <Grid>
     <Grid>
-        <TextBlock 
+        <Grid Background="{DynamicResource ThemeBackgroundBrush1}" IsHitTestVisible="False"/>
+        <TextBlock
             IsHitTestVisible="False"
             IsHitTestVisible="False"
             TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" 
             TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" 
             ui:Translator.Key="{Binding ElementName=uc, Path=TitleKey}"
             ui:Translator.Key="{Binding ElementName=uc, Path=TitleKey}"
             Foreground="White" 
             Foreground="White" 
             FontSize="15" 
             FontSize="15" 
             Margin="5,0,0,0"/>
             Margin="5,0,0,0"/>
-        <DockPanel>
+        <DockPanel IsHitTestVisible="True">
             <DockPanel.Styles>
             <DockPanel.Styles>
                 <Style Selector="Button">
                 <Style Selector="Button">
                     <Setter Property="Background" Value="Transparent"/>
                     <Setter Property="Background" Value="Transparent"/>

+ 2 - 5
src/PixiEditor.AvaloniaUI/Views/Windows/HelloTherePopup.axaml

@@ -17,10 +17,9 @@
         xmlns:indicators1="clr-namespace:PixiEditor.AvaloniaUI.Views.Indicators"
         xmlns:indicators1="clr-namespace:PixiEditor.AvaloniaUI.Views.Indicators"
         xmlns:newsFeed1="clr-namespace:PixiEditor.AvaloniaUI.Views.NewsFeed"
         xmlns:newsFeed1="clr-namespace:PixiEditor.AvaloniaUI.Views.NewsFeed"
         xmlns:dialogs="clr-namespace:PixiEditor.AvaloniaUI.Views.Dialogs"
         xmlns:dialogs="clr-namespace:PixiEditor.AvaloniaUI.Views.Dialogs"
-        mc:Ignorable="d" ShowInTaskbar="False"
+        mc:Ignorable="d"
         Title="Hello there!" Height="662" Width="982" MinHeight="500" MinWidth="500"
         Title="Hello there!" Height="662" Width="982" MinHeight="500" MinWidth="500"
-        WindowStartupLocation="CenterScreen" Loaded="HelloTherePopup_OnLoaded"
-        FlowDirection="{markupExtensions:Localization FlowDirection}">
+        Loaded="HelloTherePopup_OnLoaded">
 
 
     <Window.Styles>
     <Window.Styles>
         <Style Selector="TextBlock">
         <Style Selector="TextBlock">
@@ -30,8 +29,6 @@
     </Window.Styles>
     </Window.Styles>
 
 
     <DockPanel>
     <DockPanel>
-        <dialogs:DialogTitleBar 
-            DockPanel.Dock="Top"/>
         <Grid Background="{StaticResource ThemeBackgroundBrush}" x:Name="grid">
         <Grid Background="{StaticResource ThemeBackgroundBrush}" x:Name="grid">
             <Grid.RowDefinitions>
             <Grid.RowDefinitions>
                 <RowDefinition Height="35" />
                 <RowDefinition Height="35" />

+ 2 - 1
src/PixiEditor.AvaloniaUI/Views/Windows/HelloTherePopup.axaml.cs

@@ -11,6 +11,7 @@ using PixiEditor.AvaloniaUI.Models.Services.NewsFeed;
 using PixiEditor.AvaloniaUI.Models.Structures;
 using PixiEditor.AvaloniaUI.Models.Structures;
 using PixiEditor.AvaloniaUI.Models.UserData;
 using PixiEditor.AvaloniaUI.Models.UserData;
 using PixiEditor.AvaloniaUI.ViewModels.SubViewModels;
 using PixiEditor.AvaloniaUI.ViewModels.SubViewModels;
+using PixiEditor.AvaloniaUI.Views.Dialogs;
 using PixiEditor.Extensions.Common.UserPreferences;
 using PixiEditor.Extensions.Common.UserPreferences;
 using PixiEditor.OperatingSystem;
 using PixiEditor.OperatingSystem;
 
 
@@ -19,7 +20,7 @@ namespace PixiEditor.AvaloniaUI.Views.Windows;
 /// <summary>
 /// <summary>
 /// Interaction logic for HelloTherePopup.xaml.
 /// Interaction logic for HelloTherePopup.xaml.
 /// </summary>
 /// </summary>
-internal partial class HelloTherePopup : Window
+internal partial class HelloTherePopup : PixiEditorPopup
 {
 {
     public RecentlyOpenedCollection RecentlyOpened { get => FileViewModel.RecentlyOpened; }
     public RecentlyOpenedCollection RecentlyOpened { get => FileViewModel.RecentlyOpened; }