mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-05 17:36:34 +00:00
Enhance tab management by allowing drag-and-drop functionality with the workspace indicator and adjust URL bar primary adjustment timing
This commit is contained in:
@@ -647,7 +647,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
moveToAnotherTabContainerIfNecessary(event, draggedTab) {
|
moveToAnotherTabContainerIfNecessary(event, draggedTab) {
|
||||||
const pinnedTabsTarget = event.target.closest('#vertical-pinned-tabs-container');
|
const pinnedTabsTarget =
|
||||||
|
event.target.closest('#vertical-pinned-tabs-container') || event.target.closest('#zen-current-workspace-indicator');
|
||||||
const essentialTabsTarget = event.target.closest('#zen-essentials-container');
|
const essentialTabsTarget = event.target.closest('#zen-essentials-container');
|
||||||
const tabsTarget = event.target.closest('#tabbrowser-arrowscrollbox');
|
const tabsTarget = event.target.closest('#tabbrowser-arrowscrollbox');
|
||||||
|
|
||||||
@@ -716,6 +717,7 @@
|
|||||||
removeTabContainersDragoverClass() {
|
removeTabContainersDragoverClass() {
|
||||||
this.dragIndicator.remove();
|
this.dragIndicator.remove();
|
||||||
this._dragIndicator = null;
|
this._dragIndicator = null;
|
||||||
|
document.getElementById('zen-current-workspace-indicator').removeAttribute('open');
|
||||||
}
|
}
|
||||||
|
|
||||||
get dragIndicator() {
|
get dragIndicator() {
|
||||||
@@ -736,6 +738,12 @@
|
|||||||
const essentialTabsTarget = event.target.closest('#zen-essentials-container');
|
const essentialTabsTarget = event.target.closest('#zen-essentials-container');
|
||||||
const tabsTarget = event.target.closest('#tabbrowser-arrowscrollbox');
|
const tabsTarget = event.target.closest('#tabbrowser-arrowscrollbox');
|
||||||
const targetTab = event.target.closest('.tabbrowser-tab');
|
const targetTab = event.target.closest('.tabbrowser-tab');
|
||||||
|
if (event.target.closest('#zen-current-workspace-indicator')) {
|
||||||
|
this.removeTabContainersDragoverClass();
|
||||||
|
event.target.setAttribute('open', true);
|
||||||
|
} else {
|
||||||
|
document.getElementById('zen-current-workspace-indicator').removeAttribute('open');
|
||||||
|
}
|
||||||
|
|
||||||
// If there's no valid target tab, nothing to do
|
// If there's no valid target tab, nothing to do
|
||||||
if (!targetTab) {
|
if (!targetTab) {
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs
|
diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||||
index 50968dc04b527438acf30151f0c2e92f8b45097c..0d4c899a8a0d98d6cac41ecdd1c40df52bd050be 100644
|
index 50968dc04b527438acf30151f0c2e92f8b45097c..2948efd18fb1ee609695acd5b5b0211ce209ff1a 100644
|
||||||
--- a/browser/components/urlbar/UrlbarInput.sys.mjs
|
--- a/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||||
+++ b/browser/components/urlbar/UrlbarInput.sys.mjs
|
+++ b/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||||
@@ -67,6 +67,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
@@ -67,6 +67,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
||||||
@@ -24,7 +24,7 @@ index 50968dc04b527438acf30151f0c2e92f8b45097c..0d4c899a8a0d98d6cac41ecdd1c40df5
|
|||||||
this.inputField.select();
|
this.inputField.select();
|
||||||
+ this.document.ownerGlobal.setTimeout(() => {
|
+ this.document.ownerGlobal.setTimeout(() => {
|
||||||
+ this.document.getElementById("navigator-toolbox").removeAttribute("supress-primary-adjustment");
|
+ this.document.getElementById("navigator-toolbox").removeAttribute("supress-primary-adjustment");
|
||||||
+ }, 0);
|
+ }, 100);
|
||||||
this._suppressPrimaryAdjustment = false;
|
this._suppressPrimaryAdjustment = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
src/browser/themes/shared/zen-icons/expand-sidebar.svg
Normal file
1
src/browser/themes/shared/zen-icons/expand-sidebar.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" height="18" width="18" viewBox="0 0 18 18"><g stroke-linecap="round" stroke-width="1.5" fill="none" stroke="currentColor" stroke-linejoin="round" class="nc-icon-wrapper"><line x1="6.25" y1="12.5" x2="6.25" y2="15.25" data-color="color-2"></line><line x1="6.25" y1="2.75" x2="6.25" y2="5.5" data-color="color-2"></line><polyline points="8.75 6.5 6.25 9 8.75 11.5" data-color="color-2"></polyline><line x1="6.25" y1="9" x2="12.75" y2="9" data-color="color-2"></line><rect x="1.75" y="2.75" width="14.5" height="12.5" rx="2" ry="2" transform="translate(18 18) rotate(180)"></rect></g></svg>
|
After Width: | Height: | Size: 628 B |
@@ -390,7 +390,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#zen-expand-sidebar-button {
|
#zen-expand-sidebar-button {
|
||||||
list-style-image: url('sidebar.svg') !important;
|
list-style-image: url('expand-sidebar.svg') !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel-header > .subviewbutton-back {
|
.panel-header > .subviewbutton-back {
|
||||||
|
@@ -39,6 +39,7 @@
|
|||||||
skin/classic/browser/zen-icons/edit.svg (../shared/zen-icons/edit.svg)
|
skin/classic/browser/zen-icons/edit.svg (../shared/zen-icons/edit.svg)
|
||||||
skin/classic/browser/zen-icons/essential-add.svg (../shared/zen-icons/essential-add.svg)
|
skin/classic/browser/zen-icons/essential-add.svg (../shared/zen-icons/essential-add.svg)
|
||||||
skin/classic/browser/zen-icons/essential-remove.svg (../shared/zen-icons/essential-remove.svg)
|
skin/classic/browser/zen-icons/essential-remove.svg (../shared/zen-icons/essential-remove.svg)
|
||||||
|
skin/classic/browser/zen-icons/expand-sidebar.svg (../shared/zen-icons/expand-sidebar.svg)
|
||||||
skin/classic/browser/zen-icons/ext-link.svg (../shared/zen-icons/ext-link.svg)
|
skin/classic/browser/zen-icons/ext-link.svg (../shared/zen-icons/ext-link.svg)
|
||||||
skin/classic/browser/zen-icons/extension-blocked.svg (../shared/zen-icons/extension-blocked.svg)
|
skin/classic/browser/zen-icons/extension-blocked.svg (../shared/zen-icons/extension-blocked.svg)
|
||||||
skin/classic/browser/zen-icons/extension.svg (../shared/zen-icons/extension.svg)
|
skin/classic/browser/zen-icons/extension.svg (../shared/zen-icons/extension.svg)
|
||||||
|
Reference in New Issue
Block a user