feat: Add indent to preference and tweak glance animation, b=no-bug, c=glance

This commit is contained in:
mr. m
2025-10-10 00:16:23 +02:00
parent 5919dc41b9
commit 28bf0458e4
2 changed files with 19 additions and 11 deletions

View File

@@ -1,18 +1,20 @@
diff --git a/browser/components/preferences/main.inc.xhtml b/browser/components/preferences/main.inc.xhtml
index 891cf7108cf4606c99a902afa420e744b9690b87..72034b4a28e68016c04d06a2991ccebff30dd341 100644
index 891cf7108cf4606c99a902afa420e744b9690b87..80a971b4a3e733e6495a0a11654c209e2aea5d9c 100644
--- a/browser/components/preferences/main.inc.xhtml
+++ b/browser/components/preferences/main.inc.xhtml
@@ -29,6 +29,9 @@
@@ -29,6 +29,11 @@
<vbox id="startupPageBox">
<checkbox id="browserRestoreSession"
data-l10n-id="startup-restore-windows-and-tabs"/>
+ <vbox id="windowsLaunchOnLoginDisabledBox" align="center" class="indent" hidden="true">
+ <checkbox id="zenWorkspaceContinueWhereLeftOff"
+ data-l10n-id="zen-workspace-continue-where-left-off"
+ preference="zen.workspaces.continue-where-left-off"/>
+ </vbox>
#ifdef XP_WIN
<hbox id="windowsLaunchOnLoginBox" align="center" hidden="true">
<checkbox id="windowsLaunchOnLogin"
@@ -189,7 +192,8 @@
@@ -189,7 +194,8 @@
<!-- Browser layout -->
<groupbox data-category="paneGeneral"
data-subcategory="layout"
@@ -22,7 +24,7 @@ index 891cf7108cf4606c99a902afa420e744b9690b87..72034b4a28e68016c04d06a2991ccebf
<label><html:h2 data-l10n-id="browser-layout-header"/></label>
<radiogroup id="browserLayoutRadioGroup" preference="sidebar.verticalTabs">
<radio id="browserLayoutHorizontalTabs" data-l10n-id="browser-layout-horizontal-tabs" value="false"/>
@@ -420,6 +424,7 @@
@@ -420,6 +426,7 @@
languages-customize-add.label,
" />
</hbox>

View File

@@ -373,9 +373,10 @@
/**
* Handle element preview if provided
* @param {Object} data - Glance data
* @param {Object} rect - The rectangle data
* @returns {Element|null} The preview element or null
*/
#handleElementPreview(data) {
#handleElementPreview(data, rect) {
if (!data.elementData) {
return null;
}
@@ -383,9 +384,11 @@
const imageDataElement = document.createXULElement('image');
imageDataElement.setAttribute('src', data.elementData);
imageDataElement.classList.add('zen-glance-element-preview');
imageDataElement.style.width = `${data.width}px`;
imageDataElement.style.height = `${data.height}px`;
this.browserWrapper.prepend(imageDataElement);
this.#glances.get(this.#currentGlanceID).elementImageData = data.elementData;
return imageDataElement;
}
@@ -834,7 +837,7 @@
const originalPosition = this.#glances.get(this.#currentGlanceID).originalPosition;
const elementImageData = this.#glances.get(this.#currentGlanceID).elementImageData;
this.#addElementPreview(elementImageData);
this.#addElementPreview(elementImageData, originalPosition);
// Create curved closing animation sequence
const closingData = this.#createClosingDataFromOriginalPosition(originalPosition);
@@ -876,12 +879,15 @@
/**
* Add element preview if available
* @param {string} elementImageData - The element image data
* @param {Object} rect - The rectangle data
*/
#addElementPreview(elementImageData) {
#addElementPreview(elementImageData, rect) {
if (elementImageData) {
const imageDataElement = document.createXULElement('image');
imageDataElement.setAttribute('src', elementImageData);
imageDataElement.classList.add('zen-glance-element-preview');
imageDataElement.style.width = rect.width;
imageDataElement.style.height = rect.height;
this.browserWrapper.prepend(imageDataElement);
}
}