mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Added possibility to change groups and entries icons
Add new entry link now hides text depending on width TimePicker uses main color
This commit is contained in:
@@ -77,10 +77,53 @@ namespace ModernKeePass.Converters
|
||||
var symbol = (Symbol) value;
|
||||
switch (symbol)
|
||||
{
|
||||
case Symbol.Delete:
|
||||
return PwIcon.TrashBin;
|
||||
default:
|
||||
return PwIcon.Folder;
|
||||
case Symbol.Delete: return (int)PwIcon.TrashBin;
|
||||
case Symbol.Edit: return (int) PwIcon.Pen;
|
||||
case Symbol.Save: return (int) PwIcon.Disk;
|
||||
case Symbol.Cancel: return (int) PwIcon.Expired;
|
||||
case Symbol.Accept: return (int) PwIcon.Checked;
|
||||
case Symbol.Home: return (int) PwIcon.Home;
|
||||
case Symbol.Camera: return (int) PwIcon.Digicam;
|
||||
case Symbol.Setting: return (int) PwIcon.Configuration;
|
||||
case Symbol.Mail: return (int) PwIcon.EMail;
|
||||
case Symbol.Find: return (int) PwIcon.EMailSearch;
|
||||
case Symbol.Help: return (int) PwIcon.Info;
|
||||
case Symbol.Clock: return (int) PwIcon.Clock;
|
||||
case Symbol.Crop: return (int) PwIcon.Archive;
|
||||
case Symbol.World: return (int) PwIcon.World;
|
||||
case Symbol.Flag: return (int) PwIcon.PaperFlag;
|
||||
case Symbol.PreviewLink: return (int) PwIcon.Certificate;
|
||||
case Symbol.Document: return (int) PwIcon.Notepad;
|
||||
case Symbol.ProtectedDocument: return (int) PwIcon.PaperLocked;
|
||||
case Symbol.ContactInfo: return (int) PwIcon.UserCommunication;
|
||||
case Symbol.ViewAll: return (int) PwIcon.Parts;
|
||||
case Symbol.Rotate: return (int) PwIcon.CDRom;
|
||||
case Symbol.List: return (int) PwIcon.List;
|
||||
case Symbol.Shop: return (int) PwIcon.Money;
|
||||
case Symbol.BrowsePhotos: return (int) PwIcon.Thumbnail;
|
||||
case Symbol.Caption: return (int) PwIcon.Monitor;
|
||||
case Symbol.Repair: return (int) PwIcon.Tool;
|
||||
case Symbol.Page2: return (int) PwIcon.PaperNew;
|
||||
case Symbol.Paste: return (int) PwIcon.ClipboardReady;
|
||||
case Symbol.Important: return (int) PwIcon.Warning;
|
||||
case Symbol.SlideShow: return (int) PwIcon.Console;
|
||||
case Symbol.MapDrive: return (int) PwIcon.NetworkServer;
|
||||
case Symbol.ContactPresence: return (int) PwIcon.UserKey;
|
||||
case Symbol.Contact2: return (int) PwIcon.Identity;
|
||||
case Symbol.Folder: return (int) PwIcon.Folder;
|
||||
case Symbol.View: return (int) PwIcon.IRCommunication;
|
||||
case Symbol.Permissions: return (int) PwIcon.Key;
|
||||
case Symbol.Map: return (int) PwIcon.MarkedDirectory;
|
||||
case Symbol.CellPhone: return (int) PwIcon.BlackBerry;
|
||||
case Symbol.OutlineStar: return (int) PwIcon.Star;
|
||||
case Symbol.Calculator: return (int) PwIcon.Count;
|
||||
case Symbol.Library: return (int) PwIcon.Book;
|
||||
case Symbol.SyncFolder: return (int) PwIcon.PaperReady;
|
||||
case Symbol.GoToStart: return (int) PwIcon.Screen;
|
||||
case Symbol.ZeroBars: return (int) PwIcon.Energy;
|
||||
case Symbol.FourBars: return (int) PwIcon.EnergyCareful;
|
||||
case Symbol.Scan: return (int) PwIcon.Scanner;
|
||||
default: return (int) PwIcon.Key;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -236,6 +236,9 @@
|
||||
<Compile Include="Views\UserControls\HamburgerMenuUserControl.xaml.cs">
|
||||
<DependentUpon>HamburgerMenuUserControl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\UserControls\SymbolPickerUserControl.xaml.cs">
|
||||
<DependentUpon>SymbolPickerUserControl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AppxManifest Include="Package.appxmanifest">
|
||||
@@ -367,6 +370,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\UserControls\SymbolPickerUserControl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="BouncyCastle.Crypto, Version=1.8.2.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
|
||||
|
@@ -1168,4 +1168,67 @@
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- Custom style for Windows.UI.Xaml.Controls.TimePicker -->
|
||||
<Style TargetType="TimePicker" x:Name="MainColorTimePicker">
|
||||
<Setter Property="IsTabStop" Value="False" />
|
||||
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
|
||||
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
|
||||
<Setter Property="Foreground" Value="{ThemeResource TimePickerForegroundThemeBrush}"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="TimePicker">
|
||||
<Border x:Name="LayoutRoot"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}">
|
||||
<Grid Margin="{TemplateBinding Padding}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<ContentPresenter x:Name="HeaderContentPresenter"
|
||||
Foreground="{ThemeResource TimePickerHeaderForegroundThemeBrush}"
|
||||
Margin="{ThemeResource TimePickerHeaderThemeMargin}"
|
||||
FlowDirection="{TemplateBinding FlowDirection}"
|
||||
Content="{TemplateBinding Header}"
|
||||
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
||||
FontWeight="{ThemeResource TimePickerHeaderThemeFontWeight}" />
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal">
|
||||
<Border x:Name="FirstPickerHost" Margin="{ThemeResource TimePickerFirstHostThemeMargin}">
|
||||
<ComboBox x:Name="HourPicker"
|
||||
MinWidth="{ThemeResource TimePickerSelectorThemeMinWidth}"
|
||||
FontWeight="{TemplateBinding FontWeight}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
FontFamily="{TemplateBinding FontFamily}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
ItemContainerStyle="{StaticResource MainColorComboBoxItem}" />
|
||||
</Border>
|
||||
<Border x:Name="SecondPickerHost">
|
||||
<ComboBox x:Name="MinutePicker"
|
||||
MinWidth="{ThemeResource TimePickerSelectorThemeMinWidth}"
|
||||
FontWeight="{TemplateBinding FontWeight}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
FontFamily="{TemplateBinding FontFamily}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
ItemContainerStyle="{StaticResource MainColorComboBoxItem}" />
|
||||
</Border>
|
||||
<Border x:Name="ThirdPickerHost" Margin="{ThemeResource TimePickerThirdHostThemeMargin}">
|
||||
<ComboBox x:Name="PeriodPicker"
|
||||
MinWidth="{ThemeResource TimePickerSelectorThemeMinWidth}"
|
||||
FontWeight="{TemplateBinding FontWeight}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
FontFamily="{TemplateBinding FontFamily}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
ItemContainerStyle="{StaticResource MainColorComboBoxItem}" />
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
@@ -402,4 +402,10 @@
|
||||
<data name="EntryForegroundColor.Text" xml:space="preserve">
|
||||
<value>Foreground color</value>
|
||||
</data>
|
||||
<data name="EntrySymbol.Text" xml:space="preserve">
|
||||
<value>Icon</value>
|
||||
</data>
|
||||
<data name="AddEntryTooltip.Content" xml:space="preserve">
|
||||
<value>Create a new entry</value>
|
||||
</data>
|
||||
</root>
|
@@ -402,4 +402,10 @@
|
||||
<data name="EntryForegroundColor.Text" xml:space="preserve">
|
||||
<value>Couleur du texte</value>
|
||||
</data>
|
||||
<data name="EntrySymbol.Text" xml:space="preserve">
|
||||
<value>Icône</value>
|
||||
</data>
|
||||
<data name="AddEntryTooltip.Content" xml:space="preserve">
|
||||
<value>Créer une nouvelle entrée</value>
|
||||
</data>
|
||||
</root>
|
@@ -88,9 +88,11 @@ namespace ModernKeePass.ViewModels
|
||||
{
|
||||
get
|
||||
{
|
||||
if (HasExpired) return (int) PwIcon.Expired;
|
||||
if (_pwEntry?.IconId != null) return (int) _pwEntry?.IconId;
|
||||
return -1;
|
||||
}
|
||||
set { _pwEntry.IconId = (PwIcon)value; }
|
||||
}
|
||||
|
||||
public DateTimeOffset ExpiryDate
|
||||
|
@@ -21,6 +21,7 @@
|
||||
<converters:DoubleToSolidColorBrushConverter x:Key="DoubleToForegroungBrushComplexityConverter" />
|
||||
<converters:NullToBooleanConverter x:Key="NullToBooleanConverter" />
|
||||
<converters:ColorToBrushConverter x:Key="ColorToBrushConverter" />
|
||||
<converters:IntToSymbolConverter x:Key="IntToSymbolConverter" />
|
||||
<Style TargetType="PasswordBox" x:Name="PasswordBoxWithButtonStyle">
|
||||
<Setter Property="MinWidth" Value="{ThemeResource TextControlThemeMinWidth}" />
|
||||
<Setter Property="MinHeight" Value="{ThemeResource TextControlThemeMinHeight}" />
|
||||
@@ -490,7 +491,7 @@
|
||||
</SymbolIcon>
|
||||
<StackPanel Grid.Column="1" x:Name="ExpirationDatePanel" Orientation="Horizontal" Visibility="{Binding HasExpirationDate, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
<DatePicker Margin="0,0,20,0" Date="{Binding ExpiryDate, Mode=TwoWay}" Style="{StaticResource MainColorDatePicker}" />
|
||||
<TimePicker Time="{Binding ExpiryTime, Mode=TwoWay}"/>
|
||||
<TimePicker Time="{Binding ExpiryTime, Mode=TwoWay}" Style="{StaticResource MainColorTimePicker}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<Grid Visibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
@@ -507,6 +508,8 @@
|
||||
<userControls:ColorPickerUserControl Grid.Column="0" Grid.Row="1" SelectedColor="{Binding BackgroundColor, Converter={StaticResource ColorToBrushConverter}, Mode=TwoWay}" />
|
||||
<TextBlock x:Uid="EntryForegroundColor" Grid.Column="1" Grid.Row="0" />
|
||||
<userControls:ColorPickerUserControl Grid.Column="1" Grid.Row="1" SelectedColor="{Binding ForegroundColor, Converter={StaticResource ColorToBrushConverter}, Mode=TwoWay}" />
|
||||
<TextBlock x:Uid="EntrySymbol" Grid.Column="2" Grid.Row="0" />
|
||||
<userControls:SymbolPickerUserControl Grid.Column="2" Grid.Row="1" SelectedSymbol="{Binding IconId, Converter={StaticResource IntToSymbolConverter}, Mode=TwoWay}" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
@@ -106,116 +106,135 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<userControls:HamburgerMenuUserControl x:Uid="GroupsLeftListView" ItemsSource="{Binding Groups}" SelectionChanged="groups_SelectionChanged" ButtonClicked="CreateGroup_ButtonClick" ResizeTarget="{Binding ElementName=LeftListViewColumn}" IsButtonVisible="{Binding IsSelected, Converter={StaticResource InverseBooleanToVisibilityConverter}}" />
|
||||
<TextBlock Grid.Column="1" x:Uid="ReorderEntriesLabel" Margin="20,20,0,0" Visibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}" Style="{StaticResource BodyTextBlockStyle}" />
|
||||
<HyperlinkButton Grid.Column="1" VerticalAlignment="Top" Margin="40,10,0,0" Click="CreateEntry_ButtonClick" Visibility="{Binding IsSelected, Converter={StaticResource InverseBooleanToVisibilityConverter}}" HorizontalAlignment="Right" Foreground="{StaticResource MainColor}" Style="{StaticResource MainColorHyperlinkButton}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<SymbolIcon Symbol="Add"></SymbolIcon>
|
||||
<TextBlock x:Uid="GroupCreateEntry" VerticalAlignment="Center" Margin="10,0,0,0" />
|
||||
</StackPanel>
|
||||
</HyperlinkButton>
|
||||
<SemanticZoom Grid.Column="1" ViewChangeStarted="SemanticZoom_ViewChangeStarted" Margin="20,60,0,0" ScrollViewer.HorizontalScrollBarVisibility="Visible">
|
||||
<SemanticZoom.ZoomedInView>
|
||||
<!-- Horizontal scrolling grid -->
|
||||
<GridView
|
||||
x:Name="GridView"
|
||||
ItemsSource="{Binding Source={StaticResource EntriesViewSource}}"
|
||||
AutomationProperties.AutomationId="ItemGridView"
|
||||
AutomationProperties.Name="Entries"
|
||||
TabIndex="1"
|
||||
SelectionChanged="entries_SelectionChanged"
|
||||
IsSynchronizedWithCurrentItem="False"
|
||||
BorderBrush="{StaticResource ListViewItemSelectedBackgroundThemeBrush}"
|
||||
AllowDrop="True"
|
||||
CanReorderItems="True"
|
||||
CanDragItems="True"
|
||||
DragItemsStarting="GridView_DragItemsStarting">
|
||||
<interactivity:Interaction.Behaviors>
|
||||
<core:DataTriggerBehavior Binding="{Binding IsEditMode}" Value="False">
|
||||
<actions:SetupFocusAction TargetObject="{Binding ElementName=GridView}" />
|
||||
</core:DataTriggerBehavior>
|
||||
</interactivity:Interaction.Behaviors>
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Height="110" Width="480" x:Name="EntryGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Grid.Column="0" Background="{Binding BackgroundColor, ConverterParameter={StaticResource MainColor}, Converter={StaticResource ColorToBrushConverter}}">
|
||||
<Viewbox MaxHeight="50" Width="100">
|
||||
<SymbolIcon Symbol="{Binding IconId, Converter={StaticResource IntToSymbolConverter}}" Foreground="{StaticResource TextColor}" />
|
||||
</Viewbox>
|
||||
</Border>
|
||||
<StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="10,10,0,0" >
|
||||
<TextBlock x:Name="NameTextBlock" Text="{Binding Name}" Style="{StaticResource TitleTextBlockStyle}" TextWrapping="NoWrap" Foreground="{Binding ForegroundColor, ConverterParameter={StaticResource TextBoxForegroundThemeBrush}, Converter={StaticResource ColorToBrushConverter}}"/>
|
||||
<TextBlock Style="{StaticResource CaptionTextBlockStyle}" TextWrapping="NoWrap" />
|
||||
<TextBlock Text="{Binding UserName}" Style="{StaticResource BodyTextBlockStyle}" Foreground="{Binding ForegroundColor, ConverterParameter={StaticResource TextBoxForegroundThemeBrush}, Converter={StaticResource ColorToBrushConverter}}" MaxHeight="60" />
|
||||
<TextBlock Text="{Binding Url}" Style="{StaticResource BodyTextBlockStyle}" Foreground="{Binding ForegroundColor, ConverterParameter={StaticResource TextBoxForegroundThemeBrush}, Converter={StaticResource ColorToBrushConverter}}" MaxHeight="60" />
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="50" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Grid.Row="0" x:Uid="ReorderEntriesLabel" Margin="10,10,0,0" Visibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}" Style="{StaticResource BodyTextBlockStyle}" />
|
||||
<!--<TextBlock Grid.Column="1" Grid.Row="0" x:Uid="EntrySymbol" Margin="40,20,0,0" Visibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}" Style="{StaticResource BodyTextBlockStyle}" />-->
|
||||
<userControls:SymbolPickerUserControl Grid.Column="1" Grid.Row="0" Width="80" Height="40" SelectedSymbol="{Binding IconId, Converter={StaticResource IntToSymbolConverter}, Mode=TwoWay}" Visibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}"></userControls:SymbolPickerUserControl>
|
||||
<HyperlinkButton Grid.Column="2" Grid.Row="0" VerticalAlignment="Top" Click="CreateEntry_ButtonClick" Visibility="{Binding IsSelected, Converter={StaticResource InverseBooleanToVisibilityConverter}}" HorizontalAlignment="Right" Foreground="{StaticResource MainColor}" Style="{StaticResource MainColorHyperlinkButton}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<SymbolIcon Symbol="Add">
|
||||
<ToolTipService.ToolTip>
|
||||
<ToolTip x:Uid="AddEntryTooltip" />
|
||||
</ToolTipService.ToolTip>
|
||||
</SymbolIcon>
|
||||
<TextBlock x:Name="AddEntryTextBlock" x:Uid="GroupCreateEntry" VerticalAlignment="Center" Margin="10,0,0,0" />
|
||||
</StackPanel>
|
||||
</HyperlinkButton>
|
||||
|
||||
<SemanticZoom Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" ViewChangeStarted="SemanticZoom_ViewChangeStarted" ScrollViewer.HorizontalScrollBarVisibility="Visible">
|
||||
<SemanticZoom.ZoomedInView>
|
||||
<!-- Horizontal scrolling grid -->
|
||||
<GridView
|
||||
x:Name="GridView"
|
||||
ItemsSource="{Binding Source={StaticResource EntriesViewSource}}"
|
||||
AutomationProperties.AutomationId="ItemGridView"
|
||||
AutomationProperties.Name="Entries"
|
||||
TabIndex="1"
|
||||
SelectionChanged="entries_SelectionChanged"
|
||||
IsSynchronizedWithCurrentItem="False"
|
||||
BorderBrush="{StaticResource ListViewItemSelectedBackgroundThemeBrush}"
|
||||
AllowDrop="True"
|
||||
CanReorderItems="True"
|
||||
CanDragItems="True"
|
||||
DragItemsStarting="GridView_DragItemsStarting">
|
||||
<interactivity:Interaction.Behaviors>
|
||||
<core:DataTriggerBehavior Binding="{Binding IsEditMode}" Value="False">
|
||||
<actions:SetupFocusAction TargetObject="{Binding ElementName=GridView}" />
|
||||
</core:DataTriggerBehavior>
|
||||
</interactivity:Interaction.Behaviors>
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Height="110" Width="480" x:Name="EntryGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Grid.Column="0" Background="{Binding BackgroundColor, ConverterParameter={StaticResource MainColor}, Converter={StaticResource ColorToBrushConverter}}">
|
||||
<Viewbox MaxHeight="50" Width="100">
|
||||
<SymbolIcon Symbol="{Binding IconId, Converter={StaticResource IntToSymbolConverter}}" Foreground="{StaticResource TextColor}" />
|
||||
</Viewbox>
|
||||
</Border>
|
||||
<StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="10,10,0,0" >
|
||||
<TextBlock x:Name="NameTextBlock" Text="{Binding Name}" Style="{StaticResource TitleTextBlockStyle}" TextWrapping="NoWrap" Foreground="{Binding ForegroundColor, ConverterParameter={StaticResource TextBoxForegroundThemeBrush}, Converter={StaticResource ColorToBrushConverter}}"/>
|
||||
<TextBlock Style="{StaticResource CaptionTextBlockStyle}" TextWrapping="NoWrap" />
|
||||
<TextBlock Text="{Binding UserName}" Style="{StaticResource BodyTextBlockStyle}" Foreground="{Binding ForegroundColor, ConverterParameter={StaticResource TextBoxForegroundThemeBrush}, Converter={StaticResource ColorToBrushConverter}}" MaxHeight="60" />
|
||||
<TextBlock Text="{Binding Url}" Style="{StaticResource BodyTextBlockStyle}" Foreground="{Binding ForegroundColor, ConverterParameter={StaticResource TextBoxForegroundThemeBrush}, Converter={StaticResource ColorToBrushConverter}}" MaxHeight="60" />
|
||||
</StackPanel>
|
||||
<Button Grid.Column="2" Style="{StaticResource NoBorderButtonStyle}" Background="{Binding BackgroundColor, ConverterParameter={StaticResource AppBarBackgroundThemeBrush}, Converter={StaticResource ColorToBrushConverter}}" VerticalAlignment="Bottom">
|
||||
<SymbolIcon Symbol="More" />
|
||||
<Button.Flyout>
|
||||
<MenuFlyout>
|
||||
<MenuFlyoutItem x:Uid="EntryItemCopyLogin">
|
||||
<interactivity:Interaction.Behaviors>
|
||||
<core:EventTriggerBehavior EventName="Click">
|
||||
<actions:ClipboardAction Text="{Binding UserName}" />
|
||||
<actions:ToastAction x:Uid="ToastCopyLogin" Title="{Binding Name}" />
|
||||
</core:EventTriggerBehavior>
|
||||
</interactivity:Interaction.Behaviors>
|
||||
</MenuFlyoutItem>
|
||||
<MenuFlyoutItem x:Uid="EntryItemCopyPassword">
|
||||
<interactivity:Interaction.Behaviors>
|
||||
<core:EventTriggerBehavior EventName="Click">
|
||||
<actions:ClipboardAction Text="{Binding Password}" />
|
||||
<actions:ToastAction x:Uid="ToastCopyPassword" Title="{Binding Name}" />
|
||||
</core:EventTriggerBehavior>
|
||||
</interactivity:Interaction.Behaviors>
|
||||
</MenuFlyoutItem>
|
||||
<MenuFlyoutItem x:Uid="EntryItemCopyUrl">
|
||||
<interactivity:Interaction.Behaviors>
|
||||
<core:EventTriggerBehavior EventName="Click">
|
||||
<actions:NavigateToUrlAction Url="{Binding Url}" />
|
||||
<actions:ToastAction x:Uid="ToastCopyUrl" Title="{Binding Name}" />
|
||||
</core:EventTriggerBehavior>
|
||||
</interactivity:Interaction.Behaviors>
|
||||
</MenuFlyoutItem>
|
||||
</MenuFlyout>
|
||||
</Button.Flyout>
|
||||
</Button>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
</SemanticZoom.ZoomedInView>
|
||||
<SemanticZoom.ZoomedOutView>
|
||||
<GridView
|
||||
ItemsSource="{Binding Source={StaticResource EntriesZoomedOutViewSource}}"
|
||||
SelectionChanged="groups_SelectionChanged"
|
||||
SelectionMode="None"
|
||||
IsSynchronizedWithCurrentItem="False">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Width="100" Text="{Binding Name}" Style="{StaticResource TitleTextBlockStyle}" TextWrapping="NoWrap"/>
|
||||
</StackPanel>
|
||||
<Button Grid.Column="2" Style="{StaticResource NoBorderButtonStyle}" Background="{Binding BackgroundColor, ConverterParameter={StaticResource AppBarBackgroundThemeBrush}, Converter={StaticResource ColorToBrushConverter}}" VerticalAlignment="Bottom">
|
||||
<SymbolIcon Symbol="More" />
|
||||
<Button.Flyout>
|
||||
<MenuFlyout>
|
||||
<MenuFlyoutItem x:Uid="EntryItemCopyLogin">
|
||||
<interactivity:Interaction.Behaviors>
|
||||
<core:EventTriggerBehavior EventName="Click">
|
||||
<actions:ClipboardAction Text="{Binding UserName}" />
|
||||
<actions:ToastAction x:Uid="ToastCopyLogin" Title="{Binding Name}" />
|
||||
</core:EventTriggerBehavior>
|
||||
</interactivity:Interaction.Behaviors>
|
||||
</MenuFlyoutItem>
|
||||
<MenuFlyoutItem x:Uid="EntryItemCopyPassword">
|
||||
<interactivity:Interaction.Behaviors>
|
||||
<core:EventTriggerBehavior EventName="Click">
|
||||
<actions:ClipboardAction Text="{Binding Password}" />
|
||||
<actions:ToastAction x:Uid="ToastCopyPassword" Title="{Binding Name}" />
|
||||
</core:EventTriggerBehavior>
|
||||
</interactivity:Interaction.Behaviors>
|
||||
</MenuFlyoutItem>
|
||||
<MenuFlyoutItem x:Uid="EntryItemCopyUrl">
|
||||
<interactivity:Interaction.Behaviors>
|
||||
<core:EventTriggerBehavior EventName="Click">
|
||||
<actions:NavigateToUrlAction Url="{Binding Url}" />
|
||||
<actions:ToastAction x:Uid="ToastCopyUrl" Title="{Binding Name}" />
|
||||
</core:EventTriggerBehavior>
|
||||
</interactivity:Interaction.Behaviors>
|
||||
</MenuFlyoutItem>
|
||||
</MenuFlyout>
|
||||
</Button.Flyout>
|
||||
</Button>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
</SemanticZoom.ZoomedInView>
|
||||
<SemanticZoom.ZoomedOutView>
|
||||
<GridView
|
||||
ItemsSource="{Binding Source={StaticResource EntriesZoomedOutViewSource}}"
|
||||
SelectionChanged="groups_SelectionChanged"
|
||||
SelectionMode="None"
|
||||
IsSynchronizedWithCurrentItem="False">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Width="100" Text="{Binding Name}" Style="{StaticResource TitleTextBlockStyle}" TextWrapping="NoWrap"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
<GridView.GroupStyle>
|
||||
<GroupStyle HidesIfEmpty="True">
|
||||
<GroupStyle.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Background="LightGray" HorizontalAlignment="Left">
|
||||
<TextBlock Text="{Binding Key}" Width="40" Margin="30" Foreground="Black" Style="{StaticResource HeaderTextBlockStyle}" TextAlignment="Center" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</GroupStyle.HeaderTemplate>
|
||||
</GroupStyle>
|
||||
</GridView.GroupStyle>
|
||||
</GridView>
|
||||
</SemanticZoom.ZoomedOutView>
|
||||
</SemanticZoom>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
<GridView.GroupStyle>
|
||||
<GroupStyle HidesIfEmpty="True">
|
||||
<GroupStyle.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Background="LightGray" HorizontalAlignment="Left">
|
||||
<TextBlock Text="{Binding Key}" Width="40" Margin="30" Foreground="Black" Style="{StaticResource HeaderTextBlockStyle}" TextAlignment="Center" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</GroupStyle.HeaderTemplate>
|
||||
</GroupStyle>
|
||||
</GridView.GroupStyle>
|
||||
</GridView>
|
||||
</SemanticZoom.ZoomedOutView>
|
||||
</SemanticZoom>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
<!-- Back button and page title -->
|
||||
<Grid Grid.Row="0" Background="{ThemeResource AppBarBackgroundThemeBrush}">
|
||||
@@ -299,6 +318,9 @@
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchBox" Storyboard.TargetProperty="Visibility">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="AddEntryTextBlock" Storyboard.TargetProperty="Visibility">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Large">
|
||||
@@ -309,6 +331,9 @@
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchBox" Storyboard.TargetProperty="Visibility">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="AddEntryTextBlock" Storyboard.TargetProperty="Visibility">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
|
@@ -5,7 +5,7 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d">
|
||||
<ComboBox x:Name="ComboBox" ItemsSource="{Binding Colors, ElementName=UserControl}" SelectionChanged="Selector_OnSelectionChanged">
|
||||
<ComboBox x:Name="ComboBox" ItemsSource="{Binding Colors, ElementName=UserControl}" SelectionChanged="Selector_OnSelectionChanged" Loaded="ComboBox_Loaded" ItemContainerStyle="{StaticResource MainColorComboBoxItem}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,10,0">
|
||||
|
@@ -45,7 +45,6 @@ namespace ModernKeePass.Views.UserControls
|
||||
ColorBrush = new SolidColorBrush((Windows.UI.Color)propertyInfo.GetValue(null, null))
|
||||
});
|
||||
}
|
||||
ComboBox.Loaded += ComboBox_Loaded;
|
||||
}
|
||||
|
||||
private void ComboBox_Loaded(object sender, RoutedEventArgs e)
|
||||
|
@@ -0,0 +1,17 @@
|
||||
<UserControl x:Name="UserControl"
|
||||
x:Class="ModernKeePass.Views.UserControls.SymbolPickerUserControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d">
|
||||
<ComboBox x:Name="ComboBox" ItemsSource="{Binding Symbols, ElementName=UserControl}" SelectedItem="{Binding SelectedSymbol, ElementName=UserControl, Mode=TwoWay}" Loaded="ComboBox_OnLoaded" ItemContainerStyle="{StaticResource MainColorComboBoxItem}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,10,0">
|
||||
<SymbolIcon Symbol="{Binding}" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
</UserControl>
|
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
|
||||
// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236
|
||||
|
||||
namespace ModernKeePass.Views.UserControls
|
||||
{
|
||||
public sealed partial class SymbolPickerUserControl
|
||||
{
|
||||
public Symbol[] Symbols { get; }
|
||||
|
||||
public Symbol SelectedSymbol
|
||||
{
|
||||
get { return (Symbol)GetValue(SelectedSymbolProperty); }
|
||||
set { SetValue(SelectedSymbolProperty, value); }
|
||||
}
|
||||
public static readonly DependencyProperty SelectedSymbolProperty =
|
||||
DependencyProperty.Register(
|
||||
"SelectedSymbol",
|
||||
typeof(Symbol),
|
||||
typeof(SymbolPickerUserControl),
|
||||
new PropertyMetadata(Symbol.Stop, (o, args) => { }));
|
||||
|
||||
public SymbolPickerUserControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Symbols = (Symbol[])Enum.GetValues(typeof(Symbol));
|
||||
}
|
||||
|
||||
private void ComboBox_OnLoaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ComboBox.SelectedItem = Symbols.FirstOrDefault(s => s == SelectedSymbol);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,6 +1,7 @@
|
||||
Entry history feature added
|
||||
App now uses Windows theme color as its base color
|
||||
You can now change entries background and foreground colors
|
||||
You can now change groups and entries icons
|
||||
Design improvements
|
||||
Bug corrections
|
||||
KeePassLib version bump to 2.39.1
|
@@ -1,6 +1,7 @@
|
||||
Ajout de la fonctionnalite d'historique des entrees
|
||||
L'application utilise la couleur de theme de Windows en tant que couleur principale
|
||||
Il est desormais possible de changer la couleur de fond et de texte des entrees
|
||||
Il est desormais possible de changer l'icone des groupes et des entrees
|
||||
Ameliorations de design
|
||||
Corrections de bugs
|
||||
Version de la KeePassLib passe a 2.39.1
|
Reference in New Issue
Block a user