mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
feat: Handle workspace panel hiding event
This commit adds a new `onpopuphidden` attribute to the `<panel>` element that defines the workspace panel. This attribute triggers the `ZenWorkspaces.handlePanelHidden()` function when the panel is hidden. This change is necessary to allow the application to properly handle the case when the workspace panel is hidden so that the reorder mode can be disabled. The following changes were made: - Added the `onpopuphidden` attribute to the `<panel>` element in `zen-popupset.inc.xhtml`. - Added a new CSS class `.zen-workspace-last-place-drop-target` to `zen-workspaces.css`. - Modified the `zen-workspaces.css` file to display the `.zen-workspace-last-place-drop-target` class only in reorder mode.
This commit is contained in:
@@ -101,7 +101,7 @@
|
||||
</vbox>
|
||||
</panelview>
|
||||
|
||||
<panel flip="slide" type="arrow" orient="vertical" id="PanelUI-zen-workspaces" position="bottomright topright" mainview="true" side="left">
|
||||
<panel flip="slide" type="arrow" orient="vertical" id="PanelUI-zen-workspaces" position="bottomright topright" mainview="true" side="left" onpopuphidden="ZenWorkspaces.handlePanelHidden();">
|
||||
<panelmultiview id="PanelUI-zen-workspaces-multiview" mainViewId="PanelUI-zen-workspaces-view">
|
||||
<panelview id="PanelUI-zen-workspaces-view" class="PanelUI-subView" role="document" mainview-with-header="true" has-custom-header="true" closemenu="none">
|
||||
<vbox>
|
||||
|
@@ -345,6 +345,11 @@
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.zen-workspace-last-place-drop-target.dragover {
|
||||
background-color: var(--toolbarbutton-icon-fill-attention);
|
||||
}
|
||||
|
||||
|
||||
#PanelUI-zen-workspaces-reorder-mode[active='true'] {
|
||||
color: var(--toolbarbutton-icon-fill-attention) !important;
|
||||
}
|
||||
@@ -362,6 +367,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
#PanelUI-zen-workspaces-list[reorder-mode='true'] .zen-workspace-last-place-drop-target {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.zen-workspace-last-place-drop-target {
|
||||
display: none;
|
||||
height: 4px;
|
||||
width: 100%;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#PanelUI-zen-workspaces-view > vbox:nth-child(2) {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
Reference in New Issue
Block a user