From 4aa3b17398f74ecf384889c47b5a623df879f08e Mon Sep 17 00:00:00 2001 From: Geoffroy Bonneville Date: Thu, 5 Oct 2017 18:40:24 +0200 Subject: [PATCH] Some layout enhancements Changed controls to use static or theme resources Switch to light theme (mainly for testing) --- .gitignore | 2 +- ModernKeePass/App.xaml | 8 +-- ModernKeePass/Pages/GroupDetailPage.xaml | 87 ++++++++++++------------ ModernKeePass/ViewModels/EntryVm.cs | 13 ++-- 4 files changed, 53 insertions(+), 57 deletions(-) diff --git a/.gitignore b/.gitignore index fcf4cce..e871643 100644 --- a/.gitignore +++ b/.gitignore @@ -33,7 +33,7 @@ _ReSharper*/ Translation/TrlUtil.vshost.exe.manifest *.nupkg .vs/ -/UpgradeLog.htm +/UpgradeLog*.htm packages/ project.lock.json AppPackages/ \ No newline at end of file diff --git a/ModernKeePass/App.xaml b/ModernKeePass/App.xaml index 86fd33e..9866df7 100644 --- a/ModernKeePass/App.xaml +++ b/ModernKeePass/App.xaml @@ -2,7 +2,7 @@ x:Class="ModernKeePass.App" 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"> + RequestedTheme="Light"> @@ -145,14 +144,14 @@ - - - - - - - - + + + + + + + + diff --git a/ModernKeePass/ViewModels/EntryVm.cs b/ModernKeePass/ViewModels/EntryVm.cs index 19c09ad..0e89a64 100644 --- a/ModernKeePass/ViewModels/EntryVm.cs +++ b/ModernKeePass/ViewModels/EntryVm.cs @@ -1,11 +1,8 @@ -using Windows.UI.Xaml.Controls; +using Windows.UI.Text; +using Windows.UI.Xaml.Controls; using ModernKeePass.Mappings; using ModernKeePassLib; using ModernKeePassLib.Security; -using Windows.UI.Xaml.Media; -using Windows.UI; -using Windows.UI.Text; -using Windows.UI.Xaml; namespace ModernKeePass.ViewModels { @@ -13,6 +10,9 @@ namespace ModernKeePass.ViewModels { public GroupVm ParentGroup { get; } public PwEntry Entry => _pwEntry; + public System.Drawing.Color? BackgroundColor => _pwEntry?.BackgroundColor; + public System.Drawing.Color? ForegroundColor => _pwEntry?.ForegroundColor; + public string Title { get @@ -42,10 +42,7 @@ namespace ModernKeePass.ViewModels get { return GetEntryValue(PwDefs.NotesField); } set { SetEntryValue(PwDefs.NotesField, value); } } - public System.Drawing.Color? BackgroundColor => _pwEntry?.BackgroundColor; - public System.Drawing.Color? ForegroundColor => _pwEntry?.ForegroundColor; - public Symbol IconSymbol { get