Skip to content

Commit

Permalink
Remove some unneeded code
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanbaird committed May 27, 2024
1 parent 8bbb74a commit 6714794
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 56 deletions.
24 changes: 0 additions & 24 deletions Ice.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
176B23F42ADB76A1008AE86B /* CustomColorPicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 176B23F32ADB76A1008AE86B /* CustomColorPicker.swift */; };
177354662B1B8502001CF731 /* MenuBarShape.swift in Sources */ = {isa = PBXBuildFile; fileRef = 177354652B1B8502001CF731 /* MenuBarShape.swift */; };
1773546C2B1BBBA1001CF731 /* MenuBarShapePicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1773546B2B1BBBA1001CF731 /* MenuBarShapePicker.swift */; };
177354702B1BFF65001CF731 /* HorizontalEdge+cgRectEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1773546F2B1BFF65001CF731 /* HorizontalEdge+cgRectEdge.swift */; };
177354842B1F9AF9001CF731 /* NSBezierPath+union.swift in Sources */ = {isa = PBXBuildFile; fileRef = 177354832B1F9AF9001CF731 /* NSBezierPath+union.swift */; };
177386F32B092A0700448BBF /* ControlItemImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 177386F22B092A0700448BBF /* ControlItemImage.swift */; };
177386F52B0A654D00448BBF /* ControlItemImageSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 177386F42B0A654D00448BBF /* ControlItemImageSet.swift */; };
Expand All @@ -53,7 +52,6 @@
1787C43B2B187187002F50DF /* MenuBarTintKind.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1787C43A2B187187002F50DF /* MenuBarTintKind.swift */; };
17928F1A2AC5DF9C0016C615 /* Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17928F192AC5DF9C0016C615 /* Defaults.swift */; };
1795B46C2B9A61D6005A684C /* DisplayInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1795B46B2B9A61D6005A684C /* DisplayInfo.swift */; };
179F139A2B8EECC600EC6B52 /* CGColor+codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 179F13992B8EECC600EC6B52 /* CGColor+codable.swift */; };
179F13BA2B90D34800EC6B52 /* MenuBarAppearanceConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 179F13B92B90D34800EC6B52 /* MenuBarAppearanceConfiguration.swift */; };
17AB36322BA081D800F50C0F /* NSImage+resized.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17AB36312BA081D800F50C0F /* NSImage+resized.swift */; };
17B331D02B9916E70084EBB0 /* SettingsManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17B331CF2B9916E70084EBB0 /* SettingsManager.swift */; };
Expand Down Expand Up @@ -145,7 +143,6 @@
176B23F32ADB76A1008AE86B /* CustomColorPicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomColorPicker.swift; sourceTree = "<group>"; };
177354652B1B8502001CF731 /* MenuBarShape.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuBarShape.swift; sourceTree = "<group>"; };
1773546B2B1BBBA1001CF731 /* MenuBarShapePicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuBarShapePicker.swift; sourceTree = "<group>"; };
1773546F2B1BFF65001CF731 /* HorizontalEdge+cgRectEdge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "HorizontalEdge+cgRectEdge.swift"; sourceTree = "<group>"; };
177354832B1F9AF9001CF731 /* NSBezierPath+union.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSBezierPath+union.swift"; sourceTree = "<group>"; };
177386F22B092A0700448BBF /* ControlItemImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ControlItemImage.swift; sourceTree = "<group>"; };
177386F42B0A654D00448BBF /* ControlItemImageSet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ControlItemImageSet.swift; sourceTree = "<group>"; };
Expand All @@ -156,7 +153,6 @@
1787C43A2B187187002F50DF /* MenuBarTintKind.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuBarTintKind.swift; sourceTree = "<group>"; };
17928F192AC5DF9C0016C615 /* Defaults.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Defaults.swift; sourceTree = "<group>"; };
1795B46B2B9A61D6005A684C /* DisplayInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DisplayInfo.swift; sourceTree = "<group>"; };
179F13992B8EECC600EC6B52 /* CGColor+codable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGColor+codable.swift"; sourceTree = "<group>"; };
179F13B92B90D34800EC6B52 /* MenuBarAppearanceConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuBarAppearanceConfiguration.swift; sourceTree = "<group>"; };
17AB36312BA081D800F50C0F /* NSImage+resized.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSImage+resized.swift"; sourceTree = "<group>"; };
17B331CF2B9916E70084EBB0 /* SettingsManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsManager.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -344,14 +340,6 @@
path = MenuBarAppearanceSettingsPane;
sourceTree = "<group>";
};
1773546E2B1BFF55001CF731 /* HorizontalEdge */ = {
isa = PBXGroup;
children = (
1773546F2B1BFF65001CF731 /* HorizontalEdge+cgRectEdge.swift */,
);
path = HorizontalEdge;
sourceTree = "<group>";
};
177354822B1F9AE1001CF731 /* NSBezierPath */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -413,14 +401,6 @@
path = Styles;
sourceTree = "<group>";
};
179F13982B8EECBE00EC6B52 /* CGColor */ = {
isa = PBXGroup;
children = (
179F13992B8EECC600EC6B52 /* CGColor+codable.swift */,
);
path = CGColor;
sourceTree = "<group>";
};
179F13BC2B91E7F700EC6B52 /* MenuBarAppearance */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -630,9 +610,7 @@
isa = PBXGroup;
children = (
71D2B02A2AAFD88E0002B6C8 /* Bundle */,
179F13982B8EECBE00EC6B52 /* CGColor */,
17EC6B562AE0C3340065F260 /* Comparable */,
1773546E2B1BFF55001CF731 /* HorizontalEdge */,
716683442A76811C006ABF84 /* Logger */,
7133ED5F2A855ADA000A7E1B /* NSApplication */,
177354822B1F9AE1001CF731 /* NSBezierPath */,
Expand Down Expand Up @@ -811,7 +789,6 @@
170749CA2B1207D9009DDF73 /* UniversalEventMonitor.swift in Sources */,
71623BC72A8B0961002FD331 /* MainSettingsPane.swift in Sources */,
17F71BB22B87E37800905CBA /* RehideStrategy.swift in Sources */,
179F139A2B8EECC600EC6B52 /* CGColor+codable.swift in Sources */,
17B380F32ADCBC8A0002C9C3 /* OnKeyDown.swift in Sources */,
1736F77C2ADBBF340073428E /* CustomGradientPicker.swift in Sources */,
71D2B02C2AAFD8A80002B6C8 /* Bundle+displayName.swift in Sources */,
Expand Down Expand Up @@ -860,7 +837,6 @@
174D4E282BA2089100D11129 /* Hotkey.swift in Sources */,
7166834B2A76811C006ABF84 /* Logger+initWithCategory.swift in Sources */,
17B380F52ADCBE090002C9C3 /* LocalEventMonitorModifier.swift in Sources */,
177354702B1BFF65001CF731 /* HorizontalEdge+cgRectEdge.swift in Sources */,
17B331D52B991D8D0084EBB0 /* AdvancedSettingsManager.swift in Sources */,
170CF8902B101D980073F982 /* ColorStop.swift in Sources */,
1773546C2B1BBBA1001CF731 /* MenuBarShapePicker.swift in Sources */,
Expand Down
13 changes: 0 additions & 13 deletions Ice/Extensions/CGColor/CGColor+codable.swift

This file was deleted.

16 changes: 0 additions & 16 deletions Ice/Extensions/HorizontalEdge/HorizontalEdge+cgRectEdge.swift

This file was deleted.

4 changes: 2 additions & 2 deletions Ice/MenuBarAppearance/MenuBarAppearanceConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ extension MenuBarAppearanceConfiguration: Codable {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(hasShadow, forKey: .hasShadow)
try container.encode(hasBorder, forKey: .hasBorder)
try container.encode(borderColor.codable, forKey: .borderColor)
try container.encode(CodableColor(cgColor: borderColor), forKey: .borderColor)
try container.encode(borderWidth, forKey: .borderWidth)
try container.encode(shapeKind, forKey: .shapeKind)
try container.encode(fullShapeInfo, forKey: .fullShapeInfo)
try container.encode(splitShapeInfo, forKey: .splitShapeInfo)
try container.encode(tintKind, forKey: .tintKind)
try container.encode(tintColor.codable, forKey: .tintColor)
try container.encode(CodableColor(cgColor: tintColor), forKey: .tintColor)
try container.encode(tintGradient, forKey: .tintGradient)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private struct MenuBarFullShapeExampleView: View, Equatable {
case .round:
Image(size: CGSize(width: 12, height: 12)) { context in
let remainder = context.clipBoundingRect
.divided(atDistance: context.clipBoundingRect.width / 2, from: edge.cgRectEdge)
.divided(atDistance: context.clipBoundingRect.width / 2, from: cgRectEdge(for: edge))
.remainder
let path1 = Path(remainder)
let path2 = Path(ellipseIn: context.clipBoundingRect)
Expand Down Expand Up @@ -148,6 +148,13 @@ private struct MenuBarFullShapeExampleView: View, Equatable {
static func == (lhs: Self, rhs: Self) -> Bool {
lhs.info == rhs.info
}

private func cgRectEdge(for edge: HorizontalEdge) -> CGRectEdge {
switch edge {
case .leading: .minXEdge
case .trailing: .maxXEdge
}
}
}

private struct MenuBarEndCapExampleView: View {
Expand Down

0 comments on commit 6714794

Please sign in to comment.