-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: flatten nested container when it only has one child remaining (#425
- Loading branch information
Showing
26 changed files
with
175 additions
and
281 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,27 @@ | ||
using System; | ||
|
||
namespace GlazeWM.Domain.Common.Enums | ||
{ | ||
public enum TilingDirection | ||
{ | ||
Vertical, | ||
Horizontal, | ||
} | ||
|
||
public static class TilingDirectionExtensions | ||
{ | ||
/// <summary> | ||
/// Get the inverse of a given tiling direction. | ||
/// </summary> | ||
/// <exception cref="ArgumentOutOfRangeException"></exception> | ||
public static TilingDirection Inverse(this TilingDirection tilingDirection) | ||
{ | ||
return tilingDirection switch | ||
{ | ||
TilingDirection.Vertical => TilingDirection.Horizontal, | ||
TilingDirection.Horizontal => TilingDirection.Vertical, | ||
_ => throw new ArgumentOutOfRangeException(nameof(tilingDirection)), | ||
}; | ||
} | ||
} | ||
} |
45 changes: 0 additions & 45 deletions
45
GlazeWM.Domain/Containers/CommandHandlers/AttachAndResizeContainerHandler.cs
This file was deleted.
Oops, something went wrong.
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
55 changes: 0 additions & 55 deletions
55
GlazeWM.Domain/Containers/CommandHandlers/DetachAndResizeContainerHandler.cs
This file was deleted.
Oops, something went wrong.
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.