Salah 0.3: larger AMOLED UI with swipe-scrollable prayers
This commit is contained in:
+4
-12
@@ -148,18 +148,10 @@ test('update() rows: six entries, key+label+time wired', () => {
|
||||
}
|
||||
})
|
||||
|
||||
test('row widths taper with the chord and fit the 466 circle at every row position', () => {
|
||||
// rows: 6 x 40px + 5 x 4px margins, block starts after header+banner (top=130)
|
||||
const ROW_WIDTHS = spec.ROW_WIDTHS || sandbox.ROW_WIDTHS
|
||||
assert.equal(ROW_WIDTHS.length, 6)
|
||||
const H = 40, MARGIN = 4, BLOCK_TOP = 130, R = 233, INSET = 10
|
||||
for (let n = 0; n < 6; n++) {
|
||||
const top = BLOCK_TOP + n * (H + MARGIN)
|
||||
const dy = Math.max(Math.abs(233 - top), Math.abs(233 - (top + H)))
|
||||
const chord = 2 * Math.sqrt(Math.max(0, R * R - dy * dy))
|
||||
const safe = chord - 2 * INSET
|
||||
assert.ok(ROW_WIDTHS[n] <= safe, `row ${n} width ${ROW_WIDTHS[n]} exceeds safe chord ${safe.toFixed(0)} at top ${top}`)
|
||||
}
|
||||
test('all rows fit the scroll viewport', () => {
|
||||
const widths = sandbox.ROW_WIDTHS
|
||||
assert.equal(widths.length, 6)
|
||||
widths.forEach(width => assert.equal(width, 320))
|
||||
})
|
||||
|
||||
test('bound rowStyle width equals ROW_WIDTHS[i]', () => {
|
||||
|
||||
Reference in New Issue
Block a user