forked from Blendman974/faceclaw
UI refinement pass
Remove gesture-help bottom-bars from many places in the UI, adjust layouts to be able to handle larger fonts, and other small UI fixes.
This commit is contained in:
1 parent
dc18737dfc
commit
35e6977c6c
17 files changed
+394
-321
No files matched your search
+17
-2
@@ -19,9 +19,14 @@ export function listRowHeight(font: UiFont): number {
|
||||
/** Vertical inset of a listRowHeight row's text within the row. */
|
||||
export const LIST_ROW_TEXT_INSET = 4;
|
||||
|
||||
/** Height of one row in dense lists (file browser, track lists). */
|
||||
/**
|
||||
* Height of one row in dense lists (file browser, track lists). Grows at
|
||||
* half the lineHeight's rate above the 12px anchor: TTF line heights carry
|
||||
* internal leading that already reads as row spacing, so full-rate growth
|
||||
* made large-font rows feel too tall.
|
||||
*/
|
||||
export function tightRowHeight(font: UiFont): number {
|
||||
return font.lineHeight + 4;
|
||||
return font.lineHeight + 4 - Math.floor(Math.max(0, font.lineHeight - 12) / 2);
|
||||
}
|
||||
|
||||
/** Step between consecutive lines of body/paragraph text. */
|
||||
@@ -33,3 +38,13 @@ export function lineStep(font: UiFont): number {
|
||||
export function menuTitleHeight(font: UiFont): number {
|
||||
return font.lineHeight + 4;
|
||||
}
|
||||
|
||||
/**
|
||||
* Minimum height of an icon-grid cell (icon, label line, breathing room).
|
||||
* Grid views divide their available height into as many rows of at least
|
||||
* this height as fit, so cells grow with the font instead of the label
|
||||
* overflowing a fixed-height row.
|
||||
*/
|
||||
export function iconGridMinRowHeight(font: UiFont, iconSize: number, labelGap: number): number {
|
||||
return iconSize + labelGap + font.lineHeight + 8;
|
||||
}
|
||||
Reference in new issue
Block a user