Skip to content

Commit

Permalink
Prepare for PR - blend with Amethyst naming
Browse files Browse the repository at this point in the history
  • Loading branch information
MutatingFunc committed Feb 18, 2024
1 parent 34146ec commit 5e4bac2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions Amethyst.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
4493EAA22139D9F000AA9623 /* ThreeColumnLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4493EAA12139D9EF00AA9623 /* ThreeColumnLayout.swift */; };
AA4AF40D26717DA900D2AE1B /* TwoPaneLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA4AF40C26717DA900D2AE1B /* TwoPaneLayout.swift */; };
AAAC6BAC2677DF7B00BEC1B0 /* TwoPaneLayoutTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAAC6BAB2677DF7B00BEC1B0 /* TwoPaneLayoutTests.swift */; };
D60A69A02AF115A500EE0235 /* StageManagerLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = D60A699F2AF115A500EE0235 /* StageManagerLayout.swift */; };
D60A69A02AF115A500EE0235 /* FloatingGridLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = D60A699F2AF115A500EE0235 /* FloatingGridLayout.swift */; };
F46629C4272AD7A30040C275 /* FourColumnLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = F46629C3272AD7A30040C275 /* FourColumnLayout.swift */; };
/* End PBXBuildFile section */

Expand Down Expand Up @@ -252,7 +252,7 @@
4493EAA12139D9EF00AA9623 /* ThreeColumnLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThreeColumnLayout.swift; sourceTree = "<group>"; };
AA4AF40C26717DA900D2AE1B /* TwoPaneLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TwoPaneLayout.swift; sourceTree = "<group>"; };
AAAC6BAB2677DF7B00BEC1B0 /* TwoPaneLayoutTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TwoPaneLayoutTests.swift; sourceTree = "<group>"; };
D60A699F2AF115A500EE0235 /* StageManagerLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StageManagerLayout.swift; sourceTree = "<group>"; };
D60A699F2AF115A500EE0235 /* FloatingGridLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FloatingGridLayout.swift; sourceTree = "<group>"; };
F46629C3272AD7A30040C275 /* FourColumnLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FourColumnLayout.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -360,7 +360,7 @@
4062AD321C1FA48C00DB612B /* ColumnLayout.swift */,
4062AD2A1C1F99EA00DB612B /* FloatingLayout.swift */,
4062AD2C1C1F9B8B00DB612B /* FullscreenLayout.swift */,
D60A699F2AF115A500EE0235 /* StageManagerLayout.swift */,
D60A699F2AF115A500EE0235 /* FloatingGridLayout.swift */,
4062AD361C1FA83300DB612B /* RowLayout.swift */,
4062AD2E1C1F9D6B00DB612B /* TallLayout.swift */,
AA4AF40C26717DA900D2AE1B /* TwoPaneLayout.swift */,
Expand Down Expand Up @@ -806,7 +806,7 @@
40637075224EFED70081299D /* CGInfo.swift in Sources */,
1A4B46EB20AA7717003D5110 /* NSTableView+Amethyst.swift in Sources */,
4045416F268FFDA000861BE8 /* CustomLayout.swift in Sources */,
D60A69A02AF115A500EE0235 /* StageManagerLayout.swift in Sources */,
D60A69A02AF115A500EE0235 /* FloatingGridLayout.swift in Sources */,
40637077224F0EFF0081299D /* Screens.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
//
// StageManagerLayout.swift
// FloatingGridLayout.swift
// Amethyst
//
// Created by Ian Ynda-Hummel on 12/14/15.
// Created by James Froggatt on 31/10/23.
// Copyright © 2015 Ian Ynda-Hummel. All rights reserved.
//

import Silica

class StageManagerLayout<Window: WindowType>: Layout<Window> {
override static var layoutName: String { return "Stage Manager" }
override static var layoutKey: String { return "stage-manager" }
class FloatingGridLayout<Window: WindowType>: Layout<Window> {
override static var layoutName: String { return "Floating Grid" }
override static var layoutKey: String { return "floating-grid" }

override var layoutDescription: String { return "" }

Expand Down Expand Up @@ -104,7 +104,7 @@ class StageManagerLayout<Window: WindowType>: Layout<Window> {
}

// To ensure updates when resizing
extension StageManagerLayout: PanedLayout {
extension FloatingGridLayout: PanedLayout {
var mainPaneRatio: CGFloat { 0.5 }
var mainPaneCount: Int { 1 }
func recommendMainPaneRawRatio(rawRatio: CGFloat) {}
Expand Down
16 changes: 8 additions & 8 deletions Amethyst/Managers/LayoutType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ enum LayoutType<Window: WindowType> {
case unknownLayout
}

case stageManager
case floatingGrid
case tall
case tallRight
case wide
Expand All @@ -64,7 +64,7 @@ enum LayoutType<Window: WindowType> {

static var standardLayouts: [LayoutType<Window>] {
return [
.stageManager,
.floatingGrid,
.tall,
.tallRight,
.wide,
Expand All @@ -86,8 +86,8 @@ enum LayoutType<Window: WindowType> {

var key: String {
switch self {
case .stageManager:
return "stage-manager"
case .floatingGrid:
return "floating-grid"
case .tall:
return "tall"
case .tallRight:
Expand Down Expand Up @@ -127,8 +127,8 @@ enum LayoutType<Window: WindowType> {

var layoutClass: Layout<Window>.Type {
switch self {
case .stageManager:
return StageManagerLayout<Window>.self
case .floatingGrid:
return FloatingGridLayout<Window>.self
case .tall:
return TallLayout<Window>.self
case .tallRight:
Expand Down Expand Up @@ -168,8 +168,8 @@ enum LayoutType<Window: WindowType> {

static func from(key: String) -> LayoutType<Window> {
switch key {
case "stage-manager":
return .stageManager
case "floating-grid":
return .floatingGrid
case "tall":
return .tall
case "tall-right":
Expand Down

0 comments on commit 5e4bac2

Please sign in to comment.