Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed LivelyProperties not saving when changed from control panel..
- Improved LivelyProperties control visuals. - Fixed selected screen wallpaper LivelyProperties not saving if customise menu is opened while wallpaper is not running. - Fixed selected library item not updating when switching between SelectionMode None and Single.
- Loading branch information
1 parent
e476b13
commit 2f8d94b
Showing
9 changed files
with
236 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/Lively/Lively.UI.WinUI/Helpers/Converters/StringTruncateConverter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Microsoft.UI.Xaml.Data; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Lively.UI.WinUI.Helpers.Converters | ||
{ | ||
public class StringTruncateConverter : IValueConverter | ||
{ | ||
public object Convert(object value, Type targetType, object parameter, string language) | ||
{ | ||
if (value is string str && parameter is int maxLength && str.Length > maxLength) | ||
{ | ||
return string.Concat(str.AsSpan(0, maxLength), "..."); | ||
} | ||
return value; | ||
} | ||
|
||
public object ConvertBack(object value, Type targetType, object parameter, string language) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.