-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathViewerPane.xaml
135 lines (123 loc) · 8.41 KB
/
ViewerPane.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<UserControl x:Name="ViewerPanel" x:Class="QuickLook.Plugin.ApkViewer.ViewerPane"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
Background="{DynamicResource MainWindowBackground}"
mc:Ignorable="d" d:DesignWidth="450" FontFamily="Segoe UI">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/QuickLook.Common;component/Styles/MainWindowStyles.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style x:Key="CommonStyle" TargetType="Control">
<Setter Property="Height" Value="30"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="FontFamily" Value="Segoe UI"/>
<Setter Property="Foreground" Value="{DynamicResource WindowTextForeground}"/>
</Style>
<Style x:Key="StaticLabel" TargetType="Label" BasedOn="{StaticResource CommonStyle}">
<Setter Property="Width" Value="130"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style x:Key="SelectableLabel" TargetType="TextBox" BasedOn="{StaticResource CommonStyle}">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="SelectionBrush" Value="#007BFF"/>
<Setter Property="SelectionOpacity" Value="0.3"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="TextWrapping" Value="NoWrap"/>
<Setter Property="IsReadOnly" Value="True"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
</Style>
<Style x:Key="HoverableLabel" TargetType="TextBox" BasedOn="{StaticResource SelectableLabel}">
<Setter Property="Width" Value="Auto" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource CaptionButtonHoverBackground}"/>
<Setter Property="Foreground" Value="{DynamicResource CaptionButtonIconForeground}"/>
</Trigger>
</Style.Triggers>
</Style>
<BitmapImage x:Key="DefaultIcon" UriSource="images/default_icon.png"/>
</ResourceDictionary>
</UserControl.Resources>
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid>
<Image x:Name="image" Source="{StaticResource DefaultIcon}"
Cursor="Hand" Height="210" Width="210"
VerticalAlignment="Center" HorizontalAlignment="Center" />
</Grid>
<StackPanel Name="labels" Grid.Column="1" Margin="5,0"
HorizontalAlignment="Left" VerticalAlignment="Top">
<Label Content="Application name:" Style="{StaticResource StaticLabel}"/>
<Label Content="Package name:" Style="{StaticResource StaticLabel}"/>
<Label Content="Version name:" Style="{StaticResource StaticLabel}"/>
<Label Content="Version code:" Style="{StaticResource StaticLabel}"/>
<Label Content="Min SDK:" Style="{StaticResource StaticLabel}"/>
<Label Content="Target SDK:" Style="{StaticResource StaticLabel}"/>
<Label Content="Support screens:" Style="{StaticResource StaticLabel}"/>
<Label Content="Support ABIs:" Style="{StaticResource StaticLabel}" Name="lbAbis" />
<Label Content="Package size:" Style="{StaticResource StaticLabel}"/>
</StackPanel>
<StackPanel Name="textboxs" Grid.Column="2" VerticalAlignment="Top" Margin="5,0,10,0">
<TextBox x:Name="tbAppName" Text="..." Width="auto" Style="{StaticResource SelectableLabel}" MouseDoubleClick="SelectableLabel_MouseDoubleClick" VerticalAlignment="Center" HorizontalAlignment="Left"/>
<TextBox x:Name="tbPckName" Text="..." Width="auto" Style="{StaticResource SelectableLabel}" MouseDoubleClick="SelectableLabel_MouseDoubleClick" VerticalAlignment="Center" HorizontalAlignment="Left"/>
<TextBox x:Name="tbVerName" Text="..." Width="auto" Style="{StaticResource SelectableLabel}" MouseDoubleClick="SelectableLabel_MouseDoubleClick" VerticalAlignment="Center" HorizontalAlignment="Left"/>
<TextBox x:Name="tbVerCode" Text="..." Width="auto" Style="{StaticResource SelectableLabel}" MouseDoubleClick="SelectableLabel_MouseDoubleClick" VerticalAlignment="Center" HorizontalAlignment="Left"/>
<TextBox x:Name="tbMinSDK" Text="..." Width="auto" Style="{StaticResource SelectableLabel}" MouseDoubleClick="SelectableLabel_MouseDoubleClick" VerticalAlignment="Center" HorizontalAlignment="Left"/>
<TextBox x:Name="tbTargetSDK" Text="..." Width="auto" Style="{StaticResource SelectableLabel}" MouseDoubleClick="SelectableLabel_MouseDoubleClick" VerticalAlignment="Center" HorizontalAlignment="Left"/>
<TextBox x:Name="tbSupportScr" Text="..." Width="auto" Style="{StaticResource SelectableLabel}" MouseDoubleClick="SelectableLabel_MouseDoubleClick" VerticalAlignment="Center" HorizontalAlignment="Left"/>
<TextBox x:Name="tbAbis" Text="..." Width="auto" Style="{StaticResource SelectableLabel}" MouseDoubleClick="SelectableLabel_MouseDoubleClick" VerticalAlignment="Center" HorizontalAlignment="Left"/>
<TextBox x:Name="tbPckSize" Text="..." Width="auto" Style="{StaticResource SelectableLabel}" MouseDoubleClick="SelectableLabel_MouseDoubleClick" VerticalAlignment="Center" HorizontalAlignment="Left"/>
</StackPanel>
<Image x:Name="btnSwTheme" Height="20" Width="20" Margin="10"
Cursor="Hand" ToolTip="Switch theme" Grid.Column="3"
HorizontalAlignment="Left" VerticalAlignment="Top">
<Image.Style>
<Style>
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=ViewerPanel,Path=Theme}" Value="Light">
<!-- Black image on light theme -->
<Setter Property="Image.Source">
<Setter.Value>
<BitmapImage UriSource="images/black_btn.png" />
</Setter.Value>
</Setter>
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=ViewerPanel,Path=Theme}" Value="Dark">
<Setter Property="Image.Source">
<Setter.Value>
<BitmapImage UriSource="images/white_btn.png" />
</Setter.Value>
</Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
<GroupBox x:Name="panelPermission" Header="Permissions" VerticalAlignment="Top"
BorderBrush="{DynamicResource WindowTextForeground}"
Foreground="{DynamicResource WindowTextForeground}"
BorderThickness="1" Margin="10" Height="150"
Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="4">
<ScrollViewer Focusable="False">
<StackPanel x:Name="permissionStack"/>
</ScrollViewer>
</GroupBox>
</Grid>
</UserControl>