Adjust height of the tab bar
This commit is contained in:
@@ -70,15 +70,15 @@ export function setupBottomNav({ refreshPantry, refreshShoppingList } = {}) {
|
||||
const columnGap = (isCompact ? 0.05 : 0.06) * rootFontSize;
|
||||
const dockLeft = navPadLeft + ((navContentWidth - dockWidth) / 2);
|
||||
const controlSize = (isCompact ? 2.95 : 3.05) * rootFontSize;
|
||||
const expandedDockHeight = controlSize;
|
||||
const bottomControlSize = controlSize * 1.28;
|
||||
const controlGap = 0.5 * rootFontSize;
|
||||
const controlsLift = Math.max(0, (expandedDockHeight - controlSize) / 2);
|
||||
const collapsedDockWidth = controlSize;
|
||||
const controlsLift = 0;
|
||||
const collapsedDockWidth = bottomControlSize;
|
||||
const collapsedSlotWidth = Math.max(32, collapsedDockWidth - padLeft - padRight);
|
||||
const controlCluster = controlSize + controlGap;
|
||||
const controlCluster = bottomControlSize + controlGap;
|
||||
const compactExtraWidth = (EXTRA_CONTROL_SLOTS[activeTab] || 0) * controlCluster;
|
||||
const filterLeft = dockLeft + dockWidth - controlSize;
|
||||
const searchButtonLeft = filterLeft - controlGap - controlSize;
|
||||
const filterLeft = dockLeft + dockWidth - bottomControlSize;
|
||||
const searchButtonLeft = filterLeft - controlGap - bottomControlSize;
|
||||
const searchRight = Math.max(16, nav.clientWidth - filterLeft + controlGap);
|
||||
|
||||
nav.style.setProperty('--recipe-dock-width', `${dockWidth}px`);
|
||||
@@ -93,6 +93,7 @@ export function setupBottomNav({ refreshPantry, refreshShoppingList } = {}) {
|
||||
document.documentElement.style.setProperty('--catalog-search-btn-left', `${searchButtonLeft}px`);
|
||||
document.documentElement.style.setProperty('--catalog-search-right', `${searchRight}px`);
|
||||
document.documentElement.style.setProperty('--recipe-control-size', `${controlSize}px`);
|
||||
document.documentElement.style.setProperty('--recipe-bottom-control-size', `${bottomControlSize}px`);
|
||||
document.documentElement.style.setProperty('--recipe-controls-lift', `${controlsLift}px`);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user