feat: Make scrollable widgets flexible

This commit is contained in:
freeplay 2023-06-25 18:19:37 -04:00
parent 6809c2fcbc
commit cc1b34d3e5
3 changed files with 12 additions and 2 deletions

View file

@ -196,6 +196,7 @@ export default defineComponent({
&.scrollable {
display: flex;
flex-direction: column;
flex-grow: 1;
> .content {
overflow: auto;

View file

@ -172,6 +172,9 @@ function onContextmenu(widget: Widget, ev: MouseEvent) {
<style lang="scss" scoped>
.vjoppmmu {
display: flex;
flex-direction: column;
flex-grow: 1;
> header {
margin: 16px 0;
@ -184,7 +187,7 @@ function onContextmenu(widget: Widget, ev: MouseEvent) {
> .widget,
.customize-container {
contain: content;
margin: var(--margin) 0;
margin-bottom: var(--margin);
&:first-of-type {
margin-top: 0;

View file

@ -88,9 +88,11 @@ function updateWidgets(widgets) {
min-height: 100vh;
padding: var(--margin) 0;
box-sizing: border-box;
display: flex;
flex-direction: column;
> * {
margin: var(--margin) 0;
margin-top: var(--margin);
width: 300px;
&:first-child {
@ -98,6 +100,10 @@ function updateWidgets(widgets) {
}
}
.a:empty {
display: none;
}
> .add {
margin: 0 auto;
}