centered windozzz
This commit is contained in:
@@ -347,33 +347,6 @@ article[eiccard][media] > header {
|
|||||||
font-size: 1.6rem;
|
font-size: 1.6rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
[device="tablet"] section .cols-2:not(.noflex), [device="mobile"] section .cols-2:not(.noflex) {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
grid-template-columns: none;
|
|
||||||
align-items: initial;
|
|
||||||
}
|
|
||||||
[device="tablet"] .cols-3, [device="mobile"] .cols-3,
|
|
||||||
[device="tablet"] .cols-4, [device="mobile"] .cols-4,
|
|
||||||
[device="tablet"] .cols-5, [device="mobile"] .cols-5,
|
|
||||||
[device="mobile"] .cols-6 {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
grid-template-columns: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
[device="tablet"] .cols-6 {
|
|
||||||
grid-template-columns: 1fr 1fr 1fr;
|
|
||||||
}
|
|
||||||
|
|
||||||
[device="tablet"] .cols-8 {
|
|
||||||
grid-template-columns: 1fr 1fr 1fr 1fr;
|
|
||||||
}
|
|
||||||
|
|
||||||
[device="mobile"] .cols-8 {
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.window > section:first-of-type > article[eiccard]:first-of-type{
|
div.window > section:first-of-type > article[eiccard]:first-of-type{
|
||||||
height:100%;
|
height:100%;
|
||||||
border: 2px solid var(--app-color-primary);
|
border: 2px solid var(--app-color-primary);
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class SimsController extends WindozController {
|
|||||||
static: true,
|
static: true,
|
||||||
expanded: false,
|
expanded: false,
|
||||||
withSettings: false,
|
withSettings: false,
|
||||||
windowStyle: WindozDomContent.boxFromPrefs('sims.createsimview', { x: 50, y: 50, w: 800, h: 600 }),
|
windowStyle: WindozDomContent.boxFromPrefs('sims.createsimview', { x: 'center', y: 'center', w: 600, h: 300 }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
models: models,
|
models: models,
|
||||||
|
|||||||
@@ -276,12 +276,19 @@ class WindozDomContent extends View {
|
|||||||
left = box.x ? box.x : defaults.x
|
left = box.x ? box.x : defaults.x
|
||||||
top = box.y ? box.y : defaults.y
|
top = box.y ? box.y : defaults.y
|
||||||
width = box.w ? box.w : defaults.w
|
width = box.w ? box.w : defaults.w
|
||||||
height = box.x ? box.h : defaults.h
|
height = box.h ? box.h : defaults.h
|
||||||
} else {
|
} else {
|
||||||
left = defaults.x
|
left = defaults.x
|
||||||
top = defaults.y
|
top = defaults.y
|
||||||
width = defaults.w
|
width = defaults.w
|
||||||
height = defaults.h
|
height = defaults.h
|
||||||
|
const ws = document.querySelector('[eicapp] .app-workspace')?.getBoundingClientRect()
|
||||||
|
const areaLeft = ws?.left ?? 0
|
||||||
|
const areaTop = ws?.top ?? 0
|
||||||
|
const areaWidth = ws?.width ?? window.innerWidth
|
||||||
|
const areaHeight = ws?.height ?? window.innerHeight
|
||||||
|
if(left === 'center') left = Math.round(areaLeft + (areaWidth - width) / 2)
|
||||||
|
if(top === 'center') top = Math.round(areaTop + (areaHeight - height) / 2)
|
||||||
}
|
}
|
||||||
return({
|
return({
|
||||||
width: `${width}px`,
|
width: `${width}px`,
|
||||||
|
|||||||
@@ -1,11 +1,19 @@
|
|||||||
<style>
|
<style>
|
||||||
.create-sim section {
|
.create-sim > section {
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
|
display: grid;
|
||||||
|
grid-gap: .5em;
|
||||||
}
|
}
|
||||||
.create-sim bz-select[data-output="keyframesSelector"] {
|
.create-sim bz-select[data-output="keyframesSelector"] {
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
}
|
}
|
||||||
.create-sim .cols-2 { align-items: baseline; }
|
.create-sim .cols-2 { align-items: baseline; }
|
||||||
|
.create-sim button[eicbutton][rounded] {
|
||||||
|
background-color: #367;
|
||||||
|
color: #DDD !important;
|
||||||
|
padding: .5em 1em !important;
|
||||||
|
justify-self: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<article eiccard class="create-sim">
|
<article eiccard class="create-sim">
|
||||||
<header>
|
<header>
|
||||||
|
|||||||
Reference in New Issue
Block a user