Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
fe0e356
Update .sln and .csproj files to include arm64 binaries
59xa Feb 15, 2026
1791e53
Ensure DWSlider and related code uses the new DWProgressBarEx impleme…
59xa Feb 15, 2026
a0e02ed
Only trigger build workflow on pull request
59xa Feb 15, 2026
be007c0
Add .NET building validation workflow
59xa Feb 15, 2026
81d8086
Add processor architecture display (can be x64 or arm64)
59xa Feb 16, 2026
d12aea5
Add architecture redirects for updating to ensure correct binaries ar…
59xa Feb 16, 2026
8af9243
Bump version
59xa Feb 16, 2026
de9ee36
Null reference adjustments
59xa Feb 16, 2026
230657d
Add default selection for Big Menu Modes
59xa Feb 16, 2026
0ed35f2
Ensure thumbnail animation actually force finishes when hovered out
59xa Feb 16, 2026
a319b0a
Update dates
59xa Feb 16, 2026
98be31a
Ensure weather metadata is displayed after exiting settings menu
59xa Feb 16, 2026
242071f
Ensure UI horizontal placement is unaffected when interacting with tr…
59xa Feb 16, 2026
46d8595
Make topmost placement more robust and persistent
59xa Feb 16, 2026
ad89e97
Fix variable inconsistencies
59xa Feb 16, 2026
7114b09
Make version JSON calls more clear
59xa Feb 16, 2026
a7c625a
Merge remote-tracking branch 'origin/release' into v1.6.1r
59xa Feb 16, 2026
f7d8d4f
Typo
59xa Feb 16, 2026
8c72ce6
Bump, mark canary
59xa Feb 16, 2026
5c39c07
Add debugging
59xa Feb 16, 2026
7a21eaa
Mark release
59xa Feb 16, 2026
b091c9a
Actually mark as release
59xa Feb 16, 2026
da5a098
Don't use dotnet build for ResolveComReference code (oops)
59xa Feb 16, 2026
f90ba14
Add debugging
59xa Feb 16, 2026
339eb33
Typo
59xa Feb 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

name: build
env:
DWAppVersion: v1.6.0r
DWAppVersion: v1.6.1r
permissions:
contents: write

Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
/p:SelfContained=false `
/p:PublishDir=${{ github.workspace }}\publish\Release-${{ matrix.platform }}\

- name: Publish Updater
- name: Publish updater
run: msbuild Updater/Updater.csproj `
/t:Publish `
/p:Configuration=Release `
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: Validate .NET build

on:
push:
branches: [ "release" ]
pull_request:
branches: [ "release" ]

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2

- name: Restore dependencies
run: dotnet restore

- name: List files
run: dir -Recurse *.sln

- name: Build
run: msbuild DynamicWin.sln /p:Configuration=Debug

- name: Test
run: dotnet test --no-build --verbosity normal

10 changes: 10 additions & 0 deletions DynamicWin.sln
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,27 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM64 = Debug|ARM64
Release|Any CPU = Release|Any CPU
Release|ARM64 = Release|ARM64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9102D609-0350-46E8-B6E7-DA7BF5318151}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9102D609-0350-46E8-B6E7-DA7BF5318151}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9102D609-0350-46E8-B6E7-DA7BF5318151}.Debug|ARM64.ActiveCfg = Debug|ARM64
{9102D609-0350-46E8-B6E7-DA7BF5318151}.Debug|ARM64.Build.0 = Debug|ARM64
{9102D609-0350-46E8-B6E7-DA7BF5318151}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9102D609-0350-46E8-B6E7-DA7BF5318151}.Release|Any CPU.Build.0 = Release|Any CPU
{9102D609-0350-46E8-B6E7-DA7BF5318151}.Release|ARM64.ActiveCfg = Release|ARM64
{9102D609-0350-46E8-B6E7-DA7BF5318151}.Release|ARM64.Build.0 = Release|ARM64
{63BF87E8-9057-4BB2-91CE-BE1CAB32AFC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{63BF87E8-9057-4BB2-91CE-BE1CAB32AFC8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{63BF87E8-9057-4BB2-91CE-BE1CAB32AFC8}.Debug|ARM64.ActiveCfg = Debug|ARM64
{63BF87E8-9057-4BB2-91CE-BE1CAB32AFC8}.Debug|ARM64.Build.0 = Debug|ARM64
{63BF87E8-9057-4BB2-91CE-BE1CAB32AFC8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{63BF87E8-9057-4BB2-91CE-BE1CAB32AFC8}.Release|Any CPU.Build.0 = Release|Any CPU
{63BF87E8-9057-4BB2-91CE-BE1CAB32AFC8}.Release|ARM64.ActiveCfg = Release|ARM64
{63BF87E8-9057-4BB2-91CE-BE1CAB32AFC8}.Release|ARM64.Build.0 = Release|ARM64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
1 change: 1 addition & 0 deletions DynamicWin/DynamicWin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<UseWPF>true</UseWPF>
<ApplicationIcon>app.ico</ApplicationIcon>
<Company>$(Authors)</Company>
<Platforms>AnyCPU;ARM64</Platforms>
</PropertyGroup>

<ItemGroup>
Expand Down
13 changes: 7 additions & 6 deletions DynamicWin/Main/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ namespace DynamicWin
{
public partial class DynamicWinMain : System.Windows.Application
{
public static MMDevice defaultDevice;
public static MMDevice defaultMicrophone;
public static MMDevice? defaultDevice;
public static MMDevice? defaultMicrophone;

public static string Version => "v1.6.0r";
public static string Version => "v1.6.1r";
public static Channel ReleaseStream => Channel.Release;
public static Architecture ProcessArchitecture => RuntimeInformation.ProcessArchitecture;

[STAThread]
public static void Main()
Expand Down Expand Up @@ -49,9 +50,9 @@ public static void UpdateStartup()
}
}

Mutex mutex;
private System.Timers.Timer topmostTimer; // use System.Timers.Timer to avoid creating Win32 dispatcher timers
private MainForm mainForm;
private Mutex? mutex;
private System.Timers.Timer? topmostTimer; // use System.Timers.Timer to avoid creating Win32 dispatcher timers
private MainForm? mainForm;

protected override void OnStartup(StartupEventArgs e)
{
Expand Down
36 changes: 35 additions & 1 deletion DynamicWin/Main/MainForm.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public MainForm()
InitializeComponent();

_trayIcon = new Forms.NotifyIcon();
_trayIcon.MouseUp += TrayIcon_MouseUp;

// Initialise mouse tracking
_lastMouseMoveTime = DateTime.UtcNow;
Expand Down Expand Up @@ -130,7 +131,6 @@ public MainForm()
_trayIcon.ContextMenuStrip.Opening += (s, e) =>
{
this.Topmost = false;
Activate();
};

_trayIcon.ContextMenuStrip.Closing += (s, e) =>
Expand Down Expand Up @@ -401,5 +401,39 @@ internal void DisposeTrayIcon()
{
_trayIcon.Dispose();
}

private void TrayIcon_MouseUp(object? sender, Forms.MouseEventArgs e)
{
if (e.Button == Forms.MouseButtons.Right)
{
var screen = Forms.Screen.FromPoint(Forms.Control.MousePosition);

var iconX = Forms.Control.MousePosition.X;
var iconY = Forms.Control.MousePosition.Y;

float dpiScale = 1.0f;
using (var g = System.Drawing.Graphics.FromHwnd(IntPtr.Zero))
{
dpiScale = g.DpiX / 96.0f;
}
int iconWidth = (int)(16 * dpiScale);

int menuWidth = 200;
if (_trayIcon.ContextMenuStrip != null && _trayIcon.ContextMenuStrip.Items.Count > 0)
{
_trayIcon.ContextMenuStrip.Show(0, -1000);
menuWidth = _trayIcon.ContextMenuStrip.Width;
_trayIcon.ContextMenuStrip.Hide();
}

int menuX = iconX - (menuWidth / 2) + (iconWidth / 2);
int menuY = iconY;

if (menuX < screen.WorkingArea.Left) menuX = screen.WorkingArea.Left;
if (menuX + menuWidth > screen.WorkingArea.Right) menuX = screen.WorkingArea.Right - menuWidth;

_trayIcon.ContextMenuStrip?.Show(menuX, menuY);
}
}
}
}
10 changes: 5 additions & 5 deletions DynamicWin/Main/RendererMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace DynamicWin.Main
{
public class RendererMain : SKElement
{
private IslandObject islandObject;
private readonly IslandObject islandObject;
public IslandObject MainIsland => islandObject;
private List<UIObject> objects => MenuManager.Instance.ActiveMenu.UiObjects;

Expand All @@ -31,8 +31,8 @@ public class RendererMain : SKElement
public static Vec2 ScreenDimensions => new Vec2(MainForm.Instance.Width, MainForm.Instance.Height);
public static Vec2 CursorPosition => new Vec2(Mouse.GetPosition(MainForm.Instance).X, Mouse.GetPosition(MainForm.Instance).Y);

private static RendererMain instance;
public static RendererMain Instance => instance;
private static RendererMain? instance;
public static RendererMain? Instance => instance;

// Guard so the startup updater sequence runs only once per application lifetime
private static bool startupUpdaterSequenceStarted = false;
Expand All @@ -42,8 +42,8 @@ public class RendererMain : SKElement
public float blurOverride = 0f;
public float alphaOverride = 1f;

public Action<float> onUpdate;
public Action<SKCanvas> onDraw;
public Action<float>? onUpdate;
public Action<SKCanvas>? onDraw;

private Stopwatch? updateStopwatch;
private int initialScreenBrightness = 0;
Expand Down
23 changes: 23 additions & 0 deletions DynamicWin/Main/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,19 @@ public class Settings
public static List<string> smallWidgetsMiddle;
public static List<string> bigWidgets;

private static HomeMenu.BigMenuMode defaultBigMenuMode = HomeMenu.BigMenuMode.Widgets;
public static HomeMenu.BigMenuMode DefaultBigMenuMode
{
get => defaultBigMenuMode;
set => defaultBigMenuMode = value;
}

public static void InitializeSettings()
{
try
{


if (SaveManager.Contains("settings"))
{
IslandMode = ((Int64)SaveManager.Get("settings.islandmode") == 0) ? IslandObject.IslandMode.Island : IslandObject.IslandMode.Notch;
Expand All @@ -73,6 +81,19 @@ public static void InitializeSettings()
ScreenIndex = (int)((Int64)SaveManager.Get("settings.screenindex"));
ReleaseStream = SaveManager.Contains("settings.ReleaseStream") ? (int)((Int64)SaveManager.Get("settings.ReleaseStream")) : 0;

if (SaveManager.Contains("settings.DefaultBigMenuMode"))
{
int mode = (int)(Int64)SaveManager.Get("settings.DefaultBigMenuMode");
if (Enum.IsDefined(typeof(HomeMenu.BigMenuMode), mode))
DefaultBigMenuMode = (HomeMenu.BigMenuMode)mode;
else
DefaultBigMenuMode = HomeMenu.BigMenuMode.Widgets;
}
else
{
DefaultBigMenuMode = HomeMenu.BigMenuMode.Widgets;
}

Settings.smallWidgetsLeft = new List<string>();
Settings.smallWidgetsRight = new List<string>();
Settings.smallWidgetsMiddle = new List<string>();
Expand Down Expand Up @@ -174,6 +195,8 @@ public static void Save()
SaveManager.Add("settings.smallwidgetsmiddle", smallWidgetsMiddle);
SaveManager.Add("settings.bigwidgets", bigWidgets);

SaveManager.Add("settings.DefaultBigMenuMode", (int)DefaultBigMenuMode);

SaveManager.SaveAll();
}
}
Expand Down
58 changes: 26 additions & 32 deletions DynamicWin/UI/Menu/Menus/HomeMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,27 @@ public override Vec2 IslandSize()

public override Vec2 IslandSizeBig()
{
Vec2 size = new Vec2(275, 145);

// Use different sizing logic depending on the current big menu mode
if (currentBigMenuMode == BigMenuMode.Tray)
{
// Tray mode
return new Vec2(350, 250);
}
else if (currentBigMenuMode == BigMenuMode.Media)
{
// Media mode
float desiredMediaWidth = 440f;
float desiredMediaHeight = 110f;
float horizontalPadding = 60f;
float topContainerHeight = 30f;
float width = desiredMediaWidth + horizontalPadding;
float height = desiredMediaHeight + bCD + topContainerHeight + topSpacing;
return new Vec2(width, height);
}
else // Widgets mode (default)
{
Vec2 size = new Vec2(275, 145);

float sizeTogetherBiggest = 0f;
float sizeTogether = 0f;

Expand All @@ -75,10 +93,8 @@ public override Vec2 IslandSizeBig()
}

size.X = (float)Math.Max(size.X, sizeTogetherBiggest);
}

{
float sizeTogetherBiggest = 0f;
sizeTogetherBiggest = 0f;

for (int i = 0; i < bigWidgets.Count; i++)
{
Expand All @@ -92,34 +108,9 @@ public override Vec2 IslandSizeBig()

// Set the container height to the total height of all rows
size.Y = Math.Max(size.Y, sizeTogetherBiggest);
}

// When not in widget mode (showing tray) use fixed height
if (!isWidgetMode && currentBigMenuMode == BigMenuMode.Tray)
{
size.Y = 250;
return size;
}

// When Media view is active, ensure the island is large enough to contain the media panel
if (!isWidgetMode && currentBigMenuMode == BigMenuMode.Media)
{
// Keep in sync with the size used when rendering the media UIObject in Update()
float desiredMediaWidth = 440f;
float desiredMediaHeight = 110;

// Horizontal padding to give the media panel some inset from island edges
float horizontalPadding = 60f;

// Top container height (approximate) used by the top buttons
float topContainerHeight = 30f;

size.X = Math.Max(size.X, desiredMediaWidth + horizontalPadding);

// Add bCD (bottom container offset) + topContainerHeight + topSpacing to ensure vertical space
size.Y = desiredMediaHeight + bCD + topContainerHeight + topSpacing;
}

return size;
}

UIObject smallWidgetsContainer;
Expand All @@ -138,10 +129,13 @@ public override Vec2 IslandSizeBig()

// Enum to track which big menu is active
public enum BigMenuMode { Widgets, Tray, Media }
public BigMenuMode currentBigMenuMode = BigMenuMode.Widgets;
public BigMenuMode currentBigMenuMode;

public override List<UIObject> InitializeMenu(IslandObject island)
{
// Set currentBigMenuMode from user setting
currentBigMenuMode = Settings.DefaultBigMenuMode;

var objects = base.InitializeMenu(island);

smallWidgetsContainer = new UIObject(island, Vec2.zero, IslandSize(), UIAlignment.Center);
Expand Down
Loading
Loading