style: popup container widgets

This commit is contained in:
leo 2024-03-07 12:08:54 +08:00
parent b48c2b5ab5
commit f65dc36e62

View file

@ -236,20 +236,19 @@
<v:LauncherBody Grid.Row="1" Background="{DynamicResource Brush.ToolBar}" Data="{Binding ActivePage.Data}"/> <v:LauncherBody Grid.Row="1" Background="{DynamicResource Brush.ToolBar}" Data="{Binding ActivePage.Data}"/>
<!-- Popup container --> <!-- Popup container -->
<Grid Grid.Row="1" x:Name="popupContainer" Margin="0,36,0,0" ClipToBounds="True" IsVisible="{Binding ActivePage.Popup, Converter={x:Static ObjectConverters.IsNotNull}}"> <ContentControl Grid.Row="1" Margin="0,36,0,0" Content="{Binding ActivePage.Popup}" IsVisible="{Binding ActivePage.Popup, Converter={x:Static ObjectConverters.IsNotNull}}">
<Border Background="Transparent" PointerPressed="OnPopupCancelByClickMask"/> <ContentControl.DataTemplates>
<DataTemplate DataType="vm:Popup">
<Grid>
<Border Background="Transparent" PointerPressed="OnPopupCancelByClickMask"/>
<Border Background="{DynamicResource Brush.Popup}" <Grid Width="500" HorizontalAlignment="Center" VerticalAlignment="Top">
HorizontalAlignment="Center" VerticalAlignment="Top" <Border Background="{DynamicResource Brush.Popup}" CornerRadius="0,0,4,4">
Width="500" <Border.Effect>
CornerRadius="0,0,4,4"> <DropShadowEffect BlurRadius="8" Color="Black" Opacity=".6" OffsetX="0" OffsetY="0"/>
<Border.Effect> </Border.Effect>
<DropShadowEffect BlurRadius="8" Color="Black" Opacity=".6" OffsetX="0" OffsetY="0"/> </Border>
</Border.Effect>
<ContentControl Content="{Binding ActivePage.Popup}">
<ContentControl.DataTemplates>
<DataTemplate DataType="vm:Popup">
<StackPanel Margin="8" Orientation="Vertical"> <StackPanel Margin="8" Orientation="Vertical">
<!-- Popup Widget --> <!-- Popup Widget -->
<ContentControl Margin="0,8" <ContentControl Margin="0,8"
@ -274,7 +273,7 @@
</StackPanel> </StackPanel>
<!-- Running --> <!-- Running -->
<StackPanel Orientation="Vertical" Margin="8" IsVisible="{Binding InProgress}"> <StackPanel Orientation="Vertical" Margin="8" IsVisible="{Binding InProgress}">
<Rectangle Height="1" Margin="-8,0" HorizontalAlignment="Stretch" Fill="{DynamicResource Brush.Border1}" /> <Rectangle Height="1" Margin="-8,0" HorizontalAlignment="Stretch" Fill="{DynamicResource Brush.Border1}" />
<StackPanel Orientation="Horizontal" Margin="0,8"> <StackPanel Orientation="Horizontal" Margin="0,8">
<Path Width="12" Height="12" Classes="waiting" Data="{StaticResource Icons.Waiting}" IsVisible="{Binding InProgress}"/> <Path Width="12" Height="12" Classes="waiting" Data="{StaticResource Icons.Waiting}" IsVisible="{Binding InProgress}"/>
@ -292,11 +291,11 @@
Minimum="0" Maximum="100"/> Minimum="0" Maximum="100"/>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</DataTemplate> </Grid>
</ContentControl.DataTemplates> </Grid>
</ContentControl> </DataTemplate>
</Border> </ContentControl.DataTemplates>
</Grid> </ContentControl>
<!-- Notification container --> <!-- Notification container -->
<Grid Grid.Row="1" Width="360" Margin="0,36,0,0" HorizontalAlignment="Right" VerticalAlignment="Top"> <Grid Grid.Row="1" Width="360" Margin="0,36,0,0" HorizontalAlignment="Right" VerticalAlignment="Top">