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 { &.scrollable {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex-grow: 1;
> .content { > .content {
overflow: auto; overflow: auto;

View file

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

View file

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