From ee00417c6ff54b3941633f359686f87d0eadeb7c Mon Sep 17 00:00:00 2001
From: Mbucari <37587114+Mbucari@users.noreply.github.com>
Date: Sat, 5 Aug 2023 09:31:46 -0600
Subject: [PATCH 1/9] Add white glow to libation_glass.svg (#701)
---
Images/libation_glass.svg | 65 ++++++++++++-------
.../LinuxConfigApp/libation_glass.svg | 65 ++++++++++++-------
2 files changed, 82 insertions(+), 48 deletions(-)
diff --git a/Images/libation_glass.svg b/Images/libation_glass.svg
index d3a0a092..9e5ebdb9 100644
--- a/Images/libation_glass.svg
+++ b/Images/libation_glass.svg
@@ -1,28 +1,45 @@
-
diff --git a/Source/LoadByOS/LinuxConfigApp/libation_glass.svg b/Source/LoadByOS/LinuxConfigApp/libation_glass.svg
index db08f07f..9e5ebdb9 100644
--- a/Source/LoadByOS/LinuxConfigApp/libation_glass.svg
+++ b/Source/LoadByOS/LinuxConfigApp/libation_glass.svg
@@ -1,28 +1,45 @@
-
From 4b2ce0c2d168bbaf9fd3e4683303319b8abb5d61 Mon Sep 17 00:00:00 2001
From: Mbucari
Date: Mon, 7 Aug 2023 11:31:22 -0600
Subject: [PATCH 2/9] Brighter stoplight colors (#702)
---
Source/LibationAvalonia/App.axaml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Source/LibationAvalonia/App.axaml b/Source/LibationAvalonia/App.axaml
index 6716b9de..c64108d2 100644
--- a/Source/LibationAvalonia/App.axaml
+++ b/Source/LibationAvalonia/App.axaml
@@ -44,9 +44,9 @@
-
-
-
+
+
+
From 97f94d8782ddd12dbf1b73f33e45970c416afec2 Mon Sep 17 00:00:00 2001
From: Mbucari
Date: Mon, 7 Aug 2023 15:54:50 -0600
Subject: [PATCH 3/9] Add custom column widths to chardonnay
---
.../ViewModels/ProductsDisplayViewModel.cs | 50 +++++++++++++++++--
.../Views/ProductsDisplay.axaml | 42 ++++++++--------
2 files changed, 68 insertions(+), 24 deletions(-)
diff --git a/Source/LibationAvalonia/ViewModels/ProductsDisplayViewModel.cs b/Source/LibationAvalonia/ViewModels/ProductsDisplayViewModel.cs
index dec5ca7c..419b387a 100644
--- a/Source/LibationAvalonia/ViewModels/ProductsDisplayViewModel.cs
+++ b/Source/LibationAvalonia/ViewModels/ProductsDisplayViewModel.cs
@@ -1,15 +1,18 @@
using ApplicationServices;
using AudibleUtilities;
using Avalonia.Collections;
+using Avalonia.Controls;
using Avalonia.Threading;
using DataLayer;
using LibationAvalonia.Dialogs.Login;
+using LibationFileManager;
using LibationUiBase.GridView;
using ReactiveUI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
+using System.Runtime.CompilerServices;
using System.Threading.Tasks;
namespace LibationAvalonia.ViewModels
@@ -27,8 +30,8 @@ namespace LibationAvalonia.ViewModels
public string FilterString { get; private set; }
public DataGridCollectionView GridEntries { get; private set; }
- private bool _removeColumnVisivle;
- public bool RemoveColumnVisivle { get => _removeColumnVisivle; private set => this.RaiseAndSetIfChanged(ref _removeColumnVisivle, value); }
+ private bool _removeColumnVisible;
+ public bool RemoveColumnVisible { get => _removeColumnVisible; private set => this.RaiseAndSetIfChanged(ref _removeColumnVisible, value); }
public List GetVisibleBookEntries()
=> FilteredInGridEntries?
@@ -321,7 +324,7 @@ namespace LibationAvalonia.ViewModels
{
foreach (var item in SOURCE)
item.PropertyChanged -= GridEntry_PropertyChanged;
- RemoveColumnVisivle = false;
+ RemoveColumnVisible = false;
}
public async Task RemoveCheckedBooksAsync()
@@ -376,7 +379,7 @@ namespace LibationAvalonia.ViewModels
item.PropertyChanged += GridEntry_PropertyChanged;
}
- RemoveColumnVisivle = true;
+ RemoveColumnVisible = true;
RemovableCountChanged?.Invoke(this, 0);
try
@@ -421,5 +424,44 @@ namespace LibationAvalonia.ViewModels
}
#endregion
+
+ #region Column Widths
+
+ public DataGridLength TitleWidth { get => getColumnWidth("Title", 200); set => setColumnWidth("Title", value); }
+ public DataGridLength AuthorsWidth { get => getColumnWidth("Authors", 100); set => setColumnWidth("Authors", value); }
+ public DataGridLength NarratorsWidth { get => getColumnWidth("Narrators", 100); set => setColumnWidth("Narrators", value); }
+ public DataGridLength LengthWidth { get => getColumnWidth("Length", 80); set => setColumnWidth("Length", value); }
+ public DataGridLength SeriesWidth { get => getColumnWidth("Series", 100); set => setColumnWidth("Series", value); }
+ public DataGridLength SeriesOrderWidth { get => getColumnWidth("SeriesOrder", 60); set => setColumnWidth("SeriesOrder", value); }
+ public DataGridLength DescriptionWidth { get => getColumnWidth("Description", 100); set => setColumnWidth("Description", value); }
+ public DataGridLength CategoryWidth { get => getColumnWidth("Category", 100); set => setColumnWidth("Category", value); }
+ public DataGridLength ProductRatingWidth { get => getColumnWidth("ProductRating", 95); set => setColumnWidth("ProductRating", value); }
+ public DataGridLength PurchaseDateWidth { get => getColumnWidth("PurchaseDate", 75); set => setColumnWidth("PurchaseDate", value); }
+ public DataGridLength MyRatingWidth { get => getColumnWidth("MyRating", 95); set => setColumnWidth("MyRating", value); }
+ public DataGridLength MiscWidth { get => getColumnWidth("Misc", 140); set => setColumnWidth("Misc", value); }
+ public DataGridLength LastDownloadWidth { get => getColumnWidth("LastDownload", 100); set => setColumnWidth("LastDownload", value); }
+ public DataGridLength BookTagsWidth { get => getColumnWidth("BookTags", 100); set => setColumnWidth("BookTags", value); }
+
+ private static DataGridLength getColumnWidth(string columnName, double defaultWidth)
+ => Configuration.Instance.GridColumnsWidths.TryGetValue(columnName, out var val)
+ ? new DataGridLength(val)
+ : new DataGridLength(defaultWidth);
+
+ private void setColumnWidth(string columnName, DataGridLength width, [CallerMemberName] string propertyName = "")
+ {
+ var dictionary = Configuration.Instance.GridColumnsWidths;
+
+ var newValue = (int)width.DisplayValue;
+ var valueSame = dictionary.TryGetValue(columnName, out var val) && val == newValue;
+ dictionary[columnName] = newValue;
+
+ if (!valueSame)
+ {
+ Configuration.Instance.GridColumnsWidths = dictionary;
+ this.RaisePropertyChanged(propertyName);
+ }
+ }
+
+ #endregion
}
}
diff --git a/Source/LibationAvalonia/Views/ProductsDisplay.axaml b/Source/LibationAvalonia/Views/ProductsDisplay.axaml
index 4c7e8804..fd90a1c1 100644
--- a/Source/LibationAvalonia/Views/ProductsDisplay.axaml
+++ b/Source/LibationAvalonia/Views/ProductsDisplay.axaml
@@ -17,6 +17,7 @@
AutoGenerateColumns="False"
ItemsSource="{Binding GridEntries}"
CanUserSortColumns="True" BorderThickness="3"
+ CanUserResizeColumns="True"
CanUserReorderColumns="True">
@@ -45,10 +46,11 @@
-
+
-
+
-
+
-
+
-
+
@@ -98,7 +100,7 @@
-
+
@@ -108,7 +110,7 @@
-
+
@@ -118,7 +120,7 @@
-
+
@@ -128,7 +130,7 @@
-
+
@@ -138,7 +140,7 @@
-
+
@@ -148,7 +150,7 @@
-
+
@@ -158,7 +160,7 @@
-
+
@@ -172,14 +174,14 @@
x:DataType="uibase:IGridEntry"
Header="Product
Rating"
IsReadOnly="true"
- Width="115"
+ MinWidth="10" Width="{Binding ProductRatingWidth, Mode=TwoWay}"
SortMemberPath="ProductRating" CanUserSort="True"
OpacityBinding="{CompiledBinding Liberate.Opacity}"
BackgroundBinding="{CompiledBinding Liberate.BackgroundBrush}"
ClipboardContentBinding="{CompiledBinding ProductRating}"
Binding="{CompiledBinding ProductRating}" />
-
+
@@ -191,16 +193,16 @@
-
+
@@ -210,7 +212,7 @@
-
+
@@ -220,7 +222,7 @@
-
+