ExifWindow.axaml 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <Window
  2. CanResize="False"
  3. ExtendClientAreaChromeHints="SystemChrome"
  4. ExtendClientAreaTitleBarHeightHint="-1"
  5. Height="385"
  6. Title="ExifWindow"
  7. Width="900"
  8. mc:Ignorable="d"
  9. x:Class="PicView.Avalonia.MacOS.Views.ExifWindow"
  10. x:DataType="viewModels:MainViewModel"
  11. xmlns="https://github.com/avaloniaui"
  12. xmlns:buttons="clr-namespace:PicView.Avalonia.Views.UC.Buttons;assembly=PicView.Avalonia"
  13. xmlns:customControls="clr-namespace:PicView.Avalonia.CustomControls;assembly=PicView.Avalonia"
  14. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  15. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  16. xmlns:viewModels="clr-namespace:PicView.Avalonia.ViewModels;assembly=PicView.Avalonia"
  17. xmlns:views="clr-namespace:PicView.Avalonia.Views;assembly=PicView.Avalonia"
  18. xmlns:vm="using:PicView.Avalonia.ViewModels"
  19. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  20. <Design.DataContext>
  21. <vm:MainViewModel />
  22. </Design.DataContext>
  23. <DockPanel PointerPressed="MoveWindow">
  24. <DockPanel
  25. Background="{DynamicResource SecondaryBackgroundColor}"
  26. DockPanel.Dock="Top"
  27. Height="28"
  28. LastChildFill="True"
  29. x:Name="WindowBorder">
  30. <Rectangle DockPanel.Dock="Left" Width="70" />
  31. <customControls:IconButton
  32. BorderBrush="{DynamicResource MainBorderColor}"
  33. BorderThickness="0,0,1,0"
  34. Classes="errorHover"
  35. ClickMode="Release"
  36. Command="{CompiledBinding Tools.RecycleFileCommand}"
  37. CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
  38. FallbackValue=''}"
  39. Data="{StaticResource RecycleGeometry}"
  40. DockPanel.Dock="Right"
  41. Foreground="{StaticResource SecondaryTextColor}"
  42. Height="28"
  43. IconHeight="17"
  44. IconWidth="17"
  45. ToolTip.Tip="{CompiledBinding Translation.DeleteFile.Value,
  46. Mode=OneWay}"
  47. Width="45"
  48. x:Name="RecycleButton" />
  49. <customControls:IconButton
  50. BorderBrush="{DynamicResource MainBorderColor}"
  51. BorderThickness="0,0,1,0"
  52. Classes="noBorderHover"
  53. Command="{Binding Tools.OptimizeImageCommand}"
  54. CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
  55. FallbackValue=''}"
  56. DockPanel.Dock="Right"
  57. Foreground="{StaticResource SecondaryTextColor}"
  58. Height="28"
  59. Icon="{StaticResource PortalImage}"
  60. IconHeight="17"
  61. IconWidth="17"
  62. IsEnabled="{CompiledBinding PicViewer.ShouldOptimizeImageBeEnabled.Value,
  63. Mode=OneWay}"
  64. ToolTip.Tip="{CompiledBinding Translation.OptimizeImage.Value,
  65. Mode=OneWay}"
  66. Width="45"
  67. x:Name="OptimizeButton" />
  68. <customControls:IconButton
  69. BorderBrush="{DynamicResource MainBorderColor}"
  70. BorderThickness="0,0,1,0"
  71. Classes="noBorderHover"
  72. Command="{CompiledBinding Tools.OpenWithCommand}"
  73. CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
  74. FallbackValue=''}"
  75. Data="{StaticResource OpenWithGeometry}"
  76. DockPanel.Dock="Right"
  77. Foreground="{StaticResource SecondaryTextColor}"
  78. Height="28"
  79. IconHeight="17"
  80. IconWidth="17"
  81. ToolTip.Tip="{CompiledBinding Translation.OpenWith.Value,
  82. Mode=OneWay}"
  83. Width="45"
  84. x:Name="OpenWithButton" />
  85. <customControls:IconButton
  86. BorderBrush="{DynamicResource MainBorderColor}"
  87. BorderThickness="0,0,1,0"
  88. Classes="noBorderHover"
  89. Command="{CompiledBinding Tools.PrintCommand}"
  90. CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
  91. FallbackValue=''}"
  92. Data="{StaticResource PrintGeometry}"
  93. DockPanel.Dock="Right"
  94. Foreground="{StaticResource SecondaryTextColor}"
  95. Height="28"
  96. IconHeight="17"
  97. IconWidth="17"
  98. ToolTip.Tip="{CompiledBinding Translation.Print.Value,
  99. Mode=OneWay}"
  100. Width="45"
  101. x:Name="PrintButton" />
  102. <customControls:IconButton
  103. BorderBrush="{DynamicResource MainBorderColor}"
  104. BorderThickness="0,0,1,0"
  105. Classes="noBorderHover"
  106. Command="{CompiledBinding Tools.CopyImageCommand}"
  107. CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
  108. FallbackValue=''}"
  109. DockPanel.Dock="Right"
  110. Foreground="{StaticResource SecondaryTextColor}"
  111. Icon="{StaticResource CopyImages}"
  112. IconHeight="17"
  113. IconWidth="17"
  114. ToolTip.Tip="{CompiledBinding Translation.CopyImage.Value,
  115. Mode=OneWay}"
  116. Width="45"
  117. x:Name="CopyButton" />
  118. <customControls:IconButton
  119. BorderBrush="{DynamicResource MainBorderColor}"
  120. BorderThickness="0,0,1,0"
  121. Classes="noBorderHover"
  122. Command="{CompiledBinding Tools.CopyFileCommand}"
  123. CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
  124. FallbackValue=''}"
  125. Data="{StaticResource CopyGeometry}"
  126. DockPanel.Dock="Right"
  127. Foreground="{StaticResource SecondaryTextColor}"
  128. Height="28"
  129. IconHeight="17"
  130. IconWidth="17"
  131. ToolTip.Tip="{CompiledBinding Translation.CopyFile.Value,
  132. Mode=OneWay}"
  133. Width="45"
  134. x:Name="CopyFileButton" />
  135. <customControls:IconButton
  136. BorderBrush="{DynamicResource MainBorderColor}"
  137. BorderThickness="0,0,1,0"
  138. Classes="noBorderHover"
  139. Command="{CompiledBinding Tools.DuplicateFileCommand}"
  140. CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
  141. FallbackValue=''}"
  142. Data="{StaticResource DuplicateGeometry}"
  143. DockPanel.Dock="Right"
  144. Foreground="{StaticResource SecondaryTextColor}"
  145. Height="28"
  146. IconHeight="17"
  147. IconWidth="17"
  148. ToolTip.Tip="{CompiledBinding Translation.DuplicateFile.Value,
  149. Mode=OneWay}"
  150. Width="45"
  151. x:Name="DuplicateButton" />
  152. <customControls:IconButton
  153. BorderBrush="{DynamicResource MainBorderColor}"
  154. BorderThickness="1,0,1,0"
  155. Classes="noBorderHover"
  156. Command="{CompiledBinding Tools.LocateOnDiskCommand}"
  157. CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
  158. FallbackValue=''}"
  159. Data="{StaticResource ShowInFolderGeometry}"
  160. DockPanel.Dock="Right"
  161. Foreground="{StaticResource SecondaryTextColor}"
  162. Height="28"
  163. IconHeight="17"
  164. IconWidth="17"
  165. ToolTip.Tip="{CompiledBinding Translation.ShowInFolder.Value,
  166. Mode=OneWay}"
  167. Width="45"
  168. x:Name="LocateOnDiskButton" />
  169. <buttons:StarOutlineButtons DockPanel.Dock="Right" x:Name="StarOutlineButtons" />
  170. <customControls:IconButton
  171. BorderBrush="{DynamicResource MainBorderColor}"
  172. BorderThickness="0,0,1,0"
  173. Classes="noBorderHover"
  174. Command="{CompiledBinding Exif.SetExifRating0Command}"
  175. CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
  176. FallbackValue=''}"
  177. DockPanel.Dock="Right"
  178. Foreground="{StaticResource SecondaryTextColor}"
  179. Icon="{StaticResource StarOffImage}"
  180. IconHeight="17"
  181. IconWidth="17"
  182. ToolTip.Tip="{CompiledBinding Translation.RemoveStarRating.Value,
  183. Mode=OneWay}"
  184. Width="35"
  185. x:Name="RemoveRatingButton" />
  186. <TextBlock
  187. Classes="txt"
  188. DockPanel.Dock="Left"
  189. Foreground="{StaticResource SecondaryTextColor}"
  190. Text="{CompiledBinding Translation.ImageInfo.Value,
  191. Mode=OneWay}"
  192. TextAlignment="Center" />
  193. </DockPanel>
  194. <views:ImageInfoView
  195. Background="{DynamicResource WindowBackgroundColor}"
  196. DockPanel.Dock="Bottom"
  197. PointerPressed="MoveWindow"
  198. x:Name="XExifView" />
  199. </DockPanel>
  200. </Window>