Skip to content

Commit

Permalink
Updates to v3.6-pre / v1.2-pre
Browse files Browse the repository at this point in the history
-= Re-designing of UI Controls (Focus on WPF) =-

New Features / Resolved Issues
 - Introduces FlyleafHost Renderer D3D Surface (WPF VideoView's replacement and Flyleaf's for Winforms)
  * Early and fast initialization of handles and renderer which will also resolve several issues (related to #204)
  * Adds Attach / Detach functionality
  * Self Drag Move also on attach mode (within the host's owner bounds)
  * Drag n Drop Swap between FlyleafHosts (Shift + Drag)
  * Custom non-borders resizable windows both on attach and detach mode
  * Better UI Performance overall (including Swaps and Switching between Normal to Full Screen)
  * Adds Z-order surfaces support (related to #149)
  * Adds support for WPF Windows to the Renderer in addition to WinForms UserControl
  * Resolves several issues when the host's rectangle was clipped (related to #170)

 - Introduces FlyleafME WPF Media Element Control (WPF Flyleaf Control replacement)
  * Updated with the new FlyleafHost and gains better performance
  * Code clean-up and styles to allow easier override and customization
  * Early initialization and respect to the provided configuration (such as Activity Timeout, UI Refresh, Key bindings etc.)

 - Code clean-up and performance improvements
 - Resolves several issues with DPI  (related to #197)

Breaking Changes
 * VideoView has been renamed to FlyleafHost
 * Flyleaf (WPF Control) has been renamed to FlyleafME (Media Element) and does not require a FlyleafHost as it was required previously with the VideoView (it derives from it)
 * Player.IsFullScreen, Config.Player.ActivityTimeout, Config.Player.MouseBindings and Config.Player.KeyBindings.(Enabled/FlyleafWindow) has been transferred to FlyleafHost (see .cs)
 * Player.ActivityMode has been removed (its the same as ActivityTimeout=0) however Player.Activity.IsEnabled to temporary turn it on/off
 * Swap has been removed as you can now set directly the Players to FlyleafHosts

Solutions Changes
 * FlyleafPlayer (WPF Control) (WPF) [Demo/Sample Release] has been updated with new style based on FlyleafME
 * FlyleafPlayer (WPF Control) (WinForms) has been removed and it will be reviewed if required in the future
 * FlyleafPlayer has been removed as a new repository will be created soon
 * WpfFlyleafHost new Test (sample) added for the new FlyleafHost control (ideal for beta testers)
 * Utils and Logger has been transferred to new folder under Utils
 * Forces C# lang ver 7.3 to make sure everything is compatible with .net framework
  • Loading branch information
SuRGeoNix committed Nov 3, 2022
1 parent 65d3f7b commit 70c11ae
Show file tree
Hide file tree
Showing 110 changed files with 4,246 additions and 4,229 deletions.
36 changes: 18 additions & 18 deletions FlyleafLib.Controls.WPF/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ public ObservableCollection<UITheme>
Color _SubsFontColor;
public string SubsFontStretch { get => _SubsFontStretch; set => Set(ref _SubsFontStretch, value); }
string _SubsFontStretch;
public string SubsFontWeight { get => _SubsFontWeight; set => Set(ref _SubsFontWeight, value); }
public string SubsFontWeight { get => _SubsFontWeight; set => Set(ref _SubsFontWeight, value); }
string _SubsFontWeight;
public string SubsFontStyle { get => _SubsFontStyle; set => Set(ref _SubsFontStyle, value); }
string _SubsFontStyle;
public Thickness SubsMargin { get => _SubsMargin; set => Set(ref _SubsMargin, value); }
Thickness _SubsMargin;

internal Flyleaf flyleaf;
internal FlyleafME flyleaf;

public UIConfig() { }
public UIConfig(Flyleaf flyleaf) { this.flyleaf = flyleaf; }
public UIConfig(FlyleafME flyleaf) { this.flyleaf = flyleaf; }

public static void Load(Flyleaf flyleaf, string path)
public static void Load(FlyleafME flyleaf, string path)
{
using (FileStream fs = new FileStream(path, FileMode.Open))
{
Expand All @@ -53,7 +53,7 @@ public static void Load(Flyleaf flyleaf, string path)
}
}

public static void Save(Flyleaf flyleaf, string uiConfigPath, string configPath, string enginePath)
public static void Save(FlyleafME flyleaf, string uiConfigPath, string configPath, string enginePath)
{
if (uiConfigPath != null)
using (FileStream fs = new FileStream(uiConfigPath, FileMode.Create))
Expand All @@ -73,11 +73,11 @@ public static void Save(Flyleaf flyleaf, string uiConfigPath, string configPath,
public class UITheme : NotifyPropertyChanged
{
[XmlIgnore]
public Flyleaf flyleaf;
public FlyleafME flyleaf;

public UITheme() { }

public UITheme(Flyleaf flyleaf, UITheme baseTheme)
public UITheme(FlyleafME flyleaf, UITheme baseTheme)
{
this.flyleaf = flyleaf;

Expand All @@ -86,7 +86,7 @@ public UITheme(Flyleaf flyleaf, UITheme baseTheme)
_PrimaryColor = baseTheme.PrimaryColor;
_SecondaryColor = baseTheme.SecondaryColor;
_PaperColor = baseTheme.PaperColor;
_VideoView = baseTheme.VideoView;
_SurfaceColor = baseTheme.SurfaceColor;
}
}

Expand All @@ -98,9 +98,9 @@ public Color PrimaryColor {
if (!Set(ref _PrimaryColor, value)) return;
if (flyleaf == null || flyleaf.SelectedTheme == null || flyleaf.SelectedTheme.Name != Name) return;

ITheme theme = flyleaf.Resources.GetTheme();
ITheme theme = flyleaf.Overlay.Resources.GetTheme();
theme.SetPrimaryColor(value);
flyleaf.Resources.SetTheme(theme);
flyleaf.Overlay.Resources.SetTheme(theme);
flyleaf.settings.Resources.SetTheme(theme);
}
}
Expand All @@ -113,9 +113,9 @@ public Color SecondaryColor {
if (!Set(ref _SecondaryColor, value)) return;
if (flyleaf == null || flyleaf.SelectedTheme == null || flyleaf.SelectedTheme.Name != Name) return;

ITheme theme = flyleaf.Resources.GetTheme();
ITheme theme = flyleaf.Overlay.Resources.GetTheme();
theme.SetSecondaryColor(value);
flyleaf.Resources.SetTheme(theme);
flyleaf.Overlay.Resources.SetTheme(theme);
flyleaf.settings.Resources.SetTheme(theme);
}
}
Expand All @@ -128,24 +128,24 @@ public Color PaperColor {
if (!Set(ref _PaperColor, value)) return;
if (flyleaf == null || flyleaf.SelectedTheme == null || flyleaf.SelectedTheme.Name != Name) return;

ITheme theme = flyleaf.Resources.GetTheme();
ITheme theme = flyleaf.Overlay.Resources.GetTheme();
theme.Paper = value;
flyleaf.Resources.SetTheme(theme);
flyleaf.Overlay.Resources.SetTheme(theme);
flyleaf.settings.Resources.SetTheme(theme);
}
}
Color _PaperColor;

public Color VideoView {
get => _VideoView;
public Color SurfaceColor {
get => _SurfaceColor;
set
{
if (!Set(ref _VideoView, value)) return;
if (!Set(ref _SurfaceColor, value)) return;
if (flyleaf == null || flyleaf.SelectedTheme == null || flyleaf.SelectedTheme.Name != Name) return;

flyleaf.Config.Video.BackgroundColor = value;
}
}
Color _VideoView;
Color _SurfaceColor;
}
}
Loading

0 comments on commit 70c11ae

Please sign in to comment.