Improved Controls CSS

This commit is contained in:
n1474335 2022-07-01 12:01:48 +01:00
parent 85ffe48743
commit bc949b47d9
4 changed files with 17 additions and 12 deletions

View File

@ -589,6 +589,7 @@ class App {
this.manager.recipe.adjustWidth();
this.manager.input.calcMaxTabs();
this.manager.output.calcMaxTabs();
this.manager.controls.calcControlsHeight();
}

View File

@ -6,27 +6,20 @@
* @license Apache-2.0
*/
:root {
--controls-height: 75px;
}
#controls {
position: absolute;
width: 100%;
height: var(--controls-height);
bottom: 0;
padding: 0;
padding-top: 12px;
padding: 10px 0;
border-top: 1px solid var(--primary-border-colour);
background-color: var(--secondary-background-colour);
}
#controls-content {
position: relative;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
transform-origin: center left;
display: flex;
flex-flow: row nowrap;
align-items: center;
}
#auto-bake-label {
@ -56,6 +49,7 @@
#controls .btn {
border-radius: 30px;
margin: 0;
}
.output-maximised .hide-on-maximised-output {

View File

@ -7,7 +7,6 @@
*/
#rec-list {
bottom: var(--controls-height);
overflow: auto;
}

View File

@ -410,6 +410,17 @@ ${navigator.userAgent}
}
}
/**
* Calculates the height of the controls area and adjusts the recipe
* height accordingly.
*/
calcControlsHeight() {
const controls = document.getElementById("controls"),
recList = document.getElementById("rec-list");
recList.style.bottom = controls.clientHeight + "px";
}
}
export default ControlsWaiter;