blob: e61f82ae0c1eaca4be520b08af56fc2f33bfbc10 [file] [log] [blame]
////
/// @group common/cash-register
////
/// Local variable to determine a fixed spacing between buttons in grid-like button arrangements.
/// As per _variables this should always be an even number!
$half-spacing: $v-layout-spacing-vertical/2;
/// Local variable to define a base button height.
/// Two times this value plus spacing should correspond with total height of vertically aligned textfields (with captions on top).
/// Only relevant for cash register/POS application so far.
$cash-button-base-height: round(strip_unit($v-unit-size * $os-cash-zoom-factor - $half-spacing)) + 0px;
$cash-display-button-base-height: $v-unit-size * $os-cash-display-zoom-factor - $half-spacing + 0px;
$cash-button-base-width: $cash-button-base-height * 2 + $v-layout-spacing-vertical;
/* /// Resize fields according to cash zoom. Also used in _cash-register. Field width should be the same size as three regular (cash context) width buttons. */
/* $cash-field-width: make_even(($v-unit-size * 2 * $os-cash-zoom-factor * 3) - (2 * first-number($v-border)) + (2 * $v-layout-spacing-horizontal)); */
/// Resize fields according to cash zoom. Also used in _cash-register. This is the same width as two regular width buttons.
$cash-field-width: make_even(($v-unit-size * 2 * $os-cash-zoom-factor * 2) + (1 * $v-layout-spacing-horizontal));
/// Resize fields according to cash display zoom. Also used in _cash-register. This is the same width as ?.
$cash-display-field-width: make_even(($v-unit-size * 2 * $os-cash-display-zoom-factor * 2) + (1 * $v-layout-spacing-horizontal));
/// Resize fields according to cash zoom. Also used in _cash-register. Field height should be the same size as one quad (cash context) height button.
/* $cash-field-height: ($v-unit-size * $os-cash-zoom-factor * 4) + ($v-layout-spacing-vertical); */
/* $cash-field-height: $cash-button-base-height + $v-layout-spacing-vertical; */
$cash-field-height: $cash-button-base-height * 4 + $v-layout-spacing-vertical * 3;
$cash-display-field-height: $cash-display-button-base-height * 4 + $v-layout-spacing-vertical * 3;
/// Scale basic font size for components inside os-cash-register.
$font-size-adjustment: $os-cash-zoom-factor / 4 * 3;
/// Removes shadows from groups and buttons in Cash area
$os-cash-no-shadow: 1;
/// Checksum: sometimes 2x button height and 1x button width don't align.
/// adjust values just in case. 2x height and 1x width should always result in a square.
@if ($cash-button-base-height * 2 != $cash-button-base-width) {
$recalc: $cash-button-base-height - $cash-button-base-width + 0px;
/* possibly needed at some point, but seems to work right now */
}