Commit 8493f3d3c7
Unsigned
Layout: unified · split
App/AppStore/header-16x9.png
Binary file not shown.
App/AppStore/header-21x9.png
Binary file not shown.
App/AppStore/screenshots/ipad/01-sky.png
Binary file not shown.
App/AppStore/screenshots/ipad/02-3d.png
Binary file not shown.
App/AppStore/screenshots/ipad/03-sun.png
Binary file not shown.
App/AppStore/screenshots/ipad/04-library.png
Binary file not shown.
App/AppStore/screenshots/iphone-6.3/01-sky.png
Binary file not shown.
App/AppStore/screenshots/iphone-6.3/02-tonight.png
Binary file not shown.
App/AppStore/screenshots/iphone-6.3/03-system.png
Binary file not shown.
App/AppStore/screenshots/iphone-6.3/04-3d.png
Binary file not shown.
App/AppStore/screenshots/iphone-6.3/05-sun.png
Binary file not shown.
App/AppStore/screenshots/iphone-6.3/06-launches.png
Binary file not shown.
App/AppStore/screenshots/iphone-6.3/07-library.png
Binary file not shown.
App/AppStore/screenshots/iphone-6.3/08-jupiter.png
Binary file not shown.
App/AppStore/screenshots/iphone-6.9/01-sky.png
Binary file not shown.
App/AppStore/screenshots/iphone-6.9/02-tonight.png
Binary file not shown.
App/AppStore/screenshots/iphone-6.9/03-system.png
Binary file not shown.
App/AppStore/screenshots/iphone-6.9/04-3d.png
Binary file not shown.
App/AppStore/screenshots/iphone-6.9/05-sun.png
Binary file not shown.
App/AppStore/screenshots/iphone-6.9/06-launches.png
Binary file not shown.
App/AppStore/screenshots/iphone-6.9/07-library.png
Binary file not shown.
App/AppStore/screenshots/iphone-6.9/08-jupiter.png
Binary file not shown.
App/AppStore/screenshots/watch/01-tonight.png
Binary file not shown.
App/Sources/SolarSystem3D.swift +5 −1
| @@ -758,6 +758,8 @@ struct SolarSystem3DView: View { | ||
| 758 | 758 | } |
| 759 | 759 | } |
| 760 | 760 | var placed: [CGRect] = [] |
| 761 | // SBDB can add dozens of comets; past this many, the rest are drawn without names unless selected. | |
| 762 | var cometLabels = 0 | |
| 761 | 763 | let points = screenPoints(size: size) |
| 762 | 764 | // Anything whose centre falls on the disc of a nearer body is hidden behind it. |
| 763 | 765 | let discs = points.filter { $0.radius > 4 }.map { ($0.point, $0.radius, cam.distance(to: $0.marker.scene)) } |
| @@ -772,8 +774,10 @@ struct SolarSystem3DView: View { | ||
| 772 | 774 | // caption2 runs about 6 pt a character; a little padding keeps neighbours readable. |
| 773 | 775 | let width = CGFloat(item.marker.name.count) * 6 + 8 |
| 774 | 776 | let box = CGRect(x: at.x - width / 2, y: at.y - 8, width: width, height: 16) |
| 775 | let clear = item.marker.id == selected || !placed.contains { $0.intersects(box) } | |
| 777 | let room = item.marker.kind != .comet || cometLabels < 6 | |
| 778 | let clear = item.marker.id == selected || (room && !placed.contains { $0.intersects(box) }) | |
| 776 | 779 | if clear { placed.append(box) } |
| 780 | if clear, item.marker.kind == .comet { cometLabels += 1 } | |
| 777 | 781 | return (item.marker, item.point, item.radius, clear) |
| 778 | 782 | } |
| 779 | 783 | } |
App/UITests/ScreenshotTests.swift +3 −1
| @@ -21,8 +21,10 @@ final class ScreenshotTests: XCTestCase { | ||
| 21 | 21 | try XCUIScreen.main.screenshot().pngRepresentation.write(to: folder.appending(path: "\(name).png")) |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | /// iPhone has a tab bar; iPad's tabs at the top are plain buttons. | |
| 24 | 25 | private func tab(_ name: String) { |
| 25 | app.tabBars.buttons[name].firstMatch.tap() | |
| 26 | let bar = app.tabBars.buttons[name].firstMatch | |
| 27 | (bar.exists ? bar : app.buttons[name].firstMatch).tap() | |
| 26 | 28 | } |
| 27 | 29 | |
| 28 | 30 | func testScreenshots() throws { |