feat(workspaces): enhance workspace creation form styling and update tabpanel integration

This commit is contained in:
mr. m 2025-03-24 19:21:12 +01:00
parent 56a703de46
commit 8fcdddab56
No known key found for this signature in database
GPG key ID: 419302196C23B258
2 changed files with 30 additions and 7 deletions

View file

@ -499,4 +499,28 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
& .PanelUI-zen-workspaces-creation-wraper {
border-radius: 5px;
border: 1px solid var(--zen-colors-border);
margin-top: 10px;
background: var(--input-bgcolor, Field);
& .PanelUI-zen-workspaces-icons-container {
padding: 10px 0;
min-width: 40px;
display: flex;
align-items: center;
justify-content: center;
border-right: 1px solid var(--zen-colors-border);
margin-right: 2px;
}
& html|input {
border: none;
outline: none !important;
width: 100%;
}
}
} }

View file

@ -2397,10 +2397,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
} }
async openCreateForm() { async openCreateForm() {
window.docShell.treeOwner window.docShell.treeOwner.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIAppWindow).rollupAllPopups();
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIAppWindow)
.rollupAllPopups();
this.selectEmptyTab(); this.selectEmptyTab();
const sidebarWidth = gNavToolbox.style.getPropertyValue('--actual-zen-sidebar-width'); const sidebarWidth = gNavToolbox.style.getPropertyValue('--actual-zen-sidebar-width');
let elementsToAnimate = [gNavToolbox]; let elementsToAnimate = [gNavToolbox];
@ -2409,7 +2406,9 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
} }
this._creatingNewWorkspace = true; this._creatingNewWorkspace = true;
gNavToolbox.style.zIndex = -1; gNavToolbox.style.zIndex = -1;
document.getElementById('zen-sidebar-splitter').style.setProperty('min-width', 'var(--zen-element-separation)', 'important'); document
.getElementById('zen-sidebar-splitter')
.style.setProperty('min-width', 'var(--zen-element-separation)', 'important');
await Promise.all([ await Promise.all([
gZenUIManager.motion.animate(elementsToAnimate, { gZenUIManager.motion.animate(elementsToAnimate, {
transform: ['scale(1)', 'scale(0.8)'], transform: ['scale(1)', 'scale(0.8)'],
@ -2424,7 +2423,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
delay: 0.2, delay: 0.2,
} }
), ),
this.createAndSaveWorkspace() this.createAndSaveWorkspace(),
]); ]);
this._createWorkspcaeForm = window.MozXULElement.parseXULToFragment(` this._createWorkspcaeForm = window.MozXULElement.parseXULToFragment(`
<hbox id="zen-workspace-create-form-wrapper"> <hbox id="zen-workspace-create-form-wrapper">
@ -2442,6 +2441,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
</vbox> </vbox>
</hbox> </hbox>
`); `);
gBrowser.tabpanels.appendChild(form); gBrowser.tabpanels.appendChild(this._createWorkspcaeForm);
} }
})(); })();