Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f68aa588b | ||
|
|
406895a3f0 | ||
|
|
02539d72b1 | ||
|
|
71134ff322 |
No files matched your search
@@ -3,7 +3,7 @@
|
||||
|
||||
> The model(s) used: **Claude Opus 5.5, Claude Sonnet 5.5**
|
||||
|
||||
> AI contribution: **99%**, **Human contribution: 1%**
|
||||
> AI contribution: **99%**, Human contribution: **1%**
|
||||
|
||||
# Stemify
|
||||
|
||||
|
||||
@@ -34,13 +34,13 @@ final class AppDelegate: NSObject, UIApplicationDelegate {
|
||||
enum Orientation {
|
||||
nonisolated(unsafe) static var mask: UIInterfaceOrientationMask = .allButUpsideDown
|
||||
|
||||
@MainActor static func lock(_ upright: Bool) {
|
||||
let m: UIInterfaceOrientationMask = upright ? .portrait : .allButUpsideDown
|
||||
/// Folded Duo: portrait only. Unfolded Duo: landscape only. Anything else turns freely.
|
||||
@MainActor static func lock(_ m: UIInterfaceOrientationMask) {
|
||||
guard m != mask else { return }
|
||||
mask = m
|
||||
for case let scene as UIWindowScene in UIApplication.shared.connectedScenes {
|
||||
scene.keyWindow?.rootViewController?.setNeedsUpdateOfSupportedInterfaceOrientations()
|
||||
if upright { scene.requestGeometryUpdate(.iOS(interfaceOrientations: .portrait)) { _ in } }
|
||||
if m != .allButUpsideDown { scene.requestGeometryUpdate(.iOS(interfaceOrientations: m)) { _ in } }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,13 +131,24 @@ final class Ui {
|
||||
duo = true
|
||||
UserDefaults.standard.set(true, forKey: "duoSeen")
|
||||
}
|
||||
Orientation.lock(folded)
|
||||
lockOrientation()
|
||||
}
|
||||
|
||||
/// Split (unfolded) goes landscape at once. Portrait waits a moment and checks again, so a
|
||||
/// frame without a hinge reading mid-rotation can't throw an unfolded phone back upright.
|
||||
private func lockOrientation() {
|
||||
if split { Orientation.lock(.landscape); return }
|
||||
guard folded else { Orientation.lock(.allButUpsideDown); return }
|
||||
Task { @MainActor in
|
||||
try? await Task.sleep(for: .milliseconds(400))
|
||||
if self.folded { Orientation.lock(.portrait) }
|
||||
}
|
||||
}
|
||||
|
||||
func setSplit(_ on: Bool) {
|
||||
guard on != split else { return }
|
||||
split = on
|
||||
Orientation.lock(folded)
|
||||
lockOrientation()
|
||||
if on {
|
||||
nowPlayingOpen = false
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ struct NowPlayingScreen: View {
|
||||
private func panelView(_ track: Track, header: Bool) -> some View {
|
||||
switch panel {
|
||||
case .Art: ArtPanel(thumb: track.thumb, playing: g.playback.playWhenReady, inset: header || !tight ? artInset : 12,
|
||||
leading: folded && g.settings.foldedArtLeft).contentShape(Rectangle())
|
||||
leading: folded && !docked && !ui.split && g.settings.foldedArtLeft).contentShape(Rectangle())
|
||||
case .Mixer: VStack(spacing: 0) { if header { mini(track) }; MixerPanel(spread: folded) }
|
||||
case .Queue: VStack(spacing: 0) { if header { mini(track) }; QueuePanel(close: { show(.Queue) }) }
|
||||
case .Lyrics: VStack(spacing: 0) { if header { mini(track) }; LyricsPanel(track: track) }
|
||||
@@ -215,8 +215,8 @@ struct NowPlayingScreen: View {
|
||||
}
|
||||
|
||||
private func controls(_ track: Track, wide: Bool, width: CGFloat) -> some View {
|
||||
// Folded with a panel open, the controls give the panel some of their spacing.
|
||||
let snug = folded && panel != .Art
|
||||
// Folded, the controls keep the tight stems-panel spacing on every panel, so the art gets the room.
|
||||
let snug = folded
|
||||
let pm = g.playback
|
||||
let c = tint.map { base.tinted($0) } ?? base
|
||||
let pad: CGFloat = wide && tight ? 14 : hPad
|
||||
@@ -235,7 +235,7 @@ struct NowPlayingScreen: View {
|
||||
Spacer(minLength: 8)
|
||||
EllipsisButton(items: ui.menu.track(track))
|
||||
}
|
||||
.padding(.top, tight ? 8 : 14)
|
||||
.padding(.top, tight || snug ? 8 : 14)
|
||||
.transition(.opacity.combined(with: .move(edge: .top)))
|
||||
}
|
||||
ProgressVolumeBar(played: c.label, unplayed: c.label3, centerLabel: badge(track))
|
||||
@@ -742,7 +742,8 @@ private struct MixerPanel: View {
|
||||
// Spread spare height across the stem rows instead of leaving it all at the bottom.
|
||||
let count = CGFloat(max(names.count, 1))
|
||||
// Rows shrink to fit every stem before anything has to scroll (the folded outer display is short).
|
||||
let rowH = roomy ? min(84, max(Self.roomyMin, (geo.size.height - Self.roomyChrome) / count))
|
||||
// Roomy (the unfolded deck), the rows share every point under the chips down to the bottom.
|
||||
let rowH = roomy ? max(Self.roomyMin, (geo.size.height - chipsH - 8) / count)
|
||||
: min(62, max(spread ? Self.foldedMin : Self.compactMin, (geo.size.height - chipsH - 8) / count))
|
||||
// Gap above the rows that centres them on the whole panel, not just the space under the chips.
|
||||
let lead = max(0, (geo.size.height - rowH * count) / 2 - chipsH)
|
||||
@@ -760,7 +761,7 @@ private struct MixerPanel: View {
|
||||
HStack(spacing: 8) { saveChips(pm); presetChips(pm, names) }.padding(.horizontal, 24)
|
||||
}
|
||||
.scrollIndicators(.hidden)
|
||||
.padding(.horizontal, -24)
|
||||
.padding(.leading, -24).padding(.trailing, roomy ? -6 : -24)
|
||||
.padding(.vertical, 8)
|
||||
.onGeometryChange(for: CGFloat.self) { $0.size.height } action: { chipsH = $0 }
|
||||
}
|
||||
@@ -777,7 +778,8 @@ private struct MixerPanel: View {
|
||||
}
|
||||
Spacer(minLength: 8)
|
||||
}
|
||||
.padding(.horizontal, 24)
|
||||
// Roomy, the faders run right up to the hinge.
|
||||
.padding(.leading, 24).padding(.trailing, roomy ? 6 : 24)
|
||||
.frame(minHeight: geo.size.height)
|
||||
}
|
||||
.scrollIndicators(.hidden)
|
||||
@@ -928,8 +930,8 @@ struct FaderRow<Fader: View, Trailing: View>: View {
|
||||
.frame(height: 18)
|
||||
HStack(spacing: 8) { fader; trailing }
|
||||
}
|
||||
.padding(.bottom, 10)
|
||||
.frame(height: height, alignment: .bottom)
|
||||
// Centred in its slot, so tall rows keep even gaps above and below.
|
||||
.frame(height: height)
|
||||
} else {
|
||||
row
|
||||
}
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ settings:
|
||||
# iOS needs a plain number for the bundle version; the label is what the app and releases show.
|
||||
MARKETING_VERSION: "0.9.0"
|
||||
VERSION_LABEL: "0.9.0"
|
||||
CURRENT_PROJECT_VERSION: "32"
|
||||
CURRENT_PROJECT_VERSION: "35"
|
||||
# Dev builds override these (build-ipa.sh dev) so they install next to the release app.
|
||||
APP_ID: org.cdnutter.stemify
|
||||
APP_NAME: Stemify
|
||||
|
||||
Reference in new issue
Block a user