diff --git a/Aerial/Source/Views/Layers/AnimationLayer.swift b/Aerial/Source/Views/Layers/AnimationLayer.swift index fd961e1e..d92e4cb2 100644 --- a/Aerial/Source/Views/Layers/AnimationLayer.swift +++ b/Aerial/Source/Views/Layers/AnimationLayer.swift @@ -81,15 +81,29 @@ class AnimationLayer: CATextLayer { } // Find a new corner, different from the previous one - var newCorner = Int.random(in: 0...5) + var newCorner = getRandomCorner() while newCorner == lastCorner || !layerManager.isCornerAcceptable(corner: newCorner) { - newCorner = Int.random(in: 0...5) + newCorner = getRandomCorner() } return InfoCorner(rawValue: newCorner)! } + // Return a strict corner, not a center pos + func getRandomCorner() -> Int { + let rnd = Int.random(in: 0...3) + if rnd == 0 { + return 0 + } else if rnd == 1 { + return 2 + } else if rnd == 2 { + return 3 + } else { + return 5 + } + } + // Move to a corner, this may need to force the redraw of a whole corner // swiftlint:disable:next cyclomatic_complexity func move(toCorner: InfoCorner, fullRedraw: Bool) { diff --git a/Resources/PreferencesWindow.xib b/Resources/PreferencesWindow.xib index 02833bff..0ed5d80f 100644 --- a/Resources/PreferencesWindow.xib +++ b/Resources/PreferencesWindow.xib @@ -1,9 +1,9 @@ - + - - + + @@ -142,7 +142,7 @@ - + @@ -184,7 +184,7 @@ - + @@ -198,7 +198,7 @@ - + @@ -221,7 +221,7 @@ - + @@ -240,13 +240,13 @@ - + - + @@ -255,7 +255,7 @@ - + @@ -265,7 +265,7 @@ - + @@ -377,7 +377,7 @@ is disabled - + @@ -386,7 +386,7 @@ is disabled - + @@ -396,14 +396,14 @@ is disabled - + - + @@ -515,7 +515,7 @@ is disabled - + @@ -545,7 +545,7 @@ is disabled - + @@ -765,7 +765,7 @@ is disabled - + @@ -869,10 +869,10 @@ is disabled - + - + @@ -2988,10 +2988,12 @@ After changing the folder, please close System Preferences for this to be taken