GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.
feat(domain): use bar height from user config for calculating workspace height/y-coordinate
Lars Bergerd464960436e5
diff --git a/LarsWM.Domain/Workspaces/Workspace.cs b/LarsWM.Domain/Workspaces/Workspace.csindex 458cd06e..5477d09f 100644--- a/LarsWM.Domain/Workspaces/Workspace.cs+++ b/LarsWM.Domain/Workspaces/Workspace.cs@@ -21,12 +21,14 @@ namespace LarsWM.Domain.Workspacesprivate WorkspaceService _workspaceService =ServiceLocator.Provider.GetRequiredService<WorkspaceService>();- // TODO: Use bar height instead of hardcoded value.- public override int Height => Parent.Height - (_userConfigService.UserConfig.Gaps.OuterGap * 2) - 50;- public override int Width => Parent.Width - (_userConfigService.UserConfig.Gaps.OuterGap * 2);- public override int X => Parent.X + _userConfigService.UserConfig.Gaps.OuterGap;- // TODO: Use bar height instead of hardcoded value.- public override int Y => Parent.Y + _userConfigService.UserConfig.Gaps.OuterGap + 50;+ private int OuterGap => _userConfigService.UserConfig.Gaps.OuterGap;+ private int BarHeight => _userConfigService.UserConfig.Bar.Height;++ public override int Height => Parent.Height - (OuterGap * 2) - BarHeight;+ public override int Width => Parent.Width - (OuterGap * 2);+ public override int X => Parent.X + OuterGap;+ public override int Y => Parent.Y + OuterGap + BarHeight;+/// <summary>/// Whether the workspace itself or a descendant container has focus.