mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2025-01-23 01:36:57 -08:00
ux: another way to fix transparent background of popup panel on Linux
This commit is contained in:
parent
76bb93518a
commit
1dffb2ebf5
4 changed files with 97 additions and 85 deletions
|
@ -109,23 +109,23 @@
|
||||||
HorizontalAlignment="Right" VerticalAlignment="Bottom"
|
HorizontalAlignment="Right" VerticalAlignment="Bottom"
|
||||||
Cursor="BottomRightCorner"
|
Cursor="BottomRightCorner"
|
||||||
Tag="{x:Static WindowEdge.SouthEast}"/>
|
Tag="{x:Static WindowEdge.SouthEast}"/>
|
||||||
|
|
||||||
<Border x:Name="PART_ContentRoot"
|
<Grid Margin="{TemplateBinding Padding}" Effect="drop-shadow(0 0 12 #A0000000)">
|
||||||
Background="{DynamicResource Brush.Window}"
|
<Border x:Name="PART_ContentRoot"
|
||||||
BorderBrush="{DynamicResource Brush.Border0}"
|
Background="{DynamicResource Brush.Window}"
|
||||||
BorderThickness="1"
|
BorderBrush="{DynamicResource Brush.Border0}"
|
||||||
Margin="{TemplateBinding Padding}"
|
BorderThickness="1"
|
||||||
CornerRadius="8"
|
CornerRadius="8"
|
||||||
Effect="drop-shadow(0 0 12 #A0000000)"
|
ClipToBounds="True">
|
||||||
ClipToBounds="True">
|
<VisualLayerManager>
|
||||||
<VisualLayerManager>
|
<ContentPresenter Name="PART_ContentPresenter"
|
||||||
<ContentPresenter Name="PART_ContentPresenter"
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
Content="{TemplateBinding Content}"
|
||||||
Content="{TemplateBinding Content}"
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
</VisualLayerManager>
|
||||||
</VisualLayerManager>
|
</Border>
|
||||||
</Border>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
|
|
@ -10,46 +10,71 @@
|
||||||
<StackPanel Orientation="Vertical" Margin="8,0,0,0">
|
<StackPanel Orientation="Vertical" Margin="8,0,0,0">
|
||||||
<TextBlock Classes="bold" FontSize="18" Text="{DynamicResource Text.Clone}"/>
|
<TextBlock Classes="bold" FontSize="18" Text="{DynamicResource Text.Clone}"/>
|
||||||
|
|
||||||
<Grid Margin="8,16,0,0" Height="28" ColumnDefinitions="140,*">
|
<Grid Margin="8,16,0,0" RowDefinitions="32,Auto,32,32,32" ColumnDefinitions="Auto,*">
|
||||||
<TextBlock Grid.Column="0" HorizontalAlignment="Right" Margin="0,0,8,0" Text="{DynamicResource Text.Clone.RemoteURL}"/>
|
<TextBlock Grid.Row="0" Grid.Column="0"
|
||||||
<TextBox Grid.Column="1" CornerRadius="3" Text="{Binding Remote, Mode=TwoWay}" v:AutoFocusBehaviour.IsEnabled="True"/>
|
HorizontalAlignment="Right"
|
||||||
</Grid>
|
Margin="0,0,8,0"
|
||||||
<Grid Margin="8,4,0,0" Height="28" ColumnDefinitions="140,*" IsVisible="{Binding UseSSH}">
|
Text="{DynamicResource Text.Clone.RemoteURL}"/>
|
||||||
<TextBlock Grid.Column="0" HorizontalAlignment="Right" Margin="0,0,8,0" Text="{DynamicResource Text.SSHKey}"/>
|
<TextBox Grid.Row="0" Grid.Column="1"
|
||||||
<TextBox Grid.Column="1"
|
Height="28"
|
||||||
|
CornerRadius="3"
|
||||||
|
Text="{Binding Remote, Mode=TwoWay}"
|
||||||
|
v:AutoFocusBehaviour.IsEnabled="True"/>
|
||||||
|
|
||||||
|
<TextBlock Grid.Row="1" Grid.Column="0"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Margin="0,0,8,0"
|
||||||
|
Text="{DynamicResource Text.SSHKey}"
|
||||||
|
IsVisible="{Binding UseSSH}"/>
|
||||||
|
<TextBox Grid.Row="1" Grid.Column="1"
|
||||||
x:Name="TxtSshKey"
|
x:Name="TxtSshKey"
|
||||||
Height="28"
|
Height="28"
|
||||||
CornerRadius="3"
|
CornerRadius="3"
|
||||||
Watermark="{DynamicResource Text.SSHKey.Placeholder}"
|
Watermark="{DynamicResource Text.SSHKey.Placeholder}"
|
||||||
Text="{Binding SSHKey, Mode=TwoWay}">
|
Text="{Binding SSHKey, Mode=TwoWay}"
|
||||||
|
IsVisible="{Binding UseSSH}">
|
||||||
<TextBox.InnerRightContent>
|
<TextBox.InnerRightContent>
|
||||||
<Button Classes="icon_button" Width="30" Height="30" Click="SelectSSHKey">
|
<Button Classes="icon_button" Width="28" Height="28" Click="SelectSSHKey">
|
||||||
<Path Data="{StaticResource Icons.Folder.Open}" Fill="{DynamicResource Brush.FG1}"/>
|
<Path Data="{StaticResource Icons.Folder.Open}" Fill="{DynamicResource Brush.FG1}"/>
|
||||||
</Button>
|
</Button>
|
||||||
</TextBox.InnerRightContent>
|
</TextBox.InnerRightContent>
|
||||||
</TextBox>
|
</TextBox>
|
||||||
</Grid>
|
|
||||||
<Grid Margin="8,4,0,0" Height="28" ColumnDefinitions="140,*">
|
<TextBlock Grid.Row="2" Grid.Column="0"
|
||||||
<TextBlock Grid.Column="0" HorizontalAlignment="Right" Margin="0,0,8,0" Text="{DynamicResource Text.Clone.ParentFolder}"/>
|
HorizontalAlignment="Right"
|
||||||
<TextBox Grid.Column="1"
|
Margin="0,0,8,0"
|
||||||
|
Text="{DynamicResource Text.Clone.ParentFolder}"/>
|
||||||
|
<TextBox Grid.Row="2" Grid.Column="1"
|
||||||
x:Name="TxtParentFolder"
|
x:Name="TxtParentFolder"
|
||||||
Height="28"
|
Height="28"
|
||||||
CornerRadius="3"
|
CornerRadius="3"
|
||||||
Text="{Binding ParentFolder, Mode=TwoWay}">
|
Text="{Binding ParentFolder, Mode=TwoWay}">
|
||||||
<TextBox.InnerRightContent>
|
<TextBox.InnerRightContent>
|
||||||
<Button Classes="icon_button" Width="30" Height="30" Margin="4,0,0,0" Click="SelectParentFolder">
|
<Button Classes="icon_button" Width="28" Height="28" Margin="4,0,0,0" Click="SelectParentFolder">
|
||||||
<Path Data="{StaticResource Icons.Folder.Open}" Fill="{DynamicResource Brush.FG1}"/>
|
<Path Data="{StaticResource Icons.Folder.Open}" Fill="{DynamicResource Brush.FG1}"/>
|
||||||
</Button>
|
</Button>
|
||||||
</TextBox.InnerRightContent>
|
</TextBox.InnerRightContent>
|
||||||
</TextBox>
|
</TextBox>
|
||||||
</Grid>
|
|
||||||
<Grid Margin="8,4,0,0" Height="28" ColumnDefinitions="140,*">
|
<TextBlock Grid.Row="3" Grid.Column="0"
|
||||||
<TextBlock Grid.Column="0" HorizontalAlignment="Right" Margin="0,0,8,0" Text="{DynamicResource Text.Clone.LocalName}"/>
|
HorizontalAlignment="Right"
|
||||||
<TextBox Grid.Column="1" CornerRadius="3" Watermark="{DynamicResource Text.Clone.LocalName.Placeholder}" Text="{Binding Local, Mode=TwoWay}"/>
|
Margin="0,0,8,0"
|
||||||
</Grid>
|
Text="{DynamicResource Text.Clone.LocalName}"/>
|
||||||
<Grid Margin="8,4,0,0" Height="28" ColumnDefinitions="140,*">
|
<TextBox Grid.Row="3" Grid.Column="1"
|
||||||
<TextBlock Grid.Column="0" HorizontalAlignment="Right" Margin="0,0,8,0" Text="{DynamicResource Text.Clone.AdditionalParam}"/>
|
Height="28"
|
||||||
<TextBox Grid.Column="1" CornerRadius="3" Watermark="{DynamicResource Text.Clone.AdditionalParam.Placeholder}" Text="{Binding ExtraArgs, Mode=TwoWay}"/>
|
CornerRadius="3"
|
||||||
|
Watermark="{DynamicResource Text.Clone.LocalName.Placeholder}"
|
||||||
|
Text="{Binding Local, Mode=TwoWay}"/>
|
||||||
|
|
||||||
|
<TextBlock Grid.Row="4" Grid.Column="0"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Margin="0,0,8,0"
|
||||||
|
Text="{DynamicResource Text.Clone.AdditionalParam}"/>
|
||||||
|
<TextBox Grid.Row="4" Grid.Column="1"
|
||||||
|
Height="28"
|
||||||
|
CornerRadius="3"
|
||||||
|
Watermark="{DynamicResource Text.Clone.AdditionalParam.Placeholder}"
|
||||||
|
Text="{Binding ExtraArgs, Mode=TwoWay}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|
|
@ -250,59 +250,46 @@
|
||||||
</ContentControl>
|
</ContentControl>
|
||||||
|
|
||||||
<!-- Popup container -->
|
<!-- Popup container -->
|
||||||
<Grid Grid.Row="1" Margin="0,36,0,0" IsVisible="{Binding ActivePage.Popup, Converter={x:Static ObjectConverters.IsNotNull}}">
|
<Grid Grid.Row="1" Margin="0,36,0,0" IsVisible="{Binding ActivePage.Popup, Converter={x:Static ObjectConverters.IsNotNull}}" ClipToBounds="True">
|
||||||
<Border Background="Transparent" PointerPressed="OnPopupCancelByClickMask"/>
|
<Border Background="Transparent" PointerPressed="OnPopupCancelByClickMask"/>
|
||||||
|
|
||||||
<Grid Width="500" HorizontalAlignment="Center" VerticalAlignment="Top">
|
<Border Width="500" HorizontalAlignment="Center" VerticalAlignment="Top" Effect="drop-shadow(0 0 8 #8F000000)" CornerRadius="0,0,4,4" ClipToBounds="True">
|
||||||
<ContentControl Content="{Binding ActivePage.Popup}" ClipToBounds="True">
|
<ContentControl Content="{Binding ActivePage.Popup}" Background="{DynamicResource Brush.Popup}">
|
||||||
<ContentControl.DataTemplates>
|
<ContentControl.DataTemplates>
|
||||||
<DataTemplate DataType="vm:Popup">
|
<DataTemplate DataType="vm:Popup">
|
||||||
<Border Margin="8,0,8,8"
|
<StackPanel Orientation="Vertical" Background="{DynamicResource Brush.Popup}">
|
||||||
Background="{DynamicResource Brush.Popup}"
|
<!-- Popup Widget -->
|
||||||
BorderBrush="{DynamicResource Brush.Border0}"
|
<ContentPresenter Margin="8,16,8,8"
|
||||||
CornerRadius="0,0,4,4">
|
Content="{Binding View}"
|
||||||
<Border.BorderThickness>
|
IsHitTestVisible="{Binding InProgress, Converter={x:Static BoolConverters.Not}}"/>
|
||||||
<OnPlatform Default="0" Linux="1,0,1,1"/>
|
|
||||||
</Border.BorderThickness>
|
|
||||||
|
|
||||||
<Border.Effect>
|
<!-- Options -->
|
||||||
<OnPlatform Default="drop-shadow(0 0 8 #8F000000)" Linux="{x:Null}"/>
|
<StackPanel Margin="8,4,8,8"
|
||||||
</Border.Effect>
|
Height="32"
|
||||||
|
Orientation="Horizontal"
|
||||||
<StackPanel Margin="8" Orientation="Vertical">
|
HorizontalAlignment="Right"
|
||||||
<!-- Popup Widget -->
|
IsVisible="{Binding InProgress, Converter={x:Static BoolConverters.Not}}">
|
||||||
<ContentPresenter Margin="0,8"
|
<Button Classes="flat primary"
|
||||||
Content="{Binding View}"
|
Width="80"
|
||||||
IsHitTestVisible="{Binding InProgress, Converter={x:Static BoolConverters.Not}}"/>
|
Content="{DynamicResource Text.Sure}"
|
||||||
|
Click="OnPopupSure"
|
||||||
<!-- Options -->
|
HotKey="Enter"/>
|
||||||
<StackPanel Margin="0,8,0,0"
|
<Button Classes="flat"
|
||||||
Height="32"
|
Width="80"
|
||||||
Orientation="Horizontal"
|
Margin="8,0,0,0"
|
||||||
HorizontalAlignment="Right"
|
Content="{DynamicResource Text.Cancel}"
|
||||||
IsVisible="{Binding InProgress, Converter={x:Static BoolConverters.Not}}">
|
Click="OnPopupCancel"/>
|
||||||
<Button Classes="flat primary"
|
|
||||||
Width="80"
|
|
||||||
Content="{DynamicResource Text.Sure}"
|
|
||||||
Click="OnPopupSure"
|
|
||||||
HotKey="Enter"/>
|
|
||||||
<Button Classes="flat"
|
|
||||||
Width="80"
|
|
||||||
Margin="8,0,0,0"
|
|
||||||
Content="{DynamicResource Text.Cancel}"
|
|
||||||
Click="OnPopupCancel"/>
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<!-- Running -->
|
|
||||||
<v:PopupRunningStatus Margin="8"
|
|
||||||
Description="{Binding ProgressDescription}"
|
|
||||||
IsVisible="{Binding InProgress}"/>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
|
||||||
|
<!-- Running -->
|
||||||
|
<v:PopupRunningStatus Margin="12,8"
|
||||||
|
Description="{Binding ProgressDescription}"
|
||||||
|
IsVisible="{Binding InProgress}"/>
|
||||||
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ContentControl.DataTemplates>
|
</ContentControl.DataTemplates>
|
||||||
</ContentControl>
|
</ContentControl>
|
||||||
</Grid>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!-- Notification container -->
|
<!-- Notification container -->
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
x:Class="SourceGit.Views.PopupRunningStatus"
|
x:Class="SourceGit.Views.PopupRunningStatus"
|
||||||
x:Name="me">
|
x:Name="me">
|
||||||
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Vertical">
|
||||||
<Rectangle Height="1" Margin="-8,0" HorizontalAlignment="Stretch" Fill="{DynamicResource Brush.Border1}" />
|
<Rectangle Height="1" HorizontalAlignment="Stretch" Fill="{DynamicResource Brush.Border1}" />
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,8">
|
<StackPanel Orientation="Horizontal" Margin="0,8">
|
||||||
<ContentPresenter x:Name="icon" Width="12" Height="12"/>
|
<ContentPresenter x:Name="icon" Width="12" Height="12"/>
|
||||||
|
|
Loading…
Reference in a new issue