Updating 46/vertical-workspaces to version 46.2+20240828 [5b87af5].
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
6c3def31e8
commit
f2db668ec8
27 changed files with 6003 additions and 4248 deletions
|
@ -1,5 +1,79 @@
|
|||
## Changelog:
|
||||
### v46.1 for GNOME 45.2+, v44.12 for GNOME 42-44 (not released yet)
|
||||
### v46.4 for GNOME 45.2+ (), v44.14 for GNOME 42-44 (not yet released)
|
||||
**Fixed:**
|
||||
- App grid: Inconsistent grid size on the same monitor when switching monitors (#160)
|
||||
- App grid: The grid layout manager's current page being out of sync with the grid's current page causes page shifts while dragging app icons and incorrect page navigation controls (#160, upstream bug)
|
||||
- App grid: After dragging an icon out of a multi-page folder, the folder view shows navigation hints the next time it is opened (#160, upstream bug)
|
||||
- App grid: Grid page switches to the page with selected icon when user starts dragging an icon on another page
|
||||
- App grid: Page indicators don't accept drop, so the app icon can't be moved to a new page
|
||||
- App grid: Keyboard navigation inside a folder doesn't work (upstream bug, fixed in GS 47)
|
||||
- App grid: Workspace thumbnails not re-scaling after switching workspace outside of the overview using a trackpad
|
||||
- Vertical dash: Running dot position in GNOME 46.0 (Ubuntu 24.04)
|
||||
|
||||
**Added:**
|
||||
- GNOME 47 support
|
||||
- *Adaptive* options for the maximum dash and app search icon size that supports low resolution and highly scaled displays
|
||||
- Search view scroll bar style to make it visible
|
||||
- App grid: Drag-and-drop between folders
|
||||
- App grid: Added an option *App Grid Search Mode* that can be set to *Filter App Grid View*, which filters the app grid icons while you're typing, instead of switching to the default search view
|
||||
- App grid: Added *Alphabet* sorting option that sorts folders along with apps
|
||||
|
||||
|
||||
### v46.3.1 for GNOME 45.2+ (2024-06-10), v44.14 for GNOME 42-44 (not yet released)
|
||||
**Fixed:**
|
||||
- *App Grid Page Height Scale* option affects folder icon size
|
||||
- *Smooth App Grid Animations* options has no effect
|
||||
|
||||
|
||||
### v46.3 for GNOME 45.2+ (2024-06-08), v44.14 for GNOME 42-44 (not yet released)
|
||||
**Fixed:**
|
||||
- App grid icon order and grid dimensions issues (#160)
|
||||
- App grid partially visible after login
|
||||
- Vertical dash running app indicator position in GNOME 46.2 (#150)
|
||||
- Dash label border radius is set too high for multiline labels
|
||||
- Search entry position in some overview configurations (#161)
|
||||
- Window attention handler options don't work properly
|
||||
|
||||
**Added**
|
||||
- App grid *App Grid Page Height Scale* option
|
||||
- Separated *Folder Grid Spacing* option
|
||||
|
||||
|
||||
### v46.2 for GNOME 45.2+ (2024-05-15), v44.13 for GNOME 42-44 (2024-05-15)
|
||||
**Fixed:**
|
||||
- Inconsistent behavior of dash icons and app grid icons (#152)
|
||||
- Sorting option doesn't work for app folders (#154)
|
||||
- V-Shell overrides Dash to Dock's background opacity setting (#155)
|
||||
- Conflicts with Dash2Dock Animated (#153)
|
||||
- When the main panel is set to show only in the overview, its content might be unclickable (#157)
|
||||
- Workspace thumbnails DND can be difficult to use when creating new workspaces (#128)
|
||||
|
||||
|
||||
### v46.1 for GNOME 45.2+ (2024-05-09), v44.12 for GNOME 42-44 (2024-05-09)
|
||||
**Fixed:**
|
||||
- Fixed conflicts with Dash to Dock that could cause GNOME to crash at startup
|
||||
- Resolved issue where V-Shell affected Dash to Dock icon highlighting
|
||||
- Corrected search entry and results allocation to consider Dash to Dock
|
||||
- Adjusted app folder dialogs for proper sizing and positioning
|
||||
- Aligned secondary monitor overview with the primary one (option)
|
||||
- Removed all code related to previously removed modules
|
||||
- Fixed GNOME Shell recovery when V-Shell is disabled
|
||||
- The *App Grid Page Width Scale* option now works for all configurations
|
||||
|
||||
**Added:**
|
||||
- Added *Delay at Startup* option to allow delaying activation of V-Shell after login. Automatically enabled when Dash to Dock, Ubuntu Dock, or Dash to Panel is detected
|
||||
- Added *Click Empty Space To Close* option
|
||||
- Added close button to the app folder dialog
|
||||
|
||||
**Changed**
|
||||
- Refactored the app grid module for improved efficiency and reliability
|
||||
- Removed the 32px option for app grid icon size
|
||||
- Moved the *Remove* folder button to the left side of the folder dialog
|
||||
- Adjusted folder grid columns and rows settings to serve as maximum limits rather than fixed page size, allowing for better control over the default adaptive algorithm
|
||||
- Relocated all app grid settings to a separate tab for better organization
|
||||
|
||||
|
||||
### v46.0 for GNOME 45.2+ (2024-03-30 ego), v44.12 for GNOME 42-44 (not released)
|
||||
**Added**
|
||||
- Support for GNOME 46
|
||||
- Option *Fix New Window Not On Current Monitor* tries to work around that issue. However, success rate is not 100%
|
||||
|
|
|
@ -7,38 +7,129 @@ Currently supported GNOME versions: 42 - 46
|
|||
[<img alt="" height="100" src="https://raw.githubusercontent.com/andyholmes/gnome-shell-extensions-badge/master/get-it-on-ego.svg?sanitize=true">](https://extensions.gnome.org/extension/5177/vertical-workspaces/)
|
||||
|
||||

|
||||

|
||||
|
||||
## Features
|
||||
- Vertically or horizontally stacked workspaces
|
||||
- Adjust position, orientation, scale and visibility of overview content
|
||||
- Customizable profiles offer predefined configurations for GNOME 3.xx, GNOME 40+ and another 2 custom layouts
|
||||
- 2 overview modes with static windows/workspace. The *Static Workspace* option allows you to use dash like a dock with auto-hide, but with all advantages of the activities overview
|
||||
- Support for secondary monitors, workspace thumbnails can be placed on the opposite side than on the primary monitor
|
||||
- Wallpaper background with adjustable blur effect and brightness in the overview
|
||||
- Custom Dash icon size and on-click/scroll behavior
|
||||
- Optional workspace isolated Dash
|
||||
- Dash background transparency and corner radius adjustments
|
||||
- Adjustable app grid icon size, number of columns and rows, content, optional active and draggable icons in folder preview in optional 3x3 grid
|
||||
- Custom search view width, app results icons size and number of result lists rows, improved app search
|
||||
- Workspace thumbnails can show background wallpaper and labels (always or on mouse hover) with combination of workspace index, workspace name, name of the current application and current window title
|
||||
- Title captions of window previews moved into the preview (originally beneath the preview) and can be set as always visible. Adjustable window preview icon
|
||||
- Static background in workspace switcher (outside overview). Keeps Conky below, DING desktop icons stay visible (if not covered by windows)
|
||||
- Control over transition animations, including speed
|
||||
- Recent files search provider with *Ctrl + Space* hotkey
|
||||
- Supports WSP (Window search provider) extension with *Space* hotkey that allows quick window navigation
|
||||
- Supports ESP (Extensions search provider) with *Ctrl + Shift + Space* hotkey that allows to search for installed extensions, open their settings and enable or disable them
|
||||
- Reorder workspaces in overview using *Shift + Scroll* or *Shift + Page Up/Down*
|
||||
- Adds *Force Quit*, *Close Windows on Current Workspace* and *Move Windows to Current Workspace* items to app icon menu. The latter action can be activated using *Shift + click* on app icon
|
||||
- Change notification banners and OSD popups position
|
||||
- Window attention handler options can activate the attention-demanding window immediately or silence its notification
|
||||
- Optional position of the hot corner that can follow the dash and expand to hot edge
|
||||
- Super key double-press options
|
||||
- Supports WTMB (Window Thumbnails) extension that allows you to create Picture-in-Picture thumbnail of the window by clicking on its preview in the overview (secondary mouse buttons or window preview icon)
|
||||
- Supports both vertically and horizontally stacked workspaces
|
||||
- Customizable overview layout, appearance, behavior, shortcuts
|
||||
- Customizable secondary monitor overview
|
||||
- Static overview modes minimize screen content movement
|
||||
- Customizable app grid and app folders - icon size, dimensions, sorting, active folder previews
|
||||
- Customizable dash - icon size, appearance and behavior, workspace isolation, click and scroll actions
|
||||
- Customizable search - results width, number of results, improved searching
|
||||
- Customizable workspace switcher - static background
|
||||
- Notification and OSD positions and behavior
|
||||
- Window attention handler behavior
|
||||
- Hot corner/edge position
|
||||
- Customizable Super key behavior
|
||||
- Keyboard and mouse shortcuts allow advanced workspace and window control
|
||||
- 4 predefined and fully customizable profiles
|
||||
- Supports Dash to Dock / Ubuntu Dock / Dash to Panel
|
||||
|
||||
|
||||
## Added functionality
|
||||
This section explains some of the less obvious or less visible additions to the Shell's behavior.
|
||||
|
||||
### Overview - keyboard and mouse shortcuts
|
||||
|Shortcut| Description|
|
||||
|--------|------------|
|
||||
|`Shift + click on app icon in dash` | Move all windows of the application to the current workspace|
|
||||
|`Secondary mouse click on the activities indicator` | Open app grid|
|
||||
|`Shift + Scroll`, `Shift + Page Up/Down` | Reorder current workspace|
|
||||
|`Shift + Ctrl + Space` | Open V-Shell *Settings* window|
|
||||
|`Space` | Activate window search with all open windows if *WSP (Window Search Provider)* is installed and enabled|
|
||||
|`Ctrl + Space` | Activate extensions search with all installed extensions if *ESP (Extensions Search Provider)* is installed and enabled|
|
||||
|`Alt + Space` | Focus dash so you can use arrow keys to select app icon and `Space`/`Enter` to activate it
|
||||
|
||||
|
||||
### New buttons
|
||||
|Button| Description|
|
||||
|------|------------|
|
||||
| *Close button in workspace thumbnail* | Close all windows on the workspace. Default setting requires double-click |
|
||||
| *Trash button in app folder* | Remove folder - move all icons to the main grid. Requires double-click |
|
||||
|
||||
### Active icons in app folder previews
|
||||
To enhance the efficiency of the application menu, V-Shell offers the 'Active Icons in Folder Preview' option. When enabled, icons in the folder preview (folder icon) behave like regular app icons, allowing users to interact with them without opening the folder. V-Shell allows you to increase the number of icons in the preview from 4 to 9, as well as adjust the size of the app grid icons. This feature enables the folder icons to divide the main app grid into sections, with the most frequently used apps readily accessible while others remain hidden deeper within folders.
|
||||
|
||||

|
||||
|
||||
### Open all apps in the folder at once
|
||||
Simply drag-and-drop folder onto a workspace thumbnail to open all containing applications.
|
||||
|
||||
## Known issues
|
||||
### Workspace navigation shortcuts
|
||||
The default GNOME Shell configuration includes predefined shortcuts for workspaces oriented in both axis:
|
||||
`(Shift)+Ctrl+Alt+ Arrow Keys`
|
||||
and for horizontal only:
|
||||
`(Shift)+Super+PageUp/Down`
|
||||
|
||||
The default GNOME *Settings* application only offers options to configure keyboard shortcuts for horizontally oriented workspaces. However, the `gSettings` configuration scheme provides keys for shortcuts for vertically oriented workspaces as well. You can access and configure these shortcuts using the **dconf Editor**.
|
||||
|
||||
When V-Shell is configured to use vertically stacked workspaces, the `(Shift)+Super+PageUp/Down` shortcuts for switching workspaces stop working.
|
||||
V-Shell provides the option `Override Page Up/Down Shortcuts` to automatically switch the default `Super+PageUp/Down` and `Shift+Super+PageUp/Down` shortcuts for the current workspace orientation. If enabled, this option will move the shortcuts between following gSettings keys:
|
||||
| Horizontal orientation | Vertical orientation |
|
||||
|------------------------|----------------------|
|
||||
| `switch-to-workspace-left` | `switch-to-workspace-up`|
|
||||
| `switch-to-workspace-right` | `switch-to-workspace-down`|
|
||||
| `move-to-workspace-left` | `move-to-workspace-up`|
|
||||
| `move-to-workspace-right` | `move-to-workspace-down`|
|
||||
|
||||
Note that unlike the GNOME *Settings* application, *dconf Editor* allows you to add more than one keyboard shortcut to each action. V-Shell preserves all other shortcuts, only moves following strings between related gSetting keys:
|
||||
- `<Super>Page_Up`
|
||||
- `<Super>Page_Down`
|
||||
- `<Super><Shift>Page_Up`
|
||||
- `<Super><Shift>Page_Down`
|
||||
|
||||
The key order follows the order in which GNOME Settings stores the shortcuts. If you add the same shortcut but with a different key order, V-Shell will not recognize it, and you might end up with the same shortcut assigned to two actions.
|
||||
|
||||
|
||||
### Stuttering overview animations
|
||||
On weaker hardware, you may experience stuttering in overview animations. This usually occurs due to blur effect transitions. In this scenario, you should avoid configurations where blur transitions are needed. Here are some tips on how to use the blur effect without affecting overview animations:
|
||||
- Enable `Show Workspace Preview Background`, which removes the need for blur transitions between desktop view and overview.
|
||||
- Set the same amount of blur for *Window Picker View* and *App Grid*
|
||||
- If your configuration requires blur transitions, keep the `Smooth Blur Transitions` option disabled
|
||||
|
||||
|
||||
### Compatibility with other extensions
|
||||
V-Shell overrides parts of the GNOME Shell's UI code, and many extensions do the same, so conflicts are inevitable. V-Shell tries to mitigate the consequences of conflicts with the most popular extensions, which includes disabling its own modules. This means that some of V-Shell's settings may not function when conflicting extensions are enabled. V-Shell also provides manual control over its modules so the user can disable problematic ones if needed.
|
||||
|
||||
Please, report any incompatibility, you encounter while using V-Shell.
|
||||
|
||||
#### Incompatible extensions
|
||||
- *Search Light* - You can achieve similar behavior by switching V-Shell to the `Static Workspace` `Overview mode`
|
||||
|
||||
#### V-Shell modules automatically disabled when conflicting extensions are detected
|
||||
| Module | Extensions causing module to disable |
|
||||
|-----------------------|--------------------------------------|
|
||||
| Dash | *Dash to Dock*, *Ubuntu Dock*, *Dash to Panel*, *Dash2Dock Animated* |
|
||||
| Panel | *Dash to Panel*, *Hide Top Bar* |
|
||||
| Layout | *Dash to Panel*, *CHC-E*, |
|
||||
| WorkspaceSwitcherPopup| *WSM (Workspace Switcher Manager)* |
|
||||
|
||||
#### Extensions causing V-Shell to automatically delay its activation
|
||||
to prevent crashes upon GNOME Shell starting up:
|
||||
- *Dash to Dock*
|
||||
- *Ubuntu Dock*
|
||||
- *Dash to Panel*
|
||||
- *Dash2Dock Animated*
|
||||
|
||||
You can enable this option manually if needed, using the `Delay at Startup` option on the *Misc* tab of the *Settings* window.
|
||||
|
||||
#### Extensions whose functionality is included in V-Shell
|
||||
and should be disabled or restricted by the user:
|
||||
- Partially *Blur My Shell* - V-Shell provides a basic settings for the overview background, including brightness and blur effects. If you want to use *Blur My Shell*, consider disabling its options for the overview, including app folders, to prevent visual glitches and inconsistency during transitions between overview states.
|
||||
- *Alphabetical App Grid* - V-Shell provides much more options than alphabetical sorting
|
||||
- *Grand Theft Focus* and other extensions preventing showing notification instead of immediately focusing the window that demands attention
|
||||
- *Hot Edge* - V-Shell provides this functionality as an option of the `Hot Corner Position` setting
|
||||
- Some of the *Just Perfection* options including notifications/OSD positions, hiding main panel, animation speed, dash icon size and more
|
||||
- *Impatience* and extensions adjusting animation speed
|
||||
- *Click to close overview* - V-Shell provides the `Click Empty Space To Close` option
|
||||
|
||||
|
||||
## Changelog
|
||||
See what's changed in recent versions
|
||||
[CHANGELOG.md](CHANGELOG.md)
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
### Installation from extensions.gnome.org
|
||||
|
@ -58,20 +149,20 @@ The most recent version in the repository is the one I'm currently using and dev
|
|||
You may need to install `git`, `make`, `gettext` and `glib2.0` for successful installation.
|
||||
Navigate to the directory you want to download the source code and execute following commands in the terminal:
|
||||
|
||||
GNOME 45:
|
||||
**GNOME 45+:**
|
||||
|
||||
git clone https://github.com/G-dH/vertical-workspaces.git
|
||||
cd vertical-workspaces
|
||||
make install
|
||||
|
||||
GNOME 42 - 44:
|
||||
**GNOME 42 - 44:**
|
||||
|
||||
git clone https://github.com/G-dH/vertical-workspaces.git
|
||||
cd vertical-workspaces
|
||||
git checkout gnome-42-44
|
||||
make install
|
||||
|
||||
If you get `Can't recursively copy directory` error, take a look at issue #51.
|
||||
If you get `Can't recursively copy directory` error, take a look at issue [#51](https://github.com/G-dH/vertical-workspaces/issues/51).
|
||||
|
||||
### Enabling the extension
|
||||
After installation you need to enable the extension and access its settings.
|
||||
|
@ -80,8 +171,20 @@ After installation you need to enable the extension and access its settings.
|
|||
- Now you should see *Vertical Workspaces* extension in *Extensions* application (re-open the app if needed to load new data), where you can enable it and access its Preferences window by pressing `Settings` button.
|
||||
|
||||
## Credits
|
||||
This extension uses customized utils and dash modules of the [Vertical Overview extension](https://github.com/RensAlthuis/vertical-overview).
|
||||
V-Shell contains modified GNOME Shell source code and was originally based on parts of [Vertical Overview extension](https://github.com/RensAlthuis/vertical-overview).
|
||||
|
||||
## Buy me a coffee
|
||||
If you like my extensions and want to keep me motivated give me some useful feedback, but you can also help me with my coffee expenses:
|
||||
[buymeacoffee.com/georgdh](https://buymeacoffee.com/georgdh)
|
||||
|
||||
## Contribution
|
||||
If you want to help with V-Shell development, please provide feedback, whether it's positive, negative, a bug report, or a feature request. Even if I don't agree with you, it can help improve V-Shell.
|
||||
|
||||
|
||||
## Donations
|
||||
If you enjoy using my extensions, you can help me with my coffee expenses:
|
||||
|
||||
[](https://www.buymeacoffee.com/georgdh)
|
||||
|
||||
Any support is greatly appreciated!
|
||||
|
||||
|
||||
## License
|
||||
This program is distributed under the terms of the GNU General Public License, version 3 or later. See [LICENSE](./LICENSE) file for details.
|
||||
|
|
|
@ -10,14 +10,11 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
import Clutter from 'gi://Clutter';
|
||||
import GLib from 'gi://GLib';
|
||||
import GObject from 'gi://GObject';
|
||||
import Meta from 'gi://Meta';
|
||||
import St from 'gi://St';
|
||||
|
||||
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
||||
import * as ModalDialog from 'resource:///org/gnome/shell/ui/modalDialog.js';
|
||||
|
||||
import * as Config from 'resource:///org/gnome/shell/misc/config.js';
|
||||
|
||||
|
@ -75,8 +72,11 @@ export default class VShell extends Extension.Extension {
|
|||
Me.ESP_PREFIX = 'eq//';
|
||||
|
||||
Me.opt = new Me.Settings.Options(Me);
|
||||
opt = Me.opt;
|
||||
|
||||
Me.Util.init(Me);
|
||||
|
||||
Me.updateMessageDialog = new Me.Util.RestartMessage();
|
||||
}
|
||||
|
||||
_cleanGlobals() {
|
||||
|
@ -87,14 +87,28 @@ export default class VShell extends Extension.Extension {
|
|||
|
||||
enable() {
|
||||
this._init();
|
||||
// flag for Util.getEnabledExtensions()
|
||||
Me.extensionsLoadIncomplete = Main.layoutManager._startingUp;
|
||||
opt = Me.opt;
|
||||
|
||||
this._initModules();
|
||||
this.activateVShell();
|
||||
|
||||
Me.extensionsLoadIncomplete = false;
|
||||
// prevent conflicts during startup
|
||||
let skipStartup = Me.gSettings.get_boolean('delay-startup') ||
|
||||
Me.Util.getEnabledExtensions('ubuntu-dock').length ||
|
||||
Me.Util.getEnabledExtensions('dash-to-dock').length ||
|
||||
Me.Util.getEnabledExtensions('dash2dock').length ||
|
||||
Me.Util.getEnabledExtensions('dash-to-panel').length;
|
||||
if (skipStartup && Main.layoutManager._startingUp) {
|
||||
this._startupConId = Main.layoutManager.connect('startup-complete', () => {
|
||||
this._delayedStartup = true;
|
||||
this._activateVShell();
|
||||
// Since VShell has been activated with a delay, move it in extensionOrder
|
||||
let extensionOrder = Main.extensionManager._extensionOrder;
|
||||
const idx = extensionOrder.indexOf(this.metadata.uuid);
|
||||
extensionOrder.push(extensionOrder.splice(idx, 1)[0]);
|
||||
Main.layoutManager.disconnect(this._startupConId);
|
||||
this._startupConId = 0;
|
||||
});
|
||||
} else {
|
||||
this._activateVShell();
|
||||
}
|
||||
|
||||
console.debug(`${Me.metadata.name}: enabled`);
|
||||
}
|
||||
|
@ -102,10 +116,14 @@ export default class VShell extends Extension.Extension {
|
|||
// Reason for using "unlock-dialog" session mode:
|
||||
// Updating the "appDisplay" content every time the screen is locked/unlocked takes quite a lot of time and affects the user experience.
|
||||
disable() {
|
||||
if (this._startupConId)
|
||||
Main.layoutManager.disconnect(this._startupConId);
|
||||
this.removeVShell();
|
||||
this._disposeModules();
|
||||
|
||||
console.debug(`${Me.metadata.name}: disabled`);
|
||||
Me.updateMessageDialog.destroy();
|
||||
Me.updateMessageDialog = null;
|
||||
this._cleanGlobals();
|
||||
}
|
||||
|
||||
|
@ -152,15 +170,24 @@ export default class VShell extends Extension.Extension {
|
|||
Me.Modules = null;
|
||||
}
|
||||
|
||||
activateVShell() {
|
||||
_activateVShell() {
|
||||
this._enabled = true;
|
||||
|
||||
if (!this._delayedStartup && !Main.sessionMode.isLocked) {
|
||||
Me.updateMessageDialog.showMessage();
|
||||
this._delayedStartup = false;
|
||||
}
|
||||
|
||||
this._originalGetNeighbor = Meta.Workspace.prototype.get_neighbor;
|
||||
|
||||
this._removeTimeouts();
|
||||
this._timeouts = {};
|
||||
|
||||
this._ensureOverviewIsHidden();
|
||||
if (!Main.layoutManager._startingUp)
|
||||
this._ensureOverviewIsHidden();
|
||||
|
||||
// store dash _workId so we will be able to detect replacement when entering overview
|
||||
this._storeDashId();
|
||||
|
||||
// load VShell configuration
|
||||
this._updateSettings();
|
||||
|
@ -184,9 +211,6 @@ export default class VShell extends Extension.Extension {
|
|||
|
||||
this._updateSettingsConnection();
|
||||
|
||||
// store dash _workId so we will be able to detect replacement when entering overview
|
||||
this._storeDashId();
|
||||
|
||||
// workaround for upstream bug - overview always shows workspace 1 instead of the active one after restart
|
||||
this._setInitialWsIndex();
|
||||
|
||||
|
@ -213,8 +237,6 @@ export default class VShell extends Extension.Extension {
|
|||
// switch PageUp/PageDown workspace switcher shortcuts
|
||||
this._switchPageShortcuts();
|
||||
|
||||
// hide status message if shown
|
||||
this._showStatusMessage(false);
|
||||
this._prevDash = null;
|
||||
|
||||
// restore default animation speed
|
||||
|
@ -226,7 +248,6 @@ export default class VShell extends Extension.Extension {
|
|||
_ensureOverviewIsHidden() {
|
||||
if (Main.overview._shown) {
|
||||
Main.overview._shown = false;
|
||||
// Main.overview._animationInProgress = true;
|
||||
Main.overview._visibleTarget = false;
|
||||
Main.overview._overview.prepareToLeaveOverview();
|
||||
Main.overview._changeShownState('HIDING');
|
||||
|
@ -237,11 +258,13 @@ export default class VShell extends Extension.Extension {
|
|||
|
||||
_resetShellProperties() {
|
||||
const controls = Main.overview._overview.controls;
|
||||
// remove any position offsets from dash and ws thumbnails
|
||||
if (!Me.Util.dashNotDefault()) {
|
||||
controls.dash.translation_x = 0;
|
||||
controls.dash.translation_y = 0;
|
||||
}
|
||||
// layoutManager._dash retains reference to the default dash even when DtD is enabled
|
||||
const dash = controls.layoutManager._dash;
|
||||
// Restore default dash background style
|
||||
dash._background.set_style('');
|
||||
|
||||
dash.translation_x = 0;
|
||||
dash.translation_y = 0;
|
||||
controls._thumbnailsBox.translation_x = 0;
|
||||
controls._thumbnailsBox.translation_y = 0;
|
||||
controls._searchEntryBin.translation_y = 0;
|
||||
|
@ -255,9 +278,6 @@ export default class VShell extends Extension.Extension {
|
|||
controls._thumbnailsBox.opacity = 255;
|
||||
|
||||
controls._searchController._searchResults.opacity = 255;
|
||||
|
||||
// restore default dash background style
|
||||
controls.dash._background.set_style('');
|
||||
}
|
||||
|
||||
_removeTimeouts() {
|
||||
|
@ -297,8 +317,7 @@ export default class VShell extends Extension.Extension {
|
|||
|
||||
_updateConnections() {
|
||||
if (!this._monitorsChangedConId)
|
||||
this._monitorsChangedConId = Main.layoutManager.connect('monitors-changed', () => this._updateVShell(2000));
|
||||
|
||||
this._monitorsChangedConId = Main.layoutManager.connect('monitors-changed', () => this._adaptToSystemChange());
|
||||
|
||||
if (!this._showingOverviewConId)
|
||||
this._showingOverviewConId = Main.overview.connect('showing', this._onShowingOverview.bind(this));
|
||||
|
@ -317,7 +336,9 @@ export default class VShell extends Extension.Extension {
|
|||
}
|
||||
);
|
||||
} else if (session.currentMode === 'unlock-dialog') {
|
||||
Me.Modules.panelModule.update(true);
|
||||
Me.Modules.panelModule.update();
|
||||
Main.layoutManager.panelBox.translation_y = 0;
|
||||
Main.panel.opacity = 255;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -341,14 +362,14 @@ export default class VShell extends Extension.Extension {
|
|||
// UNINSTALLED: 99,
|
||||
// };
|
||||
// no need to restart on disable/remove
|
||||
// - if DtD was enabled before VShell, VShell will be rebased by extensionSystem
|
||||
// - if DtD was enabled after VShell, the first _showingOverview detect replacement of the dash and repair VShell
|
||||
// - if DtD was enabled before VShell, VShell will be rebased by the extensionSystem
|
||||
// - If DtD was enabled after VShell, the first _showingOverview detects the replacement of the dash and repairs VShell
|
||||
const reset = [1, 2].includes(extension.state);
|
||||
const dashReplacement = uuid.includes('dash-to-dock') || uuid.includes('ubuntu-dock') || uuid.includes('dash-to-panel');
|
||||
if (dashReplacement && reset)
|
||||
this._watchDashToDock = true;
|
||||
if (!Main.layoutManager._startingUp && reset && dashReplacement)
|
||||
this._updateVShell(1999);
|
||||
this._adaptToSystemChange(2000);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -427,50 +448,14 @@ export default class VShell extends Extension.Extension {
|
|||
|
||||
Me.Modules.layoutModule.update(reset);
|
||||
Me.Modules.dashModule.update(reset);
|
||||
// avoid enabling panel module when session is locked
|
||||
if (reset || (!reset && !Main.sessionMode.isLocked))
|
||||
Me.Modules.panelModule.update(reset);
|
||||
// the panel must be visible when screen is locked
|
||||
// at startup time, panel will be updated from the startupAnimation after allocation
|
||||
if (!reset && Main.sessionMode.isLocked && !Main.layoutManager._startingUp)
|
||||
Me.Modules.panelModule._showPanel(true);
|
||||
// PanelModule._showPanel(true);
|
||||
// hide panel so it appears directly on the final place
|
||||
/* else if (Main.layoutManager._startingUp && !Meta.is_restart())
|
||||
Main.panel.opacity = 0;*/
|
||||
Me.Modules.panelModule.update(reset);
|
||||
|
||||
Me.Modules.workspaceAnimationModule.update(reset);
|
||||
Me.Modules.workspaceSwitcherPopupModule.update(reset);
|
||||
|
||||
Me.Modules.swipeTrackerModule.update(reset);
|
||||
|
||||
Me.Modules.searchModule.update(reset);
|
||||
|
||||
// don't rebuild app grid on any screen lock
|
||||
// even if the extension includes unlock-screen session mode
|
||||
// disable/enable is called at least once even on GS44
|
||||
// when screen lock is activated for the first time
|
||||
// because every first disable of each extension rebases
|
||||
// the entire extensions stack that was enabled later
|
||||
if (Main.sessionMode.isLocked)
|
||||
this._sessionLockActive = true;
|
||||
|
||||
// This covers unnecessary enable/disable cycles during first screen lock when extensions are rebased, but is not allowed by the EGO rules
|
||||
if (!this._sessionLockActive || !Main.extensionManager._getEnabledExtensions().includes(Me.metadata.uuid)) {
|
||||
// iconGridModule will be updated from appDisplayModule
|
||||
Me.Modules.appDisplayModule.update(reset);
|
||||
}
|
||||
|
||||
if (!this._sessionLockActive && !Main.layoutManager._startingUp && opt.APP_GRID_PERFORMANCE) {
|
||||
// Avoid showing status at startup, can cause freeze
|
||||
this._showStatusMessage();
|
||||
}
|
||||
|
||||
if (!Main.sessionMode.isLocked)
|
||||
this._sessionLockActive = false;
|
||||
|
||||
// iconGridModule will be updated from appDisplayModule
|
||||
// Me.Modules.appDisplayModule.update(reset);
|
||||
Me.Modules.appDisplayModule.update(reset);
|
||||
|
||||
Me.Modules.windowAttentionHandlerModule.update(reset);
|
||||
Me.Modules.appFavoritesModule.update(reset);
|
||||
|
@ -479,32 +464,34 @@ export default class VShell extends Extension.Extension {
|
|||
Me.Modules.overlayKeyModule.update(reset);
|
||||
Me.Modules.searchControllerModule.update(reset);
|
||||
|
||||
if (Main.sessionMode.isLocked)
|
||||
this._sessionLockActive = true;
|
||||
|
||||
if (!Main.sessionMode.isLocked)
|
||||
this._sessionLockActive = false;
|
||||
|
||||
if (!reset && !Main.layoutManager._startingUp)
|
||||
Main.overview._overview.controls.setInitialTranslations();
|
||||
if (this._sessionLockActive) {
|
||||
Main.layoutManager.panelBox.translation_y = 0;
|
||||
Main.panel.opacity = 255;
|
||||
}
|
||||
}
|
||||
|
||||
_onShowingOverview() {
|
||||
if (Main.layoutManager._startingUp)
|
||||
return;
|
||||
|
||||
Main.overview._overview.controls.opacity = 255;
|
||||
|
||||
// store pointer X coordinate for OVERVIEW_MODE 1 window spread - if mouse pointer is steady, don't spread
|
||||
opt.showingPointerX = global.get_pointer()[0];
|
||||
|
||||
if (!Main.overview._overview.controls._bgManagers && (opt.SHOW_BG_IN_OVERVIEW || opt.SHOW_WS_PREVIEW_BG) && !Me.Util.getEnabledExtensions('blur-my-shell').length)
|
||||
Main.overview._overview.controls._setBackground();
|
||||
|
||||
if (this._watchDashToDock) {
|
||||
// workaround for Dash to Dock (Ubuntu Dock) breaking overview allocations after enabled and changed position
|
||||
// DtD replaces dock and its _workId on every position change
|
||||
// Workaround for Dash to Dock (Ubuntu Dock) breaking overview allocations after enabling and changing its position
|
||||
// DtD replaces its _workId on every position change
|
||||
const dash = Main.overview.dash;
|
||||
if (this._prevDash !== dash._workId)
|
||||
this._updateVShell(0);
|
||||
this._adaptToSystemChange(0);
|
||||
}
|
||||
}
|
||||
|
||||
_updateVShell(timeout = 200) {
|
||||
_adaptToSystemChange(timeout = 200, full = false) {
|
||||
if (!this._enabled || Main.layoutManager._startingUp)
|
||||
return;
|
||||
|
||||
|
@ -518,18 +505,17 @@ export default class VShell extends Extension.Extension {
|
|||
return GLib.SOURCE_REMOVE;
|
||||
|
||||
const dash = Main.overview.dash;
|
||||
if (timeout < 2000) { // timeout < 2000 for partial update
|
||||
if (!full) {
|
||||
console.warn(`[${Me.metadata.name}] Warning: Updating overrides ...`);
|
||||
this._prevDash = dash._workId;
|
||||
console.warn(`[${Me.metadata.name}]: Dash has been replaced, updating extension ...`);
|
||||
Me._resetInProgress = true;
|
||||
// update only necessary modules if dash has been replaced
|
||||
// Only update modules that might be affected by the dock extension
|
||||
this._repairOverrides();
|
||||
Me._resetInProgress = false;
|
||||
} else {
|
||||
console.warn(`[${Me.metadata.name}]: Updating extension ...`);
|
||||
// for case the monitor configuration has been changed, update all
|
||||
console.warn(`[${Me.metadata.name}] Warning: Rebuilding V-Shell ...`);
|
||||
Me._resetInProgress = true;
|
||||
this.activateVShell();
|
||||
this._activateVShell();
|
||||
Me._resetInProgress = false;
|
||||
}
|
||||
this._timeouts.reset = 0;
|
||||
|
@ -538,7 +524,7 @@ export default class VShell extends Extension.Extension {
|
|||
);
|
||||
}
|
||||
|
||||
// the key modules that can be affected by the supported incompatible extensions
|
||||
// Modules possibly affected by supported but incompatible extensions
|
||||
_repairOverrides() {
|
||||
Me.Modules.overviewModule.update();
|
||||
Me.Modules.overviewControlsModule.update();
|
||||
|
@ -548,6 +534,7 @@ export default class VShell extends Extension.Extension {
|
|||
Me.Modules.panelModule.update();
|
||||
Me.Modules.dashModule.update();
|
||||
this._updateSettings();
|
||||
Main.overview._overview.controls._setBackground();
|
||||
}
|
||||
|
||||
_updateSettings(settings, key) {
|
||||
|
@ -557,16 +544,17 @@ export default class VShell extends Extension.Extension {
|
|||
// avoid overload while loading profile - update only once
|
||||
// delayed gsettings writes are processed alphabetically
|
||||
if (key === 'aaa-loading-profile') {
|
||||
this._showStatusMessage();
|
||||
if (this._timeouts.loadingProfile)
|
||||
GLib.source_remove(this._timeouts.loadingProfile);
|
||||
this._timeouts.loadingProfile = GLib.timeout_add(
|
||||
GLib.PRIORITY_DEFAULT,
|
||||
100, () => {
|
||||
this.activateVShell();
|
||||
this._activateVShell();
|
||||
this._timeouts.loadingProfile = 0;
|
||||
return GLib.SOURCE_REMOVE;
|
||||
});
|
||||
}
|
||||
);
|
||||
Me.updateMessageDialog.showMessage();
|
||||
}
|
||||
if (this._timeouts.loadingProfile)
|
||||
return;
|
||||
|
@ -590,16 +578,6 @@ export default class VShell extends Extension.Extension {
|
|||
|
||||
opt.DASH_VISIBLE = opt.DASH_VISIBLE && !Me.Util.getEnabledExtensions('dash-to-panel@jderose9.github.com').length;
|
||||
|
||||
const monitorWidth = global.display.get_monitor_geometry(global.display.get_primary_monitor()).width;
|
||||
if (monitorWidth < 1600) {
|
||||
opt.APP_GRID_ICON_SIZE_DEFAULT = opt.APP_GRID_ACTIVE_PREVIEW && !opt.APP_GRID_USAGE ? 128 : 64;
|
||||
opt.APP_GRID_FOLDER_ICON_SIZE_DEFAULT = 64;
|
||||
}
|
||||
|
||||
/* if (!Me.Util.dashIsDashToDock()) { // DtD has its own opacity control
|
||||
Me.Modules.dashModule.updateStyle(dash);
|
||||
}*/
|
||||
|
||||
// adjust search entry style for OM2
|
||||
if (opt.OVERVIEW_MODE2)
|
||||
Main.overview.searchEntry.add_style_class_name('search-entry-om2');
|
||||
|
@ -615,12 +593,6 @@ export default class VShell extends Extension.Extension {
|
|||
Main.overview.searchEntry.opacity = 255;
|
||||
St.Settings.get().slow_down_factor = opt.ANIMATION_TIME_FACTOR;
|
||||
|
||||
opt.START_Y_OFFSET = (opt.get('panelModule') && opt.PANEL_OVERVIEW_ONLY && opt.PANEL_POSITION_TOP) ||
|
||||
// better to add unnecessary space than to have a panel overlapping other objects
|
||||
Me.Util.getEnabledExtensions('hidetopbar').length
|
||||
? Main.panel.height
|
||||
: 0;
|
||||
|
||||
// Options for workspace switcher, apply custom function only if needed
|
||||
if (opt.WS_WRAPAROUND || opt.WS_IGNORE_LAST)
|
||||
Meta.Workspace.prototype.get_neighbor = this._getNeighbor;
|
||||
|
@ -641,15 +613,12 @@ export default class VShell extends Extension.Extension {
|
|||
if (key?.endsWith('-module')) {
|
||||
for (let module of this._getModuleList()) {
|
||||
if (opt.options[module] && key === opt.options[module][1]) {
|
||||
if (key === 'app-display-module')
|
||||
this._showStatusMessage();
|
||||
Me.Modules[module].update();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Main.overview._overview.controls._setBackground();
|
||||
this._switchPageShortcuts();
|
||||
|
||||
if (key?.includes('panel'))
|
||||
|
@ -698,6 +667,8 @@ export default class VShell extends Extension.Extension {
|
|||
case 'new-window-monitor-fix':
|
||||
this._updateNewWindowConnection();
|
||||
break;
|
||||
case 'click-empty-close':
|
||||
Me.Modules.overviewControlsModule.update();
|
||||
}
|
||||
|
||||
if (key?.includes('app-grid') ||
|
||||
|
@ -705,10 +676,8 @@ export default class VShell extends Extension.Extension {
|
|||
key?.includes('dot-style') ||
|
||||
key === 'show-search-entry' ||
|
||||
key === 'ws-thumbnail-scale' ||
|
||||
key === 'ws-thumbnail-scale-appgrid') {
|
||||
this._showStatusMessage();
|
||||
key === 'ws-thumbnail-scale-appgrid')
|
||||
Me.Modules.appDisplayModule.update();
|
||||
}
|
||||
}
|
||||
|
||||
_switchPageShortcuts() {
|
||||
|
@ -794,50 +763,6 @@ export default class VShell extends Extension.Extension {
|
|||
settings.set_strv(keyMoveDown, moveDown);
|
||||
}
|
||||
|
||||
// Status dialog that appears during updating V-Shell configuration and blocks inputs
|
||||
_showStatusMessage(show = true) {
|
||||
if ((show && Me._resetInProgress) || Main.layoutManager._startingUp || !Main.overview._overview.controls._appDisplay._sortOrderedItemsAlphabetically)
|
||||
return;
|
||||
|
||||
if (Me._vShellMessageTimeoutId) {
|
||||
GLib.source_remove(Me._vShellMessageTimeoutId);
|
||||
Me._vShellMessageTimeoutId = 0;
|
||||
}
|
||||
|
||||
if (Me._vShellStatusMessage && !show) {
|
||||
Me._vShellStatusMessage.close();
|
||||
Me._vShellStatusMessage.destroy();
|
||||
Me._vShellStatusMessage = null;
|
||||
}
|
||||
|
||||
if (!show)
|
||||
return;
|
||||
|
||||
if (!Me._vShellStatusMessage) {
|
||||
const sm = new /* Main.*/RestartMessage(_('Updating V-Shell...'));
|
||||
sm.set_style('background-color: rgba(0,0,0,0.3);');
|
||||
sm.open();
|
||||
Me._vShellStatusMessage = sm;
|
||||
}
|
||||
|
||||
// just for case the message wasn't removed from appDisplay after App Grid realization
|
||||
Me._vShellMessageTimeoutId = GLib.timeout_add_seconds(
|
||||
GLib.PRIORITY_DEFAULT,
|
||||
5,
|
||||
() => {
|
||||
if (Me._vShellStatusMessage) {
|
||||
Me._vShellStatusMessage.close();
|
||||
Me._vShellStatusMessage.destroy();
|
||||
Me._vShellStatusMessage = null;
|
||||
Me._resetInProgress = false;
|
||||
}
|
||||
|
||||
Me._vShellMessageTimeoutId = 0;
|
||||
return GLib.SOURCE_REMOVE;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
_getNeighbor(direction) {
|
||||
// workspace matrix is supported
|
||||
const activeIndex = this.index();
|
||||
|
@ -885,24 +810,3 @@ export default class VShell extends Extension.Extension {
|
|||
return global.workspace_manager.get_workspace_by_index(neighborExists || wraparound ? index : activeIndex);
|
||||
}
|
||||
}
|
||||
|
||||
const RestartMessage = GObject.registerClass(
|
||||
class RestartMessage extends ModalDialog.ModalDialog {
|
||||
_init(message) {
|
||||
super._init({
|
||||
shellReactive: true,
|
||||
styleClass: 'restart-message headline',
|
||||
shouldFadeIn: false,
|
||||
destroyOnClose: true,
|
||||
});
|
||||
|
||||
let label = new St.Label({
|
||||
text: message,
|
||||
x_align: Clutter.ActorAlign.CENTER,
|
||||
y_align: Clutter.ActorAlign.CENTER,
|
||||
});
|
||||
|
||||
this.contentLayout.add_child(label);
|
||||
this.buttonLayout.hide();
|
||||
}
|
||||
});
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -64,6 +64,7 @@ export const DashModule = class {
|
|||
|
||||
this.moduleEnabled = opt.get('dashModule');
|
||||
const conflict = !!(Me.Util.getEnabledExtensions('dash-to-dock').length ||
|
||||
Me.Util.getEnabledExtensions('dash2dock').length ||
|
||||
Me.Util.getEnabledExtensions('ubuntu-dock').length ||
|
||||
Me.Util.getEnabledExtensions('dash-to-panel').length);
|
||||
|
||||
|
@ -139,6 +140,7 @@ export const DashModule = class {
|
|||
? 'vertical-46'
|
||||
: 'vertical'
|
||||
);
|
||||
|
||||
this._setOrientation(Clutter.Orientation.VERTICAL);
|
||||
} else {
|
||||
this._setOrientation(Clutter.Orientation.HORIZONTAL);
|
||||
|
@ -212,6 +214,7 @@ export const DashModule = class {
|
|||
}
|
||||
|
||||
_resetStyle(dash) {
|
||||
dash.remove_style_class_name('dash-46');
|
||||
dash.remove_style_class_name('vertical');
|
||||
dash.remove_style_class_name('vertical-46');
|
||||
dash.remove_style_class_name('vertical-gs3-left');
|
||||
|
@ -662,7 +665,14 @@ const DashCommon = {
|
|||
const [, , buttonWidth, buttonHeight] = firstButton.get_preferred_size();
|
||||
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
|
||||
|
||||
let availWidth, availHeight, maxIconSize;
|
||||
let maxIconSize = opt.MAX_ICON_SIZE;
|
||||
if (!maxIconSize) {
|
||||
maxIconSize = Me.Util.monitorHasLowResolution()
|
||||
? 48
|
||||
: 64;
|
||||
}
|
||||
|
||||
let availWidth, availHeight;
|
||||
if (dashHorizontal) {
|
||||
availWidth = maxContent.x2 - maxContent.x1;
|
||||
// Subtract icon padding and box spacing from the available width
|
||||
|
@ -676,7 +686,7 @@ const DashCommon = {
|
|||
availHeight -= themeNode.get_vertical_padding();
|
||||
availHeight -= buttonHeight - iconHeight;
|
||||
|
||||
maxIconSize = Math.min(availWidth / iconChildren.length, availHeight, opt.MAX_ICON_SIZE * scaleFactor);
|
||||
maxIconSize = Math.min(availWidth / iconChildren.length, availHeight, maxIconSize * scaleFactor);
|
||||
} else {
|
||||
availWidth = this._maxWidth;
|
||||
availWidth -= this._background.get_theme_node().get_horizontal_padding();
|
||||
|
@ -688,7 +698,7 @@ const DashCommon = {
|
|||
(iconChildren.length - 1) * spacing +
|
||||
2 * this._background.get_theme_node().get_vertical_padding();
|
||||
|
||||
maxIconSize = Math.min(availWidth, availHeight / iconChildren.length, opt.MAX_ICON_SIZE * scaleFactor);
|
||||
maxIconSize = Math.min(availWidth, availHeight / iconChildren.length, maxIconSize * scaleFactor);
|
||||
}
|
||||
|
||||
let iconSizes = BaseIconSizes.map(s => s * scaleFactor);
|
||||
|
@ -838,54 +848,17 @@ const DashCommon = {
|
|||
},
|
||||
};
|
||||
|
||||
const DashIconCommon = {
|
||||
const AppIconCommon = {
|
||||
after__init() {
|
||||
if (opt.DASH_ICON_SCROLL && !Me.Util.dashNotDefault()) {
|
||||
this._scrollConId = this.connect('scroll-event', DashExtensions.onScrollEvent.bind(this));
|
||||
this._leaveConId = this.connect('leave-event', DashExtensions.onLeaveEvent.bind(this));
|
||||
}
|
||||
|
||||
if (this._updateRunningDotStyle)
|
||||
this._updateRunningDotStyle();
|
||||
},
|
||||
|
||||
/* popupMenu() {
|
||||
const side = opt.DASH_VERTICAL ? St.Side.LEFT : St.Side.BOTTOM;
|
||||
AppIconCommon.popupMenu.bind(this)(side);
|
||||
},*/
|
||||
|
||||
_updateRunningStyle() {
|
||||
const currentWs = global.workspace_manager.get_active_workspace();
|
||||
const show = opt.DASH_ISOLATE_WS
|
||||
? this.app.get_windows().filter(w => w.get_workspace() === currentWs).length
|
||||
: this.app.state !== Shell.AppState.STOPPED;
|
||||
|
||||
if (show)
|
||||
this._dot.show();
|
||||
else
|
||||
this._dot.hide();
|
||||
},
|
||||
|
||||
/* after__init() {
|
||||
if (this._updateRunningDotStyle)
|
||||
this._updateRunningDotStyle();
|
||||
},*/
|
||||
|
||||
_updateRunningDotStyle() {
|
||||
if (opt.RUNNING_DOT_STYLE)
|
||||
this._dot.add_style_class_name('app-well-app-running-dot-custom');
|
||||
this._dot.add_style_class_name('app-grid-running-dot-custom');
|
||||
else
|
||||
this._dot.remove_style_class_name('app-well-app-running-dot-custom');
|
||||
|
||||
if (!this.label && shellVersion46) {
|
||||
if (opt.DASH_VERTICAL) {
|
||||
this._dot.translation_y = 0;
|
||||
this._dot.translation_x = 0; // opt.DASH_LEFT ? -4 : 4;
|
||||
} else {
|
||||
this._dot.translation_y = 8;
|
||||
this._dot.translation_x = 0;
|
||||
}
|
||||
}
|
||||
this._dot.remove_style_class_name('app-grid-running-dot-custom');
|
||||
},
|
||||
|
||||
activate(button) {
|
||||
|
@ -957,9 +930,6 @@ const DashIconCommon = {
|
|||
},
|
||||
|
||||
popupMenu(side = St.Side.LEFT) {
|
||||
side = opt.DASH_VERTICAL ? St.Side.LEFT : St.Side.BOTTOM;
|
||||
// AppIconCommon.popupMenu.bind(this)(side);
|
||||
|
||||
this.setForcedHighlight(true);
|
||||
this._removeMenuTimeout();
|
||||
this.fake_release();
|
||||
|
@ -1027,7 +997,6 @@ const DashIconCommon = {
|
|||
}]);
|
||||
}
|
||||
|
||||
|
||||
popupItems.push([_('Move App to Current Workspace ( Shift + Click )'), this._moveAppToCurrentWorkspace]);
|
||||
// WTMB (Windows Thumbnails) extension required
|
||||
if (global.windowThumbnails) {
|
||||
|
@ -1081,6 +1050,48 @@ const DashIconCommon = {
|
|||
},
|
||||
};
|
||||
|
||||
const DashIconCommon = {
|
||||
after__init() {
|
||||
if (opt.DASH_ICON_SCROLL && !Me.Util.dashNotDefault()) {
|
||||
this._scrollConId = this.connect('scroll-event', DashExtensions.onScrollEvent.bind(this));
|
||||
this._leaveConId = this.connect('leave-event', DashExtensions.onLeaveEvent.bind(this));
|
||||
}
|
||||
},
|
||||
|
||||
popupMenu() {
|
||||
const side = opt.DASH_VERTICAL ? St.Side.LEFT : St.Side.BOTTOM;
|
||||
AppIconCommon.popupMenu.bind(this)(side);
|
||||
},
|
||||
|
||||
_updateRunningDotStyle() {
|
||||
if (opt.RUNNING_DOT_STYLE)
|
||||
this._dot.add_style_class_name('app-grid-running-dot-custom');
|
||||
else
|
||||
this._dot.remove_style_class_name('app-grid-running-dot-custom');
|
||||
|
||||
this._dot.translation_x = 0;
|
||||
// _updateDotStyle() has been added in GS 46.2 to apply translation_y value from the CSS on style change
|
||||
if (shellVersion46 && !this._updateDotStyle && !opt.DASH_VERTICAL)
|
||||
this._dot.translation_y = 8;
|
||||
|
||||
// GS 46.0 (Ubuntu) only
|
||||
if (opt.DASH_VERTICAL)
|
||||
this._dot.translationY = 0;
|
||||
},
|
||||
|
||||
_updateRunningStyle() {
|
||||
const currentWs = global.workspace_manager.get_active_workspace();
|
||||
const show = opt.DASH_ISOLATE_WS
|
||||
? this.app.get_windows().filter(w => w.get_workspace() === currentWs).length
|
||||
: this.app.state !== Shell.AppState.STOPPED;
|
||||
|
||||
if (show)
|
||||
this._dot.show();
|
||||
else
|
||||
this._dot.hide();
|
||||
},
|
||||
};
|
||||
|
||||
const DashExtensions = {
|
||||
onScrollEvent(source, event) {
|
||||
if ((this.app && !opt.DASH_ICON_SCROLL) || (this._isSearchWindowsIcon && !opt.SEARCH_WINDOWS_ICON_SCROLL)) {
|
||||
|
@ -1255,20 +1266,6 @@ const DashExtensions = {
|
|||
},
|
||||
};
|
||||
|
||||
const AppIconCommon = {
|
||||
after__init() {
|
||||
if (this._updateRunningDotStyle)
|
||||
this._updateRunningDotStyle();
|
||||
},
|
||||
|
||||
_updateRunningDotStyle() {
|
||||
if (opt.RUNNING_DOT_STYLE)
|
||||
this._dot.add_style_class_name('app-well-app-running-dot-custom');
|
||||
else
|
||||
this._dot.remove_style_class_name('app-well-app-running-dot-custom');
|
||||
},
|
||||
};
|
||||
|
||||
const AppMenuCommon = {
|
||||
_updateWindowsSection() {
|
||||
if (global.compositor) {
|
||||
|
|
|
@ -11,14 +11,16 @@
|
|||
'use strict';
|
||||
|
||||
import St from 'gi://St';
|
||||
import GLib from 'gi://GLib';
|
||||
|
||||
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
||||
import * as IconGrid from 'resource:///org/gnome/shell/ui/iconGrid.js';
|
||||
|
||||
let Me;
|
||||
let opt;
|
||||
|
||||
// added sizes for better scaling
|
||||
const IconSize = {
|
||||
export const IconSize = {
|
||||
LARGEST: 256,
|
||||
224: 224,
|
||||
208: 208,
|
||||
|
@ -34,8 +36,6 @@ const IconSize = {
|
|||
TINY: 48,
|
||||
};
|
||||
|
||||
const PAGE_WIDTH_CORRECTION = 100;
|
||||
|
||||
export const IconGridModule = class {
|
||||
constructor(me) {
|
||||
Me = me;
|
||||
|
@ -90,39 +90,52 @@ const IconGridCommon = {
|
|||
return layoutManager.getItemsAtPage(page);
|
||||
},
|
||||
|
||||
_shouldUpdateGrid(width, height) {
|
||||
if (this.layoutManager._isFolder)
|
||||
return false;
|
||||
else if (this._currentMode === -1)
|
||||
return true;
|
||||
|
||||
// Update if page size changed
|
||||
// Page dimensions may change within a small range
|
||||
const range = 5;
|
||||
return (Math.abs(width - (this._gridForWidth ?? 0)) > range) ||
|
||||
(Math.abs(height - (this._gridForHeight ?? 0)) > range);
|
||||
},
|
||||
|
||||
_findBestModeForSize(width, height) {
|
||||
// this function is for main grid only, folder grid calculation is in appDisplay.AppFolderDialog class
|
||||
if (this._currentMode > -1 || this.layoutManager._isFolder)
|
||||
if (!this._shouldUpdateGrid(width, height))
|
||||
return;
|
||||
|
||||
this._gridForWidth = width;
|
||||
this._gridForHeight = height;
|
||||
|
||||
this._updateDefaultIconSize();
|
||||
const { pagePadding } = this.layout_manager;
|
||||
const { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
|
||||
const iconPadding = 51 * scaleFactor;
|
||||
// provided width is usually about 100px wider in horizontal orientation with prev/next page indicators
|
||||
const pageIndicatorCompensation = opt.ORIENTATION ? 0 : PAGE_WIDTH_CORRECTION;
|
||||
const itemPadding = 55;
|
||||
|
||||
width -= pagePadding.left + pagePadding.right + pageIndicatorCompensation;
|
||||
width *= opt.APP_GRID_PAGE_WIDTH_SCALE;
|
||||
// pagePadding is already affected by the scaleFactor
|
||||
width -= pagePadding.left + pagePadding.right;
|
||||
height -= pagePadding.top + pagePadding.bottom;
|
||||
|
||||
// store grid max dimensions for icon size algorithm
|
||||
// Sync with _findBestIconSize()
|
||||
this.layoutManager._gridSizeChanged = true;
|
||||
this.layoutManager._gridWidth = width;
|
||||
this.layoutManager._gridHeight = height;
|
||||
|
||||
width -= 80; // compensation for default padding
|
||||
height -= 80;
|
||||
// All widgets are affected by the scaleFactor so we need to apply it also on the page size
|
||||
width /= scaleFactor;
|
||||
height /= scaleFactor;
|
||||
|
||||
const spacing = opt.APP_GRID_SPACING;
|
||||
// set the icon size as fixed to avoid changes in size later
|
||||
const iconSize = opt.APP_GRID_ICON_SIZE > 0 ? opt.APP_GRID_ICON_SIZE : opt.APP_GRID_ICON_SIZE_DEFAULT;
|
||||
// this.layout_manager.fixedIconSize = iconSize;
|
||||
const itemSize = iconSize * scaleFactor + iconPadding;
|
||||
// if this._gridModes.length === 1, custom grid should be used
|
||||
// if (iconSize > 0 && this._gridModes.length > 1) {
|
||||
const itemSize = iconSize + itemPadding;
|
||||
let columns = opt.APP_GRID_COLUMNS;
|
||||
let rows = opt.APP_GRID_ROWS;
|
||||
// 0 means adaptive size
|
||||
let unusedSpaceH = -1;
|
||||
let unusedSpaceV = -1;
|
||||
if (!columns) {
|
||||
// calculate #columns + 1 without spacing
|
||||
columns = Math.floor(width / itemSize) + 1;
|
||||
|
@ -133,6 +146,7 @@ const IconGridCommon = {
|
|||
unusedSpaceH = width - columns * itemSize - (columns - 1) * spacing;
|
||||
}
|
||||
}
|
||||
let unusedSpaceV = -1;
|
||||
if (!rows) {
|
||||
rows = Math.floor(height / itemSize) + 1;
|
||||
while (unusedSpaceV < 0) {
|
||||
|
@ -142,9 +156,45 @@ const IconGridCommon = {
|
|||
}
|
||||
|
||||
this._gridModes = [{ columns, rows }];
|
||||
// }
|
||||
|
||||
this._currentMode = -1;
|
||||
this._setGridMode(0);
|
||||
this.layoutManager.updateIconSize();
|
||||
// Call _redisplay() from timeout to avoid allocation errors
|
||||
GLib.idle_add(GLib.PRIORITY_LOW, () =>
|
||||
Main.overview._overview.controls.appDisplay._redisplay()
|
||||
);
|
||||
},
|
||||
|
||||
_updateDefaultIconSize() {
|
||||
// Reduce default icon size for low resolution screens and high screen scales
|
||||
if (Me.Util.monitorHasLowResolution()) {
|
||||
opt.APP_GRID_ICON_SIZE_DEFAULT = opt.APP_GRID_ACTIVE_PREVIEW && !opt.APP_GRID_USAGE ? 128 : 64;
|
||||
opt.APP_GRID_FOLDER_ICON_SIZE_DEFAULT = 64;
|
||||
} else {
|
||||
opt.APP_GRID_ICON_SIZE_DEFAULT = opt.APP_GRID_ACTIVE_PREVIEW && !opt.APP_GRID_USAGE ? 192 : 96;
|
||||
}
|
||||
},
|
||||
|
||||
// Workaround for the upstream bug
|
||||
// https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5753
|
||||
// https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5240
|
||||
// https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6892
|
||||
// The appGridLayout._currentPage is not updated when the page is changed in the grid
|
||||
// For example, when user navigates app icons using a keyboard
|
||||
// Related issues open on GNOME's gitlab:
|
||||
after_goToPage() {
|
||||
if (this._delegate._appGridLayout._currentPage !== this._currentPage)
|
||||
this._delegate._appGridLayout.goToPage(this._currentPage);
|
||||
},
|
||||
|
||||
// Workaround for the upstream bug
|
||||
// https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7700
|
||||
// Return INVALID target if x or y is out of the grid view to prevent pages[page] undefined error (horizontal orientation only)
|
||||
getDropTarget(x, y) {
|
||||
if (x < 0 || y < 0)
|
||||
return [0, 0, 0]; // [0, 0, DragLocation.INVALID]
|
||||
const layoutManager = this.layout_manager;
|
||||
return layoutManager.getDropTarget(x, y, this._currentPage);
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -153,45 +203,45 @@ const IconGridLayoutCommon = {
|
|||
if (this.fixedIconSize !== -1)
|
||||
return this.fixedIconSize;
|
||||
|
||||
if (!this._isFolder && !this._gridSizeChanged)
|
||||
return this._iconSize;
|
||||
this._gridSizeChanged = false;
|
||||
|
||||
|
||||
const { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
|
||||
const nColumns = this.columnsPerPage;
|
||||
const nRows = this.rowsPerPage;
|
||||
|
||||
// if grid is not defined return default icon size
|
||||
// If grid is not defined, return default icon size
|
||||
if (nColumns < 1 && nRows < 1) {
|
||||
let iconSize;
|
||||
if (this._isFolder)
|
||||
iconSize = opt.APP_GRID_FOLDER_ICON_SIZE_DEFAULT;
|
||||
else
|
||||
iconSize = opt.APP_GRID_ICON_SIZE_DEFAULT;
|
||||
|
||||
return iconSize;
|
||||
return this._isFolder
|
||||
? opt.APP_GRID_FOLDER_ICON_SIZE_DEFAULT
|
||||
: opt.APP_GRID_ICON_SIZE_DEFAULT;
|
||||
}
|
||||
|
||||
const columnSpacingPerPage = /* opt.APP_GRID_SPACING*/ 1 * (nColumns - 1);
|
||||
const rowSpacingPerPage = /* opt.APP_GRID_SPACING*/ 1 * (nRows - 1);
|
||||
const iconPadding = 55 * scaleFactor;
|
||||
const spacing = this._isFolder
|
||||
? opt.APP_GRID_FOLDER_SPACING
|
||||
: opt.APP_GRID_SPACING;
|
||||
|
||||
const paddingH = this._isFolder ? this.pagePadding.left + this.pagePadding.right : 0;
|
||||
const paddingV = this._isFolder ? this.pagePadding.top + this.pagePadding.bottom : 0;
|
||||
const columnSpacingPerPage = spacing * (nColumns - 1);
|
||||
const rowSpacingPerPage = spacing * (nRows - 1);
|
||||
const itemPadding = 55;
|
||||
|
||||
const width = (this._gridWidth ? this._gridWidth : this._pageWidth) / scaleFactor;
|
||||
let height = (this._gridHeight ? this._gridHeight : this._pageHeight) / scaleFactor;
|
||||
|
||||
const width = this._gridWidth ? this._gridWidth : this._pageWidth;
|
||||
const height = this._gridHeight ? this._gridHeight : this._pageHeight;
|
||||
if (!width || !height)
|
||||
return opt.APP_GRID_ICON_SIZE_DEFAULT;
|
||||
|
||||
const [firstItem] = this._container;
|
||||
|
||||
/* if (opt.APP_GRID_ADAPTIVE && !this._isFolder)
|
||||
return opt.APP_GRID_ICON_SIZE_DEFAULT;*/
|
||||
|
||||
let iconSizes = Object.values(IconSize).sort((a, b) => b - a);
|
||||
// limit max icon size for folders and fully adaptive folder grids, the whole range is for the main grid with active folders
|
||||
if (this._isFolder && opt.APP_GRID_FOLDER_ADAPTIVE && opt.APP_GRID_FOLDER_ICON_SIZE < 0)
|
||||
// Limit max icon size for folders and fully adaptive folder grids, the whole range is for the main grid with active folders
|
||||
if (this._isFolder && opt.APP_GRID_FOLDER_ICON_SIZE < 0)
|
||||
iconSizes = iconSizes.slice(iconSizes.indexOf(opt.APP_GRID_FOLDER_ICON_SIZE_DEFAULT), -1);
|
||||
else if (this._isFolder)
|
||||
iconSizes = iconSizes.slice(iconSizes.indexOf(IconSize.LARGE), -1);
|
||||
else if (opt.APP_GRID_ADAPTIVE && opt.APP_GRID_ICON_SIZE < 0)
|
||||
else if (opt.APP_GRID_ICON_SIZE < 0)
|
||||
iconSizes = iconSizes.slice(iconSizes.indexOf(opt.APP_GRID_ICON_SIZE_DEFAULT), -1);
|
||||
|
||||
let sizeInvalid = false;
|
||||
|
@ -202,7 +252,7 @@ const IconGridLayoutCommon = {
|
|||
firstItem.icon.setIconSize(size);
|
||||
const [firstItemWidth] = firstItem.get_preferred_size();
|
||||
|
||||
const itemSize = firstItemWidth;
|
||||
const itemSize = firstItemWidth / scaleFactor;
|
||||
if (itemSize < size)
|
||||
sizeInvalid = true;
|
||||
|
||||
|
@ -211,19 +261,16 @@ const IconGridLayoutCommon = {
|
|||
}
|
||||
|
||||
if (!firstItem || sizeInvalid) {
|
||||
usedWidth = (size + iconPadding) * nColumns;
|
||||
usedHeight = (size + iconPadding) * nRows;
|
||||
usedWidth = (size + itemPadding) * nColumns;
|
||||
usedHeight = (size + itemPadding) * nRows;
|
||||
}
|
||||
const emptyHSpace =
|
||||
width - usedWidth - columnSpacingPerPage - paddingH;
|
||||
// this.pagePadding.left - this.pagePadding.right;
|
||||
width - usedWidth - columnSpacingPerPage;
|
||||
const emptyVSpace =
|
||||
height - usedHeight - rowSpacingPerPage - paddingV;
|
||||
// this.pagePadding.top - this.pagePadding.bottom;
|
||||
height - usedHeight - rowSpacingPerPage;
|
||||
|
||||
if (emptyHSpace >= 0 && emptyVSpace >= 0) {
|
||||
if (emptyHSpace >= 0 && emptyVSpace >= 0)
|
||||
return size;
|
||||
}
|
||||
}
|
||||
|
||||
return IconSize.TINY;
|
||||
|
@ -266,7 +313,9 @@ const IconGridLayoutCommon = {
|
|||
page = this._findBestPageToAppend(page);
|
||||
|
||||
this._shouldEaseItems = true;
|
||||
this._container.add_child(item);
|
||||
|
||||
if (!this._container.get_children().includes(item))
|
||||
this._container.add_child(item);
|
||||
this._addItemToPage(item, page, index);
|
||||
},
|
||||
|
||||
|
@ -331,6 +380,28 @@ const IconGridLayoutCommon = {
|
|||
this._relocateSurplusItems(pageIndex);
|
||||
},
|
||||
|
||||
_relocateSurplusItems(pageIndex) {
|
||||
// Avoid recursion during relocations in _redisplay()
|
||||
if (this._skipRelocateSurplusItems)
|
||||
return;
|
||||
|
||||
const visiblePageItems = this._pages[pageIndex].visibleChildren;
|
||||
const itemsPerPage = this.columnsPerPage * this.rowsPerPage;
|
||||
|
||||
// No overflow
|
||||
if (visiblePageItems.length <= itemsPerPage)
|
||||
return;
|
||||
|
||||
const nExtraItems = visiblePageItems.length - itemsPerPage;
|
||||
for (let i = 0; i < nExtraItems; i++) {
|
||||
const overflowIndex = visiblePageItems.length - i - 1;
|
||||
const overflowItem = visiblePageItems[overflowIndex];
|
||||
|
||||
this._removeItemData(overflowItem);
|
||||
this._addItemToPage(overflowItem, pageIndex + 1, 0);
|
||||
}
|
||||
},
|
||||
|
||||
_findBestPageToAppend(startPage) {
|
||||
const itemsPerPage = this.columnsPerPage * this.rowsPerPage;
|
||||
|
||||
|
@ -343,4 +414,16 @@ const IconGridLayoutCommon = {
|
|||
|
||||
return this._pages.length;
|
||||
},
|
||||
|
||||
updateIconSize() {
|
||||
const iconSize = this._findBestIconSize();
|
||||
if (this._iconSize !== iconSize) {
|
||||
this._iconSize = iconSize;
|
||||
|
||||
for (const child of this._container)
|
||||
child.icon.setIconSize(iconSize);
|
||||
|
||||
this.notify('icon-size');
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
@ -300,10 +300,10 @@ export const ItemFactory = class ItemFactory {
|
|||
|
||||
function setName() {
|
||||
const ProfileNames = [
|
||||
_('GNOME 3'),
|
||||
_('GNOME 40+ - Bottom Hot Edge'),
|
||||
_('Hot Corner Centric - Top Left Hot Corner'),
|
||||
_('Dock Overview - Bottom Hot Edge'),
|
||||
_('GNOME 3 Layout (Vertical WS)'),
|
||||
_('GNOME 4x Layout, Bottom Hot Edge (Horizontal WS)'),
|
||||
_('Top Left Hot Corner Centric (Vertical WS)'),
|
||||
_('Dock-Like Overview, Bottom Hot Edge (Horizontal WS)'),
|
||||
];
|
||||
|
||||
let name = opt.get(`profileName${profileIndex}`, true);
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -47,7 +47,9 @@ export const PanelModule = class {
|
|||
if (conflict && !reset)
|
||||
console.warn(`[${Me.metadata.name}] Warning: "Panel" module disabled due to potential conflict with another extension`);
|
||||
|
||||
reset = reset || !this.moduleEnabled || conflict || Main.sessionMode.isLocked;
|
||||
reset = reset || !this.moduleEnabled || conflict;
|
||||
|
||||
this.moduleEnabled = !reset;
|
||||
|
||||
// don't touch original code if module disabled
|
||||
if (reset && !this._firstActivation) {
|
||||
|
@ -69,13 +71,13 @@ export const PanelModule = class {
|
|||
this._setPanelPosition();
|
||||
this._updateStyleChangedConnection();
|
||||
|
||||
if (opt.PANEL_MODE === 0) {
|
||||
if (!opt.PANEL_MODE) {
|
||||
this._updateOverviewConnection(true);
|
||||
this._reparentPanel(false);
|
||||
panelBox.translation_y = 0;
|
||||
Main.panel.opacity = 255;
|
||||
this._setPanelStructs(true);
|
||||
} else if (opt.PANEL_MODE === 1) {
|
||||
} else if (opt.PANEL_OVERVIEW_ONLY) {
|
||||
if (opt.SHOW_WS_PREVIEW_BG) {
|
||||
this._reparentPanel(true);
|
||||
if (opt.OVERVIEW_MODE2) {
|
||||
|
@ -83,8 +85,6 @@ export const PanelModule = class {
|
|||
Main.layoutManager.overviewGroup.set_child_above_sibling(panelBox, null);
|
||||
this._updateOverviewConnection();
|
||||
} else {
|
||||
// otherwise move the panel below overviewGroup so it can get below workspacesDisplay
|
||||
Main.layoutManager.overviewGroup.set_child_below_sibling(panelBox, Main.overview._overview);
|
||||
this._updateOverviewConnection(true);
|
||||
}
|
||||
this._showPanel(true);
|
||||
|
@ -95,13 +95,13 @@ export const PanelModule = class {
|
|||
this._updateOverviewConnection();
|
||||
}
|
||||
// _connectPanel();
|
||||
} else if (opt.PANEL_MODE === 2) {
|
||||
} else if (opt.PANEL_DISABLED) {
|
||||
this._updateOverviewConnection(true);
|
||||
this._reparentPanel(false);
|
||||
this._showPanel(false);
|
||||
// _connectPanel();
|
||||
}
|
||||
this._setPanelStructs(opt.PANEL_MODE === 0);
|
||||
this._setPanelStructs(!opt.PANEL_MODE);
|
||||
Main.layoutManager._updateHotCorners();
|
||||
|
||||
this._overrides.addOverride('ActivitiesButton', Main.panel.statusArea.activities, ActivitiesButton);
|
||||
|
@ -147,7 +147,7 @@ export const PanelModule = class {
|
|||
}
|
||||
} else if (!this._styleChangedConId) {
|
||||
this._styleChangedConId = Main.panel.connect('style-changed', () => {
|
||||
if (opt.PANEL_MODE === 1 && !opt.OVERVIEW_MODE2)
|
||||
if (opt.PANEL_OVERVIEW_ONLY && !opt.OVERVIEW_MODE2)
|
||||
Main.panel.add_style_pseudo_class('overview');
|
||||
else if (opt.OVERVIEW_MODE2)
|
||||
Main.panel.remove_style_pseudo_class('overview');
|
||||
|
@ -185,10 +185,10 @@ export const PanelModule = class {
|
|||
|
||||
_reparentPanel(reparent = false) {
|
||||
const panel = Main.layoutManager.panelBox;
|
||||
if (reparent && panel.get_parent() === Main.layoutManager.uiGroup) {
|
||||
if (reparent && panel.get_parent() === Main.layoutManager.uiGroup && !Main.sessionMode.isLocked) {
|
||||
Main.layoutManager.uiGroup.remove_child(panel);
|
||||
Main.layoutManager.overviewGroup.add_child(panel);
|
||||
} else if (!reparent && panel.get_parent() === Main.layoutManager.overviewGroup) {
|
||||
} else if ((!reparent || Main.sessionMode.isLocked) && panel.get_parent() === Main.layoutManager.overviewGroup) {
|
||||
Main.layoutManager.overviewGroup.remove_child(panel);
|
||||
// return the panel at default position, panel shouldn't cover objects that should be above
|
||||
Main.layoutManager.uiGroup.insert_child_at_index(panel, 4);
|
||||
|
@ -217,17 +217,17 @@ export const PanelModule = class {
|
|||
duration: ANIMATION_TIME,
|
||||
translation_y: 0,
|
||||
onComplete: () => {
|
||||
this._setPanelStructs(opt.PANEL_MODE === 0);
|
||||
this._setPanelStructs(!opt.PANEL_MODE);
|
||||
},
|
||||
});
|
||||
} else {
|
||||
} else if (!Main.layoutManager._startingUp) {
|
||||
const panelHeight = Main.panel.height;
|
||||
Main.layoutManager.panelBox.ease({
|
||||
duration: ANIMATION_TIME,
|
||||
translation_y: opt.PANEL_POSITION_TOP ? -panelHeight + 1 : panelHeight - 1,
|
||||
onComplete: () => {
|
||||
Main.panel.opacity = 0;
|
||||
this._setPanelStructs(opt.PANEL_MODE === 0);
|
||||
this._setPanelStructs(!opt.PANEL_MODE);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ let Me;
|
|||
let _;
|
||||
let opt;
|
||||
|
||||
let SEARCH_MAX_WIDTH;
|
||||
const SEARCH_MAX_WIDTH = 1092;
|
||||
|
||||
export const SearchModule = class {
|
||||
constructor(me) {
|
||||
|
@ -110,16 +110,14 @@ export const SearchModule = class {
|
|||
|
||||
_updateSearchViewWidth(reset = false) {
|
||||
const searchContent = Main.overview.searchController._searchResults._content;
|
||||
if (!SEARCH_MAX_WIDTH) { // just store original value;
|
||||
const themeNode = searchContent.get_theme_node();
|
||||
const width = themeNode.get_max_width();
|
||||
SEARCH_MAX_WIDTH = width;
|
||||
}
|
||||
|
||||
if (reset) {
|
||||
searchContent.set_style('');
|
||||
} else {
|
||||
let width = Math.round(SEARCH_MAX_WIDTH * opt.SEARCH_VIEW_SCALE);
|
||||
let width = SEARCH_MAX_WIDTH;
|
||||
if (Me.Util.monitorHasLowResolution())
|
||||
width = Math.round(width * 0.8);
|
||||
width = Math.round(width * opt.SEARCH_VIEW_SCALE);
|
||||
searchContent.set_style(`max-width: ${width}px;`);
|
||||
}
|
||||
}
|
||||
|
@ -204,34 +202,53 @@ const AppSearchProvider = {
|
|||
|
||||
let results = appInfoList.map(app => app.get_id());
|
||||
|
||||
if (opt.SEARCH_APP_GRID_MODE && Main.overview.dash.showAppsButton.checked)
|
||||
this._filterAppGrid(results);
|
||||
|
||||
results = results.concat(this._systemActions.getMatchingActions(terms));
|
||||
|
||||
return new Promise(resolve => resolve(results));
|
||||
},
|
||||
|
||||
_filterAppGrid(results) {
|
||||
const icons = Main.overview._overview.controls._appDisplay._orderedItems;
|
||||
icons.forEach(icon => {
|
||||
icon.visible = results.includes(icon.id);
|
||||
});
|
||||
},
|
||||
|
||||
// App search result size
|
||||
createResultObject(resultMeta) {
|
||||
let iconSize = opt.SEARCH_ICON_SIZE;
|
||||
if (!iconSize) {
|
||||
iconSize = Me.Util.monitorHasLowResolution()
|
||||
? 64
|
||||
: 96;
|
||||
}
|
||||
|
||||
if (resultMeta.id.endsWith('.desktop')) {
|
||||
const icon = new AppDisplay.AppIcon(this._appSys.lookup_app(resultMeta['id']), {
|
||||
expandTitleOnHover: false,
|
||||
});
|
||||
icon.icon.setIconSize(opt.SEARCH_ICON_SIZE);
|
||||
icon.icon.setIconSize(iconSize);
|
||||
return icon;
|
||||
} else {
|
||||
this._iconSize = iconSize;
|
||||
return new SystemActionIcon(this, resultMeta);
|
||||
// icon.icon._setSizeManually = true;
|
||||
// icon.icon.setIconSize(opt.SEARCH_ICON_SIZE);
|
||||
// return icon;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
const SystemActionIcon = GObject.registerClass(
|
||||
class SystemActionIcon extends Search.GridSearchResult {
|
||||
const SystemActionIcon = GObject.registerClass({
|
||||
// Registered name should be unique
|
||||
GTypeName: `SystemAction${Math.floor(Math.random() * 1000)}`,
|
||||
}, class SystemActionIcon extends Search.GridSearchResult {
|
||||
_init(provider, metaInfo, resultsView) {
|
||||
super._init(provider, metaInfo, resultsView);
|
||||
if (!Clutter.Container)
|
||||
this.add_style_class_name('grid-search-result-46');
|
||||
this.icon._setSizeManually = true;
|
||||
this.icon.setIconSize(opt.SEARCH_ICON_SIZE);
|
||||
this.icon.setIconSize(provider._iconSize);
|
||||
}
|
||||
|
||||
activate() {
|
||||
|
@ -331,6 +348,58 @@ const SearchResultsView = {
|
|||
this._statusText.set_text(_('No results.'));
|
||||
}
|
||||
},
|
||||
|
||||
_highlightFirstVisibleAppGridIcon() {
|
||||
const appDisplay = Main.overview._overview.controls._appDisplay;
|
||||
// appDisplay.grab_key_focus();
|
||||
for (const icon of appDisplay._orderedItems) {
|
||||
if (icon.visible) {
|
||||
appDisplay.selectApp(icon.id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
_maybeSetInitialSelection() {
|
||||
if (opt.SEARCH_APP_GRID_MODE && Main.overview.dash.showAppsButton.checked) {
|
||||
this._highlightFirstVisibleAppGridIcon();
|
||||
return;
|
||||
}
|
||||
|
||||
let newDefaultResult = null;
|
||||
|
||||
let providers = this._providers;
|
||||
for (let i = 0; i < providers.length; i++) {
|
||||
let provider = providers[i];
|
||||
let display = provider.display;
|
||||
|
||||
if (!display.visible)
|
||||
continue;
|
||||
|
||||
let firstResult = display.getFirstResult();
|
||||
if (firstResult) {
|
||||
newDefaultResult = firstResult;
|
||||
break; // select this one!
|
||||
}
|
||||
}
|
||||
|
||||
if (newDefaultResult !== this._defaultResult) {
|
||||
this._setSelected(this._defaultResult, false);
|
||||
this._setSelected(newDefaultResult, this._highlightDefault);
|
||||
|
||||
this._defaultResult = newDefaultResult;
|
||||
}
|
||||
},
|
||||
|
||||
highlightDefault(highlight) {
|
||||
if (opt.SEARCH_APP_GRID_MODE && Main.overview.dash.showAppsButton.checked) {
|
||||
if (highlight)
|
||||
this._highlightFirstVisibleAppGridIcon();
|
||||
} else {
|
||||
this._highlightDefault = highlight;
|
||||
this._setSelected(this._defaultResult, highlight);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
// Add highlighting of the "name" part of the result for all providers
|
||||
|
|
|
@ -30,7 +30,7 @@ export const Options = class Options {
|
|||
400,
|
||||
() => {
|
||||
this._gsettings.apply();
|
||||
this._updateCachedSettings();
|
||||
this._updateSettings();
|
||||
this._writeTimeoutId = 0;
|
||||
return GLib.SOURCE_REMOVE;
|
||||
}
|
||||
|
@ -102,10 +102,14 @@ export const Options = class Options {
|
|||
appGridActivePreview: ['boolean', 'app-grid-active-preview'],
|
||||
appGridFolderCenter: ['boolean', 'app-grid-folder-center'],
|
||||
appGridPageWidthScale: ['int', 'app-grid-page-width-scale'],
|
||||
appGridPageHeightScale: ['int', 'app-grid-page-height-scale'],
|
||||
appGridSpacing: ['int', 'app-grid-spacing'],
|
||||
appGridFolderSpacing: ['int', 'app-grid-folder-spacing'],
|
||||
appGridShowPageArrows: ['boolean', 'app-grid-show-page-arrows'],
|
||||
searchWindowsOrder: ['int', 'search-windows-order'],
|
||||
searchFuzzy: ['boolean', 'search-fuzzy'],
|
||||
searchMaxResultsRows: ['int', 'search-max-results-rows'],
|
||||
searchAppGridMode: ['int', 'search-app-grid-mode'],
|
||||
dashShowWindowsBeforeActivation: ['int', 'dash-show-windows-before-activation'],
|
||||
dashIconScroll: ['int', 'dash-icon-scroll'],
|
||||
dashIsolateWorkspaces: ['boolean', 'dash-isolate-workspaces'],
|
||||
|
@ -133,10 +137,12 @@ export const Options = class Options {
|
|||
overlayKeyPrimary: ['int', 'overlay-key-primary'],
|
||||
overlayKeySecondary: ['int', 'overlay-key-secondary'],
|
||||
overviewEscBehavior: ['int', 'overview-esc-behavior'],
|
||||
clickEmptyClose: ['boolean', 'click-empty-close'],
|
||||
newWindowFocusFix: ['boolean', 'new-window-focus-fix'],
|
||||
newWindowMonitorFix: ['boolean', 'new-window-monitor-fix'],
|
||||
appGridPerformance: ['boolean', 'app-grid-performance'],
|
||||
highlightingStyle: ['int', 'highlighting-style'],
|
||||
delayStartup: ['boolean', 'delay-startup'],
|
||||
|
||||
workspaceSwitcherPopupModule: ['boolean', 'workspace-switcher-popup-module'],
|
||||
workspaceAnimationModule: ['boolean', 'workspace-animation-module'],
|
||||
|
@ -162,6 +168,7 @@ export const Options = class Options {
|
|||
profileName4: ['string', 'profile-name-4'],
|
||||
};
|
||||
this.cachedOptions = {};
|
||||
this._updateSettings();
|
||||
}
|
||||
|
||||
connect(name, callback) {
|
||||
|
@ -285,6 +292,10 @@ export const Options = class Options {
|
|||
|
||||
_updateSettings() {
|
||||
this._updateCachedSettings();
|
||||
|
||||
// Basic spacing of the overview elements
|
||||
this.SPACING = 12;
|
||||
|
||||
this.DASH_BG_ALPHA = this.get('dashBgOpacity') / 100;
|
||||
this.DASH_BG_OPACITY = this.get('dashBgOpacity') * 2.5;
|
||||
this.DASH_BG_COLOR = this.get('dashBgColor');
|
||||
|
@ -323,6 +334,8 @@ export const Options = class Options {
|
|||
this.WS_TMB_POSITION = this.get('workspaceThumbnailsPosition');
|
||||
this.ORIENTATION = this.WS_TMB_POSITION > 4 ? 0 : 1;
|
||||
this.WORKSPACE_MAX_SPACING = this.get('wsMaxSpacing');
|
||||
this.WS_MAX_SPACING_OFF_SCREEN = 350;
|
||||
this.FORCE_SINGLE_WS_TRANSITION = false;
|
||||
// ORIENTATION || DASH_LEFT || DASH_RIGHT ? 350 : 80;
|
||||
this.SHOW_WS_TMB = ![4, 9].includes(this.WS_TMB_POSITION); // 4, 9 - disable
|
||||
this.WS_TMB_FULL = this.get('wsThumbnailsFull');
|
||||
|
@ -347,29 +360,16 @@ export const Options = class Options {
|
|||
this.SHOW_WST_LABELS_ON_HOVER = this.get('showWsTmbLabelsOnHover');
|
||||
this.CLOSE_WS_BUTTON_MODE = this.get('closeWsButtonMode');
|
||||
|
||||
this.MAX_THUMBNAIL_SCALE = this.get('wsThumbnailScale') / 100;
|
||||
if (this.MAX_THUMBNAIL_SCALE === 0) {
|
||||
this.MAX_THUMBNAIL_SCALE = 0.01;
|
||||
this.SHOW_WS_TMB = false;
|
||||
}
|
||||
this.MAX_THUMBNAIL_SCALE_APPGRID = this.get('wsThumbnailScaleAppGrid') / 100;
|
||||
this.MAX_THUMBNAIL_SCALE = this.get('wsThumbnailScale') / 100 + 0.01;
|
||||
this.MAX_THUMBNAIL_SCALE_APPGRID = this.get('wsThumbnailScaleAppGrid') / 100 + 0.01;
|
||||
this.SHOW_WS_TMB_APPGRID = true;
|
||||
if (this.MAX_THUMBNAIL_SCALE_APPGRID === 0) {
|
||||
this.MAX_THUMBNAIL_SCALE_APPGRID = 0.01;
|
||||
this.SHOW_WS_TMB_APPGRID = false;
|
||||
}
|
||||
this.MAX_THUMBNAIL_SCALE_STABLE = this.MAX_THUMBNAIL_SCALE === this.MAX_THUMBNAIL_SCALE_APPGRID;
|
||||
|
||||
this.SEC_MAX_THUMBNAIL_SCALE = this.get('secWsThumbnailScale') / 100;
|
||||
if (this.SEC_MAX_THUMBNAIL_SCALE === 0) {
|
||||
this.SEC_MAX_THUMBNAIL_SCALE = 0.01;
|
||||
this.SHOW_SEC_WS_TMB = false;
|
||||
}
|
||||
this.SEC_MAX_THUMBNAIL_SCALE = this.get('secWsThumbnailScale') / 100 + 0.01;
|
||||
|
||||
this.WS_PREVIEW_SCALE = this.get('wsPreviewScale') / 100;
|
||||
this.SEC_WS_PREVIEW_SCALE = this.get('secWsPreviewScale') / 100;
|
||||
// calculate number of possibly visible neighbor previews according to ws scale
|
||||
this.NUMBER_OF_VISIBLE_NEIGHBORS = Math.round(1 + (1 - this.WS_PREVIEW_SCALE) / 4);
|
||||
this.NUMBER_OF_VISIBLE_NEIGHBORS = Math.round(2 + (1 - this.WS_PREVIEW_SCALE));
|
||||
|
||||
this.SHOW_WS_TMB_BG = this.get('showWsSwitcherBg') && this.SHOW_WS_TMB;
|
||||
this.WS_PREVIEW_BG_RADIUS = this.get('wsPreviewBgRadius');
|
||||
|
@ -412,6 +412,7 @@ export const Options = class Options {
|
|||
this.SEARCH_MAX_ROWS = this.get('searchMaxResultsRows');
|
||||
this.SEARCH_FUZZY = this.get('searchFuzzy');
|
||||
this.SEARCH_DELAY = 0;
|
||||
this.SEARCH_APP_GRID_MODE = this.get('searchAppGridMode');
|
||||
|
||||
this.APP_GRID_ALLOW_INCOMPLETE_PAGES = this.get('appGridIncompletePages');
|
||||
this.APP_GRID_ICON_SIZE = this.get('appGridIconSize');
|
||||
|
@ -420,7 +421,7 @@ export const Options = class Options {
|
|||
this.APP_GRID_ADAPTIVE = !this.APP_GRID_COLUMNS && !this.APP_GRID_ROWS;
|
||||
|
||||
this.APP_GRID_ORDER = this.get('appGridOrder');
|
||||
this.APP_GRID_ALPHABET = [1, 2].includes(this.APP_GRID_ORDER);
|
||||
this.APP_GRID_ALPHABET = [1, 2, 4].includes(this.APP_GRID_ORDER);
|
||||
this.APP_GRID_FOLDERS_FIRST = this.APP_GRID_ORDER === 1;
|
||||
this.APP_GRID_FOLDERS_LAST = this.APP_GRID_ORDER === 2;
|
||||
this.APP_GRID_USAGE = this.APP_GRID_ORDER === 3;
|
||||
|
@ -448,24 +449,26 @@ export const Options = class Options {
|
|||
this.APP_GRID_FOLDER_COLUMNS = this.get('appGridFolderColumns');
|
||||
this.APP_GRID_FOLDER_ROWS = this.get('appGridFolderRows');
|
||||
this.APP_GRID_SPACING = this.get('appGridSpacing');
|
||||
this.APP_GRID_FOLDER_SPACING = this.get('appGridFolderSpacing');
|
||||
this.APP_GRID_FOLDER_DEFAULT = this.APP_GRID_FOLDER_ROWS === 3 && this.APP_GRID_FOLDER_COLUMNS === 3;
|
||||
this.APP_GRID_FOLDER_ADAPTIVE = !this.APP_GRID_FOLDER_COLUMNS && !this.APP_GRID_FOLDER_ROWS;
|
||||
this.APP_GRID_ACTIVE_PREVIEW = this.get('appGridActivePreview');
|
||||
this.APP_GRID_FOLDER_CENTER = this.get('appGridFolderCenter');
|
||||
this.APP_GRID_PAGE_WIDTH_SCALE = this.get('appGridPageWidthScale') / 100;
|
||||
this.APP_GRID_PAGE_HEIGHT_SCALE = this.get('appGridPageHeightScale') / 100;
|
||||
this.APP_GRID_SHOW_PAGE_ARROWS = this.get('appGridShowPageArrows');
|
||||
|
||||
this.APP_GRID_ICON_SIZE_DEFAULT = this.APP_GRID_ACTIVE_PREVIEW && !this.APP_GRID_USAGE ? 176 : 96;
|
||||
// Default icon sizes updates in the IconGrid._findBestModeForSize()
|
||||
this.APP_GRID_ICON_SIZE_DEFAULT = this.APP_GRID_ACTIVE_PREVIEW && !this.APP_GRID_USAGE ? 192 : 96;
|
||||
this.APP_GRID_FOLDER_ICON_SIZE_DEFAULT = 96;
|
||||
|
||||
this.APP_GRID_PERFORMANCE = this.get('appGridPerformance');
|
||||
|
||||
this.WINDOW_SEARCH_ORDER = this.get('searchWindowsOrder');
|
||||
|
||||
this.PANEL_POSITION_TOP = this.get('panelPosition') === 0;
|
||||
this.PANEL_POSITION_BOTTOM = this.get('panelPosition') === 1;
|
||||
this.PANEL_MODE = this.get('panelVisibility');
|
||||
this.PANEL_DISABLED = this.PANEL_MODE === 2;
|
||||
this.PANEL_OVERVIEW_ONLY = this.PANEL_MODE === 1;
|
||||
this.START_Y_OFFSET = 0; // set from main module
|
||||
|
||||
this.WINDOW_ATTENTION_MODE = this.get('windowAttentionMode');
|
||||
this.WINDOW_ATTENTION_DISABLE_NOTIFICATIONS = this.WINDOW_ATTENTION_MODE === 1;
|
||||
|
@ -514,8 +517,7 @@ export const Options = class Options {
|
|||
this.OVERLAY_KEY_SECONDARY = this.get('overlayKeySecondary');
|
||||
|
||||
this.ESC_BEHAVIOR = this.get('overviewEscBehavior');
|
||||
|
||||
this.WINDOW_THUMBNAIL_ENABLED = !!Me.Util.getEnabledExtensions('window-thumbnails').length;
|
||||
this.CLICK_EMPTY_CLOSE = this.get('clickEmptyClose');
|
||||
|
||||
this.FIX_NEW_WINDOW_FOCUS = this.get('newWindowFocusFix');
|
||||
this.FIX_NEW_WINDOW_MONITOR = this.get('newWindowMonitorFix');
|
||||
|
@ -524,6 +526,8 @@ export const Options = class Options {
|
|||
this.HIGHLIGHT_DEFAULT = this.HIGHLIGHTING_STYLE === 0;
|
||||
this.HIGHLIGHT_UNDERLINE = this.HIGHLIGHTING_STYLE === 1;
|
||||
this.HIGHLIGHT_NONE = this.HIGHLIGHTING_STYLE === 2;
|
||||
|
||||
this.DELAY_STARTUP = this.get('delayStartup');
|
||||
}
|
||||
|
||||
_getAnimationDirection() {
|
||||
|
|
|
@ -10,24 +10,30 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
import GLib from 'gi://GLib';
|
||||
import Clutter from 'gi://Clutter';
|
||||
import Gio from 'gi://Gio';
|
||||
import GLib from 'gi://GLib';
|
||||
import GObject from 'gi://GObject';
|
||||
import Meta from 'gi://Meta';
|
||||
import Shell from 'gi://Shell';
|
||||
import Gio from 'gi://Gio';
|
||||
import St from 'gi://St';
|
||||
|
||||
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
||||
import * as ModalDialog from 'resource:///org/gnome/shell/ui/modalDialog.js';
|
||||
import { InjectionManager } from 'resource:///org/gnome/shell/extensions/extension.js';
|
||||
|
||||
let Me;
|
||||
let _;
|
||||
let _installedExtensions;
|
||||
|
||||
export function init(me) {
|
||||
Me = me;
|
||||
_ = Me.gettext;
|
||||
}
|
||||
|
||||
export function cleanGlobals() {
|
||||
Me = null;
|
||||
_ = null;
|
||||
_installedExtensions = null;
|
||||
}
|
||||
|
||||
|
@ -373,3 +379,67 @@ export function getWindows(workspace) {
|
|||
// ... and filter out skip-taskbar windows and duplicates
|
||||
}).filter((w, i, a) => !w.skip_taskbar && a.indexOf(w) === i);
|
||||
}
|
||||
|
||||
export function monitorHasLowResolution(monitorIndex, resolutionLimit) {
|
||||
resolutionLimit = resolutionLimit ?? 1200000;
|
||||
monitorIndex = monitorIndex ?? global.display.get_primary_monitor();
|
||||
const monitorGeometry = global.display.get_monitor_geometry(monitorIndex);
|
||||
const { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
|
||||
const monitorResolution = monitorGeometry.width * monitorGeometry.height;
|
||||
return (monitorResolution / scaleFactor) < resolutionLimit;
|
||||
}
|
||||
|
||||
// /////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Status dialog that appears during updating V-Shell configuration and blocks inputs
|
||||
|
||||
export const RestartMessage = GObject.registerClass({
|
||||
// Registered name should be unique
|
||||
GTypeName: `RestartMessage${Math.floor(Math.random() * 1000)}`,
|
||||
}, class RestartMessage extends ModalDialog.ModalDialog {
|
||||
_init() {
|
||||
super._init({
|
||||
shellReactive: false,
|
||||
styleClass: 'restart-message headline update-message',
|
||||
shouldFadeIn: false,
|
||||
destroyOnClose: false,
|
||||
});
|
||||
|
||||
const label = new St.Label({
|
||||
text: _('Updating V-Shell'),
|
||||
x_align: Clutter.ActorAlign.CENTER,
|
||||
y_align: Clutter.ActorAlign.CENTER,
|
||||
});
|
||||
|
||||
this.contentLayout.add_child(label);
|
||||
this.buttonLayout.hide();
|
||||
this.connect('destroy', () => this.removeMessage());
|
||||
}
|
||||
|
||||
showMessage(timeout = 500) {
|
||||
if (this._timeoutId || Me._resetInProgress || Main.layoutManager._startingUp)
|
||||
return;
|
||||
this._removeTimeout();
|
||||
this.open();
|
||||
this._timeoutId = GLib.timeout_add(
|
||||
GLib.PRIORITY_LOW,
|
||||
timeout,
|
||||
() => {
|
||||
this._timeoutId = 0;
|
||||
this.removeMessage();
|
||||
return GLib.SOURCE_REMOVE;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
_removeTimeout() {
|
||||
if (this._timeoutId) {
|
||||
GLib.source_remove(this._timeoutId);
|
||||
this._timeoutId = 0;
|
||||
}
|
||||
}
|
||||
|
||||
removeMessage() {
|
||||
this._removeTimeout();
|
||||
this.close();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -10,9 +10,13 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
import Clutter from 'gi://Clutter';
|
||||
|
||||
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
||||
import * as MessageTray from 'resource:///org/gnome/shell/ui/messageTray.js';
|
||||
|
||||
const shellVersion46 = !Clutter.Container;
|
||||
|
||||
let Me;
|
||||
let opt;
|
||||
|
||||
|
@ -86,9 +90,8 @@ const WindowAttentionHandlerCommon = {
|
|||
}
|
||||
|
||||
const app = this._tracker.get_window_app(window);
|
||||
// const source = new WindowAttentionHandler.WindowAttentionSource(app, window);
|
||||
let args;
|
||||
if (!Main.overview.dash.add_actor) // detects GS 46 - Clutter.Container has been removed
|
||||
if (shellVersion46)
|
||||
args = { title: app.get_name() };
|
||||
else
|
||||
args = app.get_name();
|
||||
|
@ -98,24 +101,44 @@ const WindowAttentionHandlerCommon = {
|
|||
source._init(app, window);
|
||||
Main.messageTray.add(source);
|
||||
|
||||
let [title, banner] = this._getTitleAndBanner(app, window);
|
||||
let [title, body] = this._getTitleAndBanner(app, window);
|
||||
args = shellVersion46
|
||||
? [{ source, title, body, forFeedback: true }]
|
||||
: [source, title, body];
|
||||
|
||||
const notification = new MessageTray.Notification(...args);
|
||||
if (!shellVersion46)
|
||||
notification.setForFeedback(true);
|
||||
|
||||
const notification = new MessageTray.Notification(source, title, banner);
|
||||
notification.connect('activated', () => {
|
||||
source.open();
|
||||
});
|
||||
notification.setForFeedback(true);
|
||||
|
||||
if (opt.WINDOW_ATTENTION_DISABLE_NOTIFICATIONS)
|
||||
// just push the notification to the message tray without showing notification
|
||||
source.pushNotification(notification);
|
||||
else
|
||||
source.showNotification(notification);
|
||||
if (shellVersion46) {
|
||||
notification.acknowledged = opt.WINDOW_ATTENTION_DISABLE_NOTIFICATIONS;
|
||||
source.addNotification(notification);
|
||||
if (opt.WINDOW_ATTENTION_DISABLE_NOTIFICATIONS) {
|
||||
// just push the notification to the message tray without showing notification
|
||||
notification.acknowledged = true;
|
||||
Main.messageTray._notificationQueue.push(notification);
|
||||
Main.panel.statusArea.dateMenu._indicator.show();
|
||||
}
|
||||
window.connectObject('notify::title', () => {
|
||||
[title, body] = this._getTitleAndBanner(app, window);
|
||||
notification.set({ title, body });
|
||||
}, source);
|
||||
} else {
|
||||
if (opt.WINDOW_ATTENTION_DISABLE_NOTIFICATIONS)
|
||||
// just push the notification to the message tray without showing notification
|
||||
source.pushNotification(notification);
|
||||
else
|
||||
source.showNotification(notification);
|
||||
|
||||
window.connectObject('notify::title', () => {
|
||||
[title, banner] = this._getTitleAndBanner(app, window);
|
||||
notification.update(title, banner);
|
||||
}, source);
|
||||
window.connectObject('notify::title', () => {
|
||||
[title, body] = this._getTitleAndBanner(app, window);
|
||||
notification.update(title, body);
|
||||
}, source);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@ const WINDOW_ACTIVE_SIZE_INC = 5;
|
|||
const WINDOW_OVERLAY_FADE_TIME = 200;
|
||||
const WINDOW_DND_SIZE = 256;
|
||||
const DRAGGING_WINDOW_OPACITY = 100;
|
||||
const ICON_OVERLAP = 0.7;
|
||||
const ICON_TITLE_SPACING = 6;
|
||||
|
||||
const ControlsState = OverviewControls.ControlsState;
|
||||
|
||||
|
@ -109,7 +111,6 @@ const WindowPreviewCommon = {
|
|||
this._overviewAdjustment = overviewAdjustment;
|
||||
|
||||
const ICON_SIZE = opt.WIN_PREVIEW_ICON_SIZE;
|
||||
const ICON_OVERLAP = 0.7;
|
||||
|
||||
Shell.WindowPreview.prototype._init.bind(this)({
|
||||
reactive: true,
|
||||
|
@ -589,6 +590,15 @@ const WindowPreviewCommon = {
|
|||
}
|
||||
},
|
||||
|
||||
overlapHeights() {
|
||||
const [, titleHeight] = this._title.get_preferred_height(-1);
|
||||
|
||||
const topOverlap = 0;
|
||||
const bottomOverlap = opt.WIN_TITLES_POSITION === 2 ? titleHeight + ICON_TITLE_SPACING : 0;
|
||||
|
||||
return [topOverlap, bottomOverlap];
|
||||
},
|
||||
|
||||
_onDestroy() {
|
||||
if (this._activateSelected)
|
||||
this._activate();
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
'use strict';
|
||||
|
||||
import St from 'gi://St';
|
||||
import Graphene from 'gi://Graphene';
|
||||
// import Graphene from 'gi://Graphene';
|
||||
|
||||
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
||||
import * as Workspace from 'resource:///org/gnome/shell/ui/workspace.js';
|
||||
|
@ -108,7 +108,6 @@ const WorkspaceLayout = {
|
|||
}
|
||||
},
|
||||
|
||||
// this fixes wrong size and position calculation of window clones while moving overview to the next (+1) workspace if vertical ws orientation is enabled in GS
|
||||
_adjustSpacingAndPadding(rowSpacing, colSpacing, containerBox) {
|
||||
if (this._sortedWindows.length === 0)
|
||||
return [rowSpacing, colSpacing, containerBox];
|
||||
|
@ -120,36 +119,46 @@ const WorkspaceLayout = {
|
|||
const [topOversize, bottomOversize] = window.chromeHeights();
|
||||
const [leftOversize, rightOversize] = window.chromeWidths();
|
||||
|
||||
const oversize = Math.max(topOversize, bottomOversize, leftOversize, rightOversize);
|
||||
let oversize = Math.max(topOversize, bottomOversize, leftOversize, rightOversize);
|
||||
|
||||
if (rowSpacing !== null)
|
||||
rowSpacing += oversize;
|
||||
if (colSpacing !== null)
|
||||
colSpacing += oversize;
|
||||
|
||||
if (containerBox) {
|
||||
const vertical = global.workspaceManager.layout_rows === -1;
|
||||
// Chrome highlights and window titles may exceed the workspace preview area
|
||||
// and also the screen area if there is no overview element below/above/on_the_right of the workspace
|
||||
// The original code tests whether window titles are out of the screen and applies correction accordingly
|
||||
// That is a problem when workspaces are vertically stacked, because this method is called even during transitions between workspaces
|
||||
// In V-Shell, this issue can be solved by reducing the workspace preview scale in the Settings
|
||||
|
||||
// Original code - horizontal orientation only
|
||||
/* if (containerBox) {
|
||||
const monitor = Main.layoutManager.monitors[this._monitorIndex];
|
||||
|
||||
const bottomPoint = new Graphene.Point3D();
|
||||
if (vertical)
|
||||
bottomPoint.x = containerBox.x2;
|
||||
else
|
||||
bottomPoint.y = containerBox.y2;
|
||||
|
||||
|
||||
const bottomPoint = new Graphene.Point3D({ y: containerBox.y2 });
|
||||
const transformedBottomPoint =
|
||||
this._container.apply_transform_to_point(bottomPoint);
|
||||
const bottomFreeSpace = vertical
|
||||
? (monitor.x + monitor.height) - transformedBottomPoint.x
|
||||
: (monitor.y + monitor.height) - transformedBottomPoint.y;
|
||||
const bottomFreeSpace =
|
||||
(monitor.y + monitor.height) - transformedBottomPoint.y;
|
||||
|
||||
const [, bottomOverlap] = window.overlapHeights();
|
||||
|
||||
if ((bottomOverlap + oversize) > bottomFreeSpace && !vertical)
|
||||
if ((bottomOverlap + oversize) > bottomFreeSpace)
|
||||
containerBox.y2 -= (bottomOverlap + oversize) - bottomFreeSpace;
|
||||
}
|
||||
}*/
|
||||
|
||||
// Alternative code reducing the box size unconditionally
|
||||
/* if (containerBox) {
|
||||
const [, bottomOverlap] = window.overlapHeights();
|
||||
|
||||
// Adjusting x1/x2 here is pointless,
|
||||
// x1 only moves window previews to the right and down, x2 has no effect
|
||||
// Prevent window previews from overlapping a workspace preview
|
||||
oversize *= 1.5;
|
||||
containerBox.y1 += oversize;
|
||||
containerBox.y2 -= bottomOverlap + oversize;
|
||||
}*/
|
||||
|
||||
return [rowSpacing, colSpacing, containerBox];
|
||||
},
|
||||
|
|
|
@ -41,7 +41,7 @@ const ThumbnailState = {
|
|||
|
||||
const ControlsState = OverviewControls.ControlsState;
|
||||
|
||||
const WORKSPACE_CUT_SIZE = 10;
|
||||
const WORKSPACE_CUT_SCALE = 0.15;
|
||||
const WORKSPACE_KEEP_ALIVE_TIME = 100;
|
||||
|
||||
export const WorkspaceThumbnailModule = class {
|
||||
|
@ -85,6 +85,7 @@ export const WorkspaceThumbnailModule = class {
|
|||
|
||||
this._overrides.addOverride('WorkspaceThumbnail', WorkspaceThumbnail.WorkspaceThumbnail.prototype, WorkspaceThumbnailCommon);
|
||||
this._overrides.addOverride('ThumbnailsBoxCommon', WorkspaceThumbnail.ThumbnailsBox.prototype, ThumbnailsBoxCommon);
|
||||
this._overrides.addOverride('WindowClone', WorkspaceThumbnail.WindowClone.prototype, WindowClone);
|
||||
|
||||
// replacing opt.ORIENTATION local constant with boxOrientation internal variable allows external customers such as the AATWS extension to control the box orientation.
|
||||
Main.overview._overview.controls._thumbnailsBox._boxOrientation = opt.ORIENTATION;
|
||||
|
@ -702,10 +703,19 @@ const ThumbnailsBoxCommon = {
|
|||
},
|
||||
};
|
||||
|
||||
function _getWorkspaceCutSize(tmbSize, index) {
|
||||
let cutSize = WORKSPACE_CUT_SCALE * tmbSize;
|
||||
// Compensate for the missing thumbnail in front of the first one
|
||||
if (index === 0)
|
||||
cutSize *= 1.5;
|
||||
return Math.floor(cutSize);
|
||||
}
|
||||
|
||||
const ThumbnailsBoxVertical = {
|
||||
_getPlaceholderTarget(index, spacing, rtl) {
|
||||
this._dropPlaceholder.add_style_class_name('placeholder-vertical');
|
||||
const workspace = this._thumbnails[index];
|
||||
const WORKSPACE_CUT_SIZE = _getWorkspaceCutSize(workspace.height, index);
|
||||
|
||||
let targetY1;
|
||||
let targetY2;
|
||||
|
@ -740,6 +750,7 @@ const ThumbnailsBoxVertical = {
|
|||
_withinWorkspace(y, index, rtl) {
|
||||
const length = this._thumbnails.length;
|
||||
const workspace = this._thumbnails[index];
|
||||
const WORKSPACE_CUT_SIZE = _getWorkspaceCutSize(workspace.height, index);
|
||||
|
||||
let workspaceY1 = workspace.y + WORKSPACE_CUT_SIZE;
|
||||
let workspaceY2 = workspace.y + workspace.height - WORKSPACE_CUT_SIZE;
|
||||
|
@ -788,12 +799,14 @@ const ThumbnailsBoxVertical = {
|
|||
const ratio = this._porthole.width / this._porthole.height;
|
||||
const tmbHeight = themeNode.adjust_for_width(forWidth) / ratio;
|
||||
|
||||
const naturalheight = this._thumbnails.reduce((accumulator, thumbnail/* , index*/) => {
|
||||
const progress = 1 - thumbnail.collapse_fraction;
|
||||
const height = tmbHeight * progress;
|
||||
return accumulator + height;
|
||||
}, 0);
|
||||
return themeNode.adjust_preferred_width(totalSpacing, Math.round(naturalheight));
|
||||
const naturalHeight = Math.round(
|
||||
this._thumbnails.reduce((accumulator, thumbnail/* , index*/) => {
|
||||
const progress = 1 - thumbnail.collapse_fraction;
|
||||
const height = tmbHeight * progress;
|
||||
return accumulator + height;
|
||||
}, 0)
|
||||
);
|
||||
return themeNode.adjust_preferred_width(totalSpacing, naturalHeight);
|
||||
},
|
||||
|
||||
// removes extra space (extraWidth in the original function), we need the box as accurate as possible
|
||||
|
@ -976,6 +989,7 @@ const ThumbnailsBoxVertical = {
|
|||
const ThumbnailsBoxHorizontal = {
|
||||
_getPlaceholderTarget(index, spacing, rtl) {
|
||||
const workspace = this._thumbnails[index];
|
||||
const WORKSPACE_CUT_SIZE = _getWorkspaceCutSize(workspace.width, index);
|
||||
|
||||
let targetX1;
|
||||
let targetX2;
|
||||
|
@ -1010,6 +1024,7 @@ const ThumbnailsBoxHorizontal = {
|
|||
_withinWorkspace(x, index, rtl) {
|
||||
const length = this._thumbnails.length;
|
||||
const workspace = this._thumbnails[index];
|
||||
const WORKSPACE_CUT_SIZE = _getWorkspaceCutSize(workspace.width, index);
|
||||
|
||||
let workspaceX1 = workspace.x + WORKSPACE_CUT_SIZE;
|
||||
let workspaceX2 = workspace.x + workspace.width - WORKSPACE_CUT_SIZE;
|
||||
|
@ -1060,11 +1075,13 @@ const ThumbnailsBoxHorizontal = {
|
|||
|
||||
const tmbWidth = themeNode.adjust_for_height(forHeight) / ratio;
|
||||
|
||||
const naturalWidth = this._thumbnails.reduce((accumulator, thumbnail) => {
|
||||
const progress = 1 - thumbnail.collapse_fraction;
|
||||
const width = tmbWidth * progress;
|
||||
return accumulator + width;
|
||||
}, 0);
|
||||
const naturalWidth = Math.round(
|
||||
this._thumbnails.reduce((accumulator, thumbnail) => {
|
||||
const progress = 1 - thumbnail.collapse_fraction;
|
||||
const width = tmbWidth * progress;
|
||||
return accumulator + width;
|
||||
}, 0)
|
||||
);
|
||||
|
||||
return themeNode.adjust_preferred_width(totalSpacing, naturalWidth);
|
||||
},
|
||||
|
@ -1234,3 +1251,11 @@ const ThumbnailsBoxHorizontal = {
|
|||
|
||||
_updateShouldShow: ThumbnailsBoxVertical._updateShouldShow,
|
||||
};
|
||||
|
||||
const WindowClone = {
|
||||
after__init() {
|
||||
// Make it transparent and smaller than usual while dragging
|
||||
this._draggable._dragActorOpacity = 200;
|
||||
this._draggable._dragActorMaxSize = 150;
|
||||
},
|
||||
};
|
||||
|
|
|
@ -69,6 +69,8 @@ export const WorkspacesViewModule = class {
|
|||
|
||||
if (!desktopCubeConflict)
|
||||
this._overrides.addOverride('WorkspacesView', WorkspacesView.WorkspacesView.prototype, WorkspacesViewCommon);
|
||||
else
|
||||
this._overrides.removeOverride('WorkspacesView');
|
||||
|
||||
this._overrides.addOverride('WorkspacesDisplay', WorkspacesView.WorkspacesDisplay.prototype, WorkspacesDisplayCommon);
|
||||
this._overrides.addOverride('ExtraWorkspaceView', WorkspacesView.ExtraWorkspaceView.prototype, ExtraWorkspaceViewCommon);
|
||||
|
@ -208,18 +210,26 @@ const WorkspacesViewCommon = {
|
|||
// if we disable workspaces that we can't or don't need to see, transition animations will be noticeably smoother
|
||||
// only the current ws needs to be visible during overview transition animations
|
||||
// and only current and adjacent ws when switching ws
|
||||
w.visible = (this._animating && wsScrollProgress && distanceToCurrentWorkspace <= (opt.NUMBER_OF_VISIBLE_NEIGHBORS + 1)) || scaleProgress === 1 ||
|
||||
(opt.WORKSPACE_MAX_SPACING > 340 && distanceToCurrentWorkspace <= opt.NUMBER_OF_VISIBLE_NEIGHBORS && currentState === ControlsState.WINDOW_PICKER) ||
|
||||
(this._monitorIndex !== primaryMonitor && distanceToCurrentWorkspace <= opt.NUMBER_OF_VISIBLE_NEIGHBORS) || (!opt.WS_ANIMATION && distanceToCurrentWorkspace < opt.NUMBER_OF_VISIBLE_NEIGHBORS) ||
|
||||
(opt.WORKSPACE_MAX_SPACING < 340 && distanceToCurrentWorkspace <= opt.NUMBER_OF_VISIBLE_NEIGHBORS && currentState <= ControlsState.WINDOW_PICKER &&
|
||||
((initialState < ControlsState.APP_GRID && finalState < ControlsState.APP_GRID))
|
||||
);
|
||||
w.visible =
|
||||
(this._animating && wsScrollProgress && distanceToCurrentWorkspace <= (opt.NUMBER_OF_VISIBLE_NEIGHBORS + 1)) ||
|
||||
scaleProgress === 1 ||
|
||||
(opt.WORKSPACE_MAX_SPACING >= opt.WS_MAX_SPACING_OFF_SCREEN &&
|
||||
distanceToCurrentWorkspace <= opt.NUMBER_OF_VISIBLE_NEIGHBORS &&
|
||||
currentState === ControlsState.WINDOW_PICKER
|
||||
) ||
|
||||
(this._monitorIndex !== primaryMonitor && distanceToCurrentWorkspace <= opt.NUMBER_OF_VISIBLE_NEIGHBORS) ||
|
||||
(!opt.WS_ANIMATION && distanceToCurrentWorkspace < opt.NUMBER_OF_VISIBLE_NEIGHBORS) ||
|
||||
(distanceToCurrentWorkspace <= opt.NUMBER_OF_VISIBLE_NEIGHBORS &&
|
||||
currentState <= ControlsState.WINDOW_PICKER &&
|
||||
(initialState < ControlsState.APP_GRID && finalState < ControlsState.APP_GRID)
|
||||
);
|
||||
|
||||
// after transition from APP_GRID to WINDOW_PICKER state,
|
||||
// adjacent workspaces are hidden and we need them to show up
|
||||
// make them visible during animation can impact smoothness of the animation
|
||||
// so we show them after the animation finished, move them to their position from outside of the monitor
|
||||
if (!w.visible && distanceToCurrentWorkspace === 1 && initialState === ControlsState.APP_GRID && currentState === ControlsState.WINDOW_PICKER) {
|
||||
if (currentState === ControlsState.WINDOW_PICKER && !w.visible && distanceToCurrentWorkspace <= opt.NUMBER_OF_VISIBLE_NEIGHBORS && initialState === ControlsState.APP_GRID) {
|
||||
w.remove_all_transitions();
|
||||
w.visible = true;
|
||||
const directionNext = distance > 0;
|
||||
if (!opt.ORIENTATION) {
|
||||
|
@ -315,115 +325,103 @@ const SecondaryMonitorDisplayVertical = {
|
|||
return { opacity, scale, translationX };
|
||||
},
|
||||
|
||||
_getThumbnailsWidth(box, spacing) {
|
||||
if (opt.SEC_WS_TMB_HIDDEN)
|
||||
return 0;
|
||||
_getWorkspacesBoxForState(state, box, workArea, wsTmbWidth, spacing) {
|
||||
let workspaceBox = box.copy();
|
||||
|
||||
const [width, height] = box.get_size();
|
||||
const { expandFraction } = this._thumbnails;
|
||||
const [, thumbnailsWidth] = this._thumbnails.get_preferred_width(height - 2 * spacing);
|
||||
let scaledWidth;
|
||||
if (opt.SEC_WS_PREVIEW_SHIFT && !opt.PANEL_DISABLED)
|
||||
scaledWidth = ((height - Main.panel.height) * opt.SEC_MAX_THUMBNAIL_SCALE) * (width / height);
|
||||
else
|
||||
scaledWidth = width * opt.SEC_MAX_THUMBNAIL_SCALE;
|
||||
if (
|
||||
(state === ControlsState.WINDOW_PICKER || state === ControlsState.APP_GRID) &&
|
||||
!(opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE)
|
||||
) {
|
||||
workspaceBox = workArea.copy();
|
||||
const [startX, startY] = workspaceBox.get_origin();
|
||||
let [width, height] = workspaceBox.get_size();
|
||||
|
||||
return Math.min(
|
||||
thumbnailsWidth * expandFraction,
|
||||
Math.round(scaledWidth));
|
||||
},
|
||||
let wsBoxWidth = width - (wsTmbWidth ? wsTmbWidth + spacing : 0) - 2 * spacing;
|
||||
let wsBoxHeight = height - 2 * spacing;
|
||||
|
||||
_getWorkspacesBoxForState(state, box, thumbnailsWidth, spacing, startY, panelHeight) {
|
||||
// const { ControlsState } = OverviewControls;
|
||||
const workspaceBox = box.copy();
|
||||
let [width, height] = workspaceBox.get_size();
|
||||
height -= panelHeight;
|
||||
const ratio = width / height;
|
||||
let wRatio = wsBoxWidth / wsBoxHeight;
|
||||
let scale = ratio / wRatio;
|
||||
|
||||
let wWidth, wHeight, wsbX, wsbY, offset;
|
||||
switch (state) {
|
||||
case ControlsState.HIDDEN:
|
||||
break;
|
||||
case ControlsState.WINDOW_PICKER:
|
||||
case ControlsState.APP_GRID:
|
||||
if (opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE)
|
||||
break;
|
||||
if (scale > 1) {
|
||||
wsBoxHeight /= scale;
|
||||
wsBoxWidth = wsBoxHeight * ratio;
|
||||
} else {
|
||||
wsBoxWidth *= scale;
|
||||
wsBoxHeight = wsBoxWidth / ratio;
|
||||
}
|
||||
|
||||
wWidth = width - thumbnailsWidth - 5 * spacing;
|
||||
wHeight = Math.min(wWidth / (width / height), height - 4 * spacing);
|
||||
wWidth = Math.round(wWidth * opt.SEC_WS_PREVIEW_SCALE);
|
||||
wHeight = Math.round(wHeight * opt.SEC_WS_PREVIEW_SCALE);
|
||||
// height decides the actual size, ratio is given by the workArea
|
||||
wsBoxHeight = Math.round(wsBoxHeight * opt.SEC_WS_PREVIEW_SCALE);
|
||||
wsBoxWidth = Math.round(wsBoxWidth * opt.SEC_WS_PREVIEW_SCALE);
|
||||
|
||||
offset = Math.round(width - thumbnailsWidth - wWidth) / 2;
|
||||
if (opt.SEC_WS_TMB_LEFT)
|
||||
wsbX = thumbnailsWidth + offset;
|
||||
else
|
||||
wsbX = offset;
|
||||
let offset = Math.round(width - wsTmbWidth - wsBoxWidth - spacing) / 2;
|
||||
|
||||
wsbY = Math.round((startY + height - wHeight) / 2);
|
||||
const wsbX = startX + opt.SEC_WS_TMB_LEFT
|
||||
? wsTmbWidth + spacing + offset
|
||||
: offset;
|
||||
|
||||
const wsbY = Math.round((startY + height - wsBoxHeight) / 2);
|
||||
|
||||
workspaceBox.set_origin(wsbX, wsbY);
|
||||
workspaceBox.set_size(wWidth, wHeight);
|
||||
break;
|
||||
workspaceBox.set_size(wsBoxWidth, wsBoxHeight);
|
||||
}
|
||||
|
||||
return workspaceBox;
|
||||
},
|
||||
|
||||
_getWorkAreaBox(box) {
|
||||
if (!opt.SEC_WS_PREVIEW_SHIFT || !Main.panel.visible)
|
||||
return box;
|
||||
|
||||
const workArea = box.copy();
|
||||
const panelHeight = Main.panel.height;
|
||||
workArea.y1 += opt.PANEL_POSITION_TOP ? panelHeight : 0;
|
||||
workArea.y2 -= opt.PANEL_POSITION_BOTTOM ? panelHeight : 0;
|
||||
|
||||
return workArea;
|
||||
},
|
||||
|
||||
vfunc_allocate(box) {
|
||||
this.set_allocation(box);
|
||||
|
||||
const themeNode = this.get_theme_node();
|
||||
const contentBox = themeNode.get_content_box(box);
|
||||
let [width, height] = contentBox.get_size();
|
||||
let [, startY] = contentBox.get_origin();
|
||||
// Save some resources
|
||||
if (this._startY === undefined) {
|
||||
this._panelHeight = opt.SEC_WS_PREVIEW_SHIFT && Main.panel.visible ? Main.panel.height : 0;
|
||||
startY += opt.SEC_WS_PREVIEW_SHIFT && opt.PANEL_POSITION_TOP ? this._panelHeight : 0;
|
||||
this._startY = startY;
|
||||
}
|
||||
|
||||
startY = this._startY;
|
||||
height -= this._panelHeight;
|
||||
const { expandFraction } = this._thumbnails;
|
||||
const spacing = themeNode.get_length('spacing') * expandFraction;
|
||||
const workArea = this._getWorkAreaBox(contentBox);
|
||||
|
||||
let thumbnailsWidth = 0;
|
||||
let thumbnailsHeight = 0;
|
||||
let [width, height] = workArea.get_size();
|
||||
let [startX, startY] = workArea.get_origin();
|
||||
|
||||
const spacing = opt.SPACING;
|
||||
|
||||
let wsTmbWidth = 0;
|
||||
let wsTmbHeight = 0;
|
||||
this._thumbnails.visible = !opt.SEC_WS_TMB_HIDDEN;
|
||||
if (this._thumbnails.visible) {
|
||||
thumbnailsWidth = Math.round(width * opt.SEC_MAX_THUMBNAIL_SCALE);
|
||||
wsTmbWidth = Math.round(width * opt.SEC_MAX_THUMBNAIL_SCALE);
|
||||
|
||||
let totalTmbSpacing;
|
||||
[totalTmbSpacing, thumbnailsHeight] = this._thumbnails.get_preferred_height(thumbnailsWidth);
|
||||
thumbnailsHeight = Math.round(thumbnailsHeight + totalTmbSpacing);
|
||||
[totalTmbSpacing, wsTmbHeight] = this._thumbnails.get_preferred_height(wsTmbWidth);
|
||||
wsTmbHeight += totalTmbSpacing;
|
||||
|
||||
const thumbnailsHeightMax = height - spacing;
|
||||
|
||||
if (thumbnailsHeight > thumbnailsHeightMax) {
|
||||
thumbnailsHeight = thumbnailsHeightMax;
|
||||
thumbnailsWidth = Math.round(this._thumbnails.get_preferred_width(thumbnailsHeight)[1]);
|
||||
if (wsTmbHeight > thumbnailsHeightMax) {
|
||||
wsTmbHeight = thumbnailsHeightMax;
|
||||
wsTmbWidth = Math.round(this._thumbnails.get_preferred_width(wsTmbHeight)[1]);
|
||||
}
|
||||
|
||||
let wsTmbX;
|
||||
if (opt.SEC_WS_TMB_LEFT) {
|
||||
wsTmbX = 0;
|
||||
this._thumbnails._positionLeft = true;
|
||||
} else {
|
||||
wsTmbX = width - thumbnailsWidth;
|
||||
this._thumbnails._positionLeft = false;
|
||||
}
|
||||
let wsTmbX = opt.SEC_WS_TMB_LEFT
|
||||
? startX + spacing
|
||||
: startX + width - wsTmbWidth - spacing;
|
||||
|
||||
let offset = (height - wsTmbHeight) / 2;
|
||||
const wsTmbY = startY + Math.round(offset - opt.SEC_WS_TMB_POSITION_ADJUSTMENT * (offset - spacing));
|
||||
|
||||
const childBox = new Clutter.ActorBox();
|
||||
const availSpace = height - thumbnailsHeight;
|
||||
|
||||
let wsTmbY = availSpace / 2;
|
||||
|
||||
wsTmbY -= opt.SEC_WS_TMB_POSITION_ADJUSTMENT * (wsTmbY - spacing / 2);
|
||||
wsTmbY += startY;
|
||||
|
||||
childBox.set_origin(Math.round(wsTmbX), Math.round(wsTmbY));
|
||||
childBox.set_size(thumbnailsWidth, thumbnailsHeight);
|
||||
childBox.set_origin(wsTmbX, wsTmbY);
|
||||
childBox.set_size(wsTmbWidth, wsTmbHeight);
|
||||
this._thumbnails.allocate(childBox);
|
||||
}
|
||||
|
||||
|
@ -432,7 +430,7 @@ const SecondaryMonitorDisplayVertical = {
|
|||
} = this._overviewAdjustment.getStateTransitionParams();
|
||||
|
||||
let workspacesBox;
|
||||
const workspaceParams = [contentBox, thumbnailsWidth, spacing, startY, this._panelHeight];
|
||||
const workspaceParams = [contentBox, workArea, wsTmbWidth, spacing];
|
||||
if (!transitioning) {
|
||||
workspacesBox =
|
||||
this._getWorkspacesBoxForState(currentState, ...workspaceParams);
|
||||
|
@ -562,93 +560,93 @@ const SecondaryMonitorDisplayHorizontal = {
|
|||
return { opacity, scale, translationY };
|
||||
},
|
||||
|
||||
_getWorkspacesBoxForState(state, box, thumbnailsHeight, spacing, startY, panelHeight) {
|
||||
// const { ControlsState } = OverviewControls;
|
||||
const workspaceBox = box.copy();
|
||||
let [width, height] = workspaceBox.get_size();
|
||||
height -= panelHeight;
|
||||
_getWorkspacesBoxForState(state, box, workArea, wsTmbHeight, spacing) {
|
||||
let workspaceBox = box.copy();
|
||||
|
||||
let wWidth, wHeight, wsbX, wsbY, offset;
|
||||
switch (state) {
|
||||
case ControlsState.HIDDEN:
|
||||
break;
|
||||
case ControlsState.WINDOW_PICKER:
|
||||
case ControlsState.APP_GRID:
|
||||
if (opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE)
|
||||
break;
|
||||
if (
|
||||
(state === ControlsState.WINDOW_PICKER || state === ControlsState.APP_GRID) &&
|
||||
!(opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE)
|
||||
) {
|
||||
workspaceBox = workArea.copy();
|
||||
const [startX, startY] = workspaceBox.get_origin();
|
||||
let [width, height] = workspaceBox.get_size();
|
||||
|
||||
wHeight = height - (thumbnailsHeight ? thumbnailsHeight + 4 * spacing : 4 * spacing);
|
||||
wWidth = Math.min(wHeight * (width / height), width - 5 * spacing);
|
||||
wWidth = Math.round(wWidth * opt.SEC_WS_PREVIEW_SCALE);
|
||||
wHeight = Math.round(wHeight * opt.SEC_WS_PREVIEW_SCALE);
|
||||
let wsBoxWidth = width - 2 * spacing;
|
||||
let wsBoxHeight = height - (wsTmbHeight ? wsTmbHeight + spacing : 0) - 2 * spacing;
|
||||
|
||||
offset = Math.round((height - thumbnailsHeight - wHeight) / 2);
|
||||
if (opt.SEC_WS_TMB_TOP)
|
||||
wsbY = thumbnailsHeight + offset;
|
||||
else
|
||||
wsbY = offset;
|
||||
const ratio = width / height;
|
||||
let wRatio = wsBoxWidth / wsBoxHeight;
|
||||
let scale = ratio / wRatio;
|
||||
|
||||
wsbY += startY;
|
||||
wsbX = Math.round((width - wWidth) / 2);
|
||||
if (scale > 1) {
|
||||
wsBoxHeight /= scale;
|
||||
wsBoxWidth = wsBoxHeight * ratio;
|
||||
} else {
|
||||
wsBoxWidth *= scale;
|
||||
wsBoxHeight = wsBoxWidth / ratio;
|
||||
}
|
||||
|
||||
// height decides the actual size, ratio is given by the workArea
|
||||
wsBoxHeight = Math.round(wsBoxHeight * opt.SEC_WS_PREVIEW_SCALE);
|
||||
wsBoxWidth = Math.round(wsBoxWidth * opt.SEC_WS_PREVIEW_SCALE);
|
||||
|
||||
let offset = Math.round(height - wsTmbHeight - wsBoxHeight - spacing) / 2;
|
||||
|
||||
const wsbX = Math.round((startX + width - wsBoxWidth) / 2);
|
||||
|
||||
const wsbY = startY + opt.SEC_WS_TMB_TOP
|
||||
? wsTmbHeight + spacing + offset
|
||||
: offset;
|
||||
|
||||
workspaceBox.set_origin(wsbX, wsbY);
|
||||
workspaceBox.set_size(wWidth, wHeight);
|
||||
break;
|
||||
workspaceBox.set_size(wsBoxWidth, wsBoxHeight);
|
||||
}
|
||||
|
||||
return workspaceBox;
|
||||
},
|
||||
|
||||
_getWorkAreaBox: SecondaryMonitorDisplayVertical._getWorkAreaBox,
|
||||
|
||||
vfunc_allocate(box) {
|
||||
this.set_allocation(box);
|
||||
|
||||
const themeNode = this.get_theme_node();
|
||||
const contentBox = themeNode.get_content_box(box);
|
||||
let [width, height] = contentBox.get_size();
|
||||
let [, startY] = contentBox.get_origin();
|
||||
// Save some resources
|
||||
if (this._startY === undefined) {
|
||||
this._panelHeight = opt.SEC_WS_PREVIEW_SHIFT && Main.panel.visible ? Main.panel.height : 0;
|
||||
startY += opt.SEC_WS_PREVIEW_SHIFT && opt.PANEL_POSITION_TOP ? this._panelHeight : 0;
|
||||
this._startY = startY;
|
||||
}
|
||||
startY = this._startY;
|
||||
height -= this._panelHeight;
|
||||
|
||||
const { expandFraction } = this._thumbnails;
|
||||
const spacing = themeNode.get_length('spacing') * expandFraction;
|
||||
const workArea = this._getWorkAreaBox(contentBox);
|
||||
|
||||
let thumbnailsWidth = 0;
|
||||
let thumbnailsHeight = 0;
|
||||
let [width, height] = workArea.get_size();
|
||||
let [startX, startY] = workArea.get_origin();
|
||||
|
||||
const spacing = opt.SPACING;
|
||||
|
||||
let wsTmbWidth = 0;
|
||||
let wsTmbHeight = 0;
|
||||
this._thumbnails.visible = !opt.SEC_WS_TMB_HIDDEN;
|
||||
if (this._thumbnails.visible) {
|
||||
thumbnailsHeight = height * opt.SEC_MAX_THUMBNAIL_SCALE;
|
||||
wsTmbHeight = Math.round(height * opt.SEC_MAX_THUMBNAIL_SCALE);
|
||||
|
||||
let totalTmbSpacing;
|
||||
[totalTmbSpacing, thumbnailsWidth] = this._thumbnails.get_preferred_width(thumbnailsHeight);
|
||||
thumbnailsWidth = Math.round(thumbnailsWidth + totalTmbSpacing);
|
||||
[totalTmbSpacing, wsTmbWidth] = this._thumbnails.get_preferred_width(wsTmbHeight);
|
||||
wsTmbWidth += totalTmbSpacing;
|
||||
|
||||
const thumbnailsWidthMax = width - spacing;
|
||||
const thumbnailsWidthMax = width - 2 * spacing;
|
||||
|
||||
if (thumbnailsWidth > thumbnailsWidthMax) {
|
||||
thumbnailsWidth = thumbnailsWidthMax;
|
||||
thumbnailsHeight = Math.round(this._thumbnails.get_preferred_height(thumbnailsWidth)[1]);
|
||||
if (wsTmbWidth > thumbnailsWidthMax) {
|
||||
wsTmbWidth = thumbnailsWidthMax;
|
||||
wsTmbHeight = Math.round(this._thumbnails.get_preferred_height(wsTmbWidth)[1]);
|
||||
}
|
||||
|
||||
let wsTmbY;
|
||||
if (opt.SEC_WS_TMB_TOP)
|
||||
wsTmbY = spacing / 2 + startY;
|
||||
else
|
||||
wsTmbY = height - spacing / 2 - thumbnailsHeight + startY;
|
||||
let wsTmbY = opt.SEC_WS_TMB_TOP
|
||||
? startY + spacing
|
||||
: startY + height - wsTmbHeight - spacing;
|
||||
|
||||
let offset = (width - wsTmbWidth) / 2;
|
||||
const wsTmbX = startX + Math.round(offset - opt.SEC_WS_TMB_POSITION_ADJUSTMENT * (offset - spacing));
|
||||
|
||||
const childBox = new Clutter.ActorBox();
|
||||
const availSpace = width - thumbnailsWidth;
|
||||
|
||||
let wsTmbX = availSpace / 2;
|
||||
wsTmbX -= opt.SEC_WS_TMB_POSITION_ADJUSTMENT * wsTmbX;
|
||||
|
||||
childBox.set_origin(Math.round(wsTmbX), Math.round(wsTmbY));
|
||||
childBox.set_size(thumbnailsWidth, thumbnailsHeight);
|
||||
childBox.set_origin(wsTmbX, wsTmbY);
|
||||
childBox.set_size(wsTmbWidth, wsTmbHeight);
|
||||
this._thumbnails.allocate(childBox);
|
||||
}
|
||||
|
||||
|
@ -657,7 +655,7 @@ const SecondaryMonitorDisplayHorizontal = {
|
|||
} = this._overviewAdjustment.getStateTransitionParams();
|
||||
|
||||
let workspacesBox;
|
||||
const workspaceParams = [contentBox, thumbnailsHeight, spacing, startY, this._panelHeight];
|
||||
const workspaceParams = [contentBox, workArea, wsTmbHeight, spacing];
|
||||
if (!transitioning) {
|
||||
workspacesBox =
|
||||
this._getWorkspacesBoxForState(currentState, ...workspaceParams);
|
||||
|
@ -805,6 +803,17 @@ const WorkspacesDisplayCommon = {
|
|||
}),
|
||||
this._overviewAdjustment);
|
||||
Main.layoutManager.overviewGroup.add_child(view);
|
||||
|
||||
if (opt.CLICK_EMPTY_CLOSE) {
|
||||
// Allow users to close the overview by clicking on an empty space on the secondary monitor
|
||||
// The primary monitor overview is handled in the overviewControls
|
||||
const clickAction = new Clutter.ClickAction();
|
||||
clickAction.connect('clicked', () => {
|
||||
Main.overview.hide();
|
||||
});
|
||||
view.reactive = true;
|
||||
view.add_action(clickAction);
|
||||
}
|
||||
}
|
||||
|
||||
this._workspacesViews.push(view);
|
||||
|
|
25
extensions/46/vertical-workspaces/meson.build
Normal file
25
extensions/46/vertical-workspaces/meson.build
Normal file
|
@ -0,0 +1,25 @@
|
|||
project('vertical-workspaces')
|
||||
|
||||
gnome = import('gnome')
|
||||
i18n = import('i18n')
|
||||
|
||||
uuid = 'vertical-workspaces@G-dH.github.com'
|
||||
rdnn = 'org.gnome.shell.extensions.vertical-workspaces'
|
||||
|
||||
datadir = get_option('datadir')
|
||||
extension_dir = datadir / 'gnome-shell' / 'extensions' / uuid
|
||||
|
||||
install_data(
|
||||
[
|
||||
'extension.js',
|
||||
'metadata.json',
|
||||
'prefs.js',
|
||||
'stylesheet.css',
|
||||
],
|
||||
install_dir : extension_dir,
|
||||
)
|
||||
|
||||
install_subdir('lib', install_dir : extension_dir)
|
||||
|
||||
subdir('schemas')
|
||||
subdir('po')
|
|
@ -4,7 +4,8 @@
|
|||
"description": "Customize your GNOME Shell UX to suit your workflow, whether you like horizontally or vertically stacked workspaces.",
|
||||
"shell-version": [
|
||||
"45",
|
||||
"46"
|
||||
"46",
|
||||
"47"
|
||||
],
|
||||
"session-modes": [
|
||||
"user",
|
||||
|
@ -16,7 +17,6 @@
|
|||
},
|
||||
"gettext-domain": "vertical-workspaces",
|
||||
"settings-schema": "org.gnome.shell.extensions.vertical-workspaces",
|
||||
"version-name": "46.1",
|
||||
"version": 999
|
||||
"version-name": "46.4"
|
||||
}
|
||||
|
||||
|
|
2
extensions/46/vertical-workspaces/po/LINGUAS
Normal file
2
extensions/46/vertical-workspaces/po/LINGUAS
Normal file
|
@ -0,0 +1,2 @@
|
|||
cs
|
||||
nl
|
File diff suppressed because it is too large
Load diff
1
extensions/46/vertical-workspaces/po/meson.build
Normal file
1
extensions/46/vertical-workspaces/po/meson.build
Normal file
|
@ -0,0 +1 @@
|
|||
i18n.gettext('vertical-workspaces', preset : 'glib')
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
6
extensions/46/vertical-workspaces/schemas/meson.build
Normal file
6
extensions/46/vertical-workspaces/schemas/meson.build
Normal file
|
@ -0,0 +1,6 @@
|
|||
schema = rdnn + '.gschema.xml'
|
||||
schema_dir = datadir / 'glib-2.0' / 'schemas'
|
||||
|
||||
install_data(schema, install_dir : schema_dir)
|
||||
|
||||
gnome.post_install(glib_compile_schemas : true)
|
|
@ -14,10 +14,10 @@
|
|||
<default>350</default>
|
||||
</key>
|
||||
<key type="i" name="ws-preview-scale">
|
||||
<default>100</default>
|
||||
<default>95</default>
|
||||
</key>
|
||||
<key type="i" name="secondary-ws-preview-scale">
|
||||
<default>100</default>
|
||||
<default>95</default>
|
||||
</key>
|
||||
<key type="b" name="secondary-ws-preview-shift">
|
||||
<default>false</default>
|
||||
|
@ -77,7 +77,7 @@
|
|||
<default>13</default>
|
||||
</key>
|
||||
<key type="i" name="dash-max-icon-size">
|
||||
<default>48</default>
|
||||
<default>0</default>
|
||||
</key>
|
||||
<key type="i" name="dash-bg-opacity">
|
||||
<default>20</default>
|
||||
|
@ -89,7 +89,7 @@
|
|||
<default>18</default>
|
||||
</key>
|
||||
<key type="b" name="dash-bg-gs3-style">
|
||||
<default>true</default>
|
||||
<default>false</default>
|
||||
</key>
|
||||
<key type="i" name="running-dot-style">
|
||||
<default>1</default>
|
||||
|
@ -155,10 +155,10 @@
|
|||
<default>0</default>
|
||||
</key>
|
||||
<key type="i" name="search-icon-size">
|
||||
<default>96</default>
|
||||
<default>0</default>
|
||||
</key>
|
||||
<key type="i" name="search-width-scale">
|
||||
<default>104</default>
|
||||
<default>100</default>
|
||||
</key>
|
||||
<key type="i" name="app-grid-icon-size">
|
||||
<default>-1</default>
|
||||
|
@ -190,8 +190,11 @@
|
|||
<key type="i" name="app-grid-spacing">
|
||||
<default>12</default>
|
||||
</key>
|
||||
<key type="i" name="app-grid-folder-spacing">
|
||||
<default>12</default>
|
||||
</key>
|
||||
<key type="b" name="app-grid-incomplete-pages">
|
||||
<default>true</default>
|
||||
<default>false</default>
|
||||
</key>
|
||||
<key type="i" name="app-grid-names">
|
||||
<default>1</default>
|
||||
|
@ -208,6 +211,12 @@
|
|||
<key type="i" name="app-grid-page-width-scale">
|
||||
<default>90</default>
|
||||
</key>
|
||||
<key type="i" name="app-grid-page-height-scale">
|
||||
<default>90</default>
|
||||
</key>
|
||||
<key type="b" name="app-grid-show-page-arrows">
|
||||
<default>true</default>
|
||||
</key>
|
||||
<key type="i" name="dash-show-windows-before-activation">
|
||||
<default>1</default>
|
||||
</key>
|
||||
|
@ -232,6 +241,9 @@
|
|||
<key type="i" name="search-max-results-rows">
|
||||
<default>5</default>
|
||||
</key>
|
||||
<key type="i" name="search-app-grid-mode">
|
||||
<default>0</default>
|
||||
</key>
|
||||
<key type="i" name="panel-visibility">
|
||||
<default>0</default>
|
||||
</key>
|
||||
|
@ -301,6 +313,9 @@
|
|||
<key type="i" name="overview-esc-behavior">
|
||||
<default>0</default>
|
||||
</key>
|
||||
<key type="b" name="click-empty-close">
|
||||
<default>false</default>
|
||||
</key>
|
||||
<key type="b" name="new-window-focus-fix">
|
||||
<default>false</default>
|
||||
</key>
|
||||
|
@ -308,11 +323,14 @@
|
|||
<default>false</default>
|
||||
</key>
|
||||
<key type="b" name="app-grid-performance">
|
||||
<default>true</default>
|
||||
<default>false</default>
|
||||
</key>
|
||||
<key name='highlighting-style' type='i'>
|
||||
<default>1</default>
|
||||
</key>
|
||||
<key type="b" name="delay-startup">
|
||||
<default>false</default>
|
||||
</key>
|
||||
|
||||
<key type="b" name="workspace-switcher-popup-module">
|
||||
<default>true</default>
|
||||
|
@ -381,7 +399,7 @@
|
|||
'workspaceThumbnailsPosition': '1',
|
||||
'wsMaxSpacing': '350',
|
||||
'wsPreviewScale': '95',
|
||||
'secWsPreviewScale': '100',
|
||||
'secWsPreviewScale': '95',
|
||||
'secWsPreviewShift': 'false',
|
||||
'wsThumbnailsFull': 'false',
|
||||
'secWsThumbnailsPosition': '2',
|
||||
|
@ -392,7 +410,7 @@
|
|||
'showWsTmbLabelsOnHover': 'false',
|
||||
'closeWsButtonMode': '2',
|
||||
'secWsTmbPositionAdjust': '-80',
|
||||
'dashMaxIconSize': '64',
|
||||
'dashMaxIconSize': '0',
|
||||
'centerDashToWs': 'false',
|
||||
'showAppsIconPosition': '1',
|
||||
'wsThumbnailScale': '13',
|
||||
|
@ -406,7 +424,6 @@
|
|||
'dashBgRadius': '0',
|
||||
'dashBgGS3Style': 'true',
|
||||
'runningDotStyle': '1',
|
||||
'enablePageShortcuts': 'false',
|
||||
'showWsSwitcherBg': 'true',
|
||||
'showWsPreviewBg': 'false',
|
||||
'wsPreviewBgRadius': '30',
|
||||
|
@ -426,8 +443,8 @@
|
|||
'overviewMode': '0',
|
||||
'wsSwitcherMode': '0',
|
||||
'workspaceSwitcherAnimation': '1',
|
||||
'searchIconSize': '96',
|
||||
'searchViewScale': '104',
|
||||
'searchIconSize': '0',
|
||||
'searchViewScale': '100',
|
||||
'appGridIconSize': '-1',
|
||||
'appGridColumns': '0',
|
||||
'appGridRows': '0',
|
||||
|
@ -442,11 +459,15 @@
|
|||
'appGridNamesMode': '1',
|
||||
'appGridActivePreview': 'false',
|
||||
'appGridFolderCenter': 'false',
|
||||
'appGridPageWidthScale': '100',
|
||||
'appGridPageWidthScale': '90',
|
||||
'appGridPageHeightScale': '90',
|
||||
'appGridSpacing': '12',
|
||||
'appGridFolderSpacing': '12',
|
||||
'appGridShowPageArrows': 'false',
|
||||
'searchWindowsOrder': '1',
|
||||
'searchFuzzy': 'false',
|
||||
'searchMaxResultsRows': '5',
|
||||
'searchAppGridMode': '0',
|
||||
'dashShowWindowsBeforeActivation': '1',
|
||||
'dashIconScroll': '1',
|
||||
'dashIsolateWorkspaces': 'false',
|
||||
|
@ -476,7 +497,6 @@
|
|||
'overviewEscBehavior': '0',
|
||||
'newWindowFocusFix': 'false',
|
||||
'newWindowMonitorFix': '0',
|
||||
'appGridPerformance': 'true',
|
||||
'highlightingStyle': '1',
|
||||
|
||||
'workspaceSwitcherPopupModule': 'true',
|
||||
|
@ -506,8 +526,8 @@
|
|||
<default>{
|
||||
'workspaceThumbnailsPosition': '5',
|
||||
'wsMaxSpacing': '80',
|
||||
'wsPreviewScale': '100',
|
||||
'secWsPreviewScale': '100',
|
||||
'wsPreviewScale': '95',
|
||||
'secWsPreviewScale': '95',
|
||||
'secWsPreviewShift': 'false',
|
||||
'wsThumbnailsFull': 'false',
|
||||
'secWsThumbnailsPosition': '2',
|
||||
|
@ -518,7 +538,7 @@
|
|||
'showWsTmbLabelsOnHover': 'false',
|
||||
'closeWsButtonMode': '2',
|
||||
'secWsTmbPositionAdjust': '0',
|
||||
'dashMaxIconSize': '64',
|
||||
'dashMaxIconSize': '0',
|
||||
'centerDashToWs': 'false',
|
||||
'showAppsIconPosition': '1',
|
||||
'wsThumbnailScale': '5',
|
||||
|
@ -532,7 +552,6 @@
|
|||
'dashBgRadius': '0',
|
||||
'dashBgGS3Style': 'false',
|
||||
'runningDotStyle': '1',
|
||||
'enablePageShortcuts': 'true',
|
||||
'showWsSwitcherBg': 'false',
|
||||
'showWsPreviewBg': 'true',
|
||||
'wsPreviewBgRadius': '30',
|
||||
|
@ -552,8 +571,8 @@
|
|||
'overviewMode': '0',
|
||||
'wsSwitcherMode': '0',
|
||||
'workspaceSwitcherAnimation': '0',
|
||||
'searchIconSize': '96',
|
||||
'searchViewScale': '104',
|
||||
'searchIconSize': '0',
|
||||
'searchViewScale': '100',
|
||||
'appGridIconSize': '-1',
|
||||
'appGridColumns': '0',
|
||||
'appGridRows': '0',
|
||||
|
@ -568,11 +587,15 @@
|
|||
'appGridNamesMode': '1',
|
||||
'appGridActivePreview': 'false',
|
||||
'appGridFolderCenter': 'true',
|
||||
'appGridPageWidthScale': '90',
|
||||
'appGridPageWidthScale': '80',
|
||||
'appGridPageHeightScale': '90',
|
||||
'appGridSpacing': '12',
|
||||
'appGridFolderSpacing': '12',
|
||||
'appGridShowPageArrows': 'true',
|
||||
'searchWindowsOrder': '1',
|
||||
'searchFuzzy': 'false',
|
||||
'searchMaxResultsRows': '5',
|
||||
'searchAppGridMode': '0',
|
||||
'dashShowWindowsBeforeActivation': '1',
|
||||
'dashIconScroll': '1',
|
||||
'dashIsolateWorkspaces': 'false',
|
||||
|
@ -602,7 +625,6 @@
|
|||
'overviewEscBehavior': '0',
|
||||
'newWindowFocusFix': 'false',
|
||||
'newWindowMonitorFix': '0',
|
||||
'appGridPerformance': 'true',
|
||||
'highlightingStyle': '1',
|
||||
|
||||
'workspaceSwitcherPopupModule': 'true',
|
||||
|
@ -633,7 +655,7 @@
|
|||
'workspaceThumbnailsPosition': '0',
|
||||
'wsMaxSpacing': '350',
|
||||
'wsPreviewScale': '95',
|
||||
'secWsPreviewScale': '100',
|
||||
'secWsPreviewScale': '95',
|
||||
'secWsPreviewShift': 'false',
|
||||
'wsThumbnailsFull': 'false',
|
||||
'secWsThumbnailsPosition': '2',
|
||||
|
@ -643,8 +665,8 @@
|
|||
'showWsTmbLabels': '3',
|
||||
'showWsTmbLabelsOnHover': 'false',
|
||||
'closeWsButtonMode': '2',
|
||||
'secWsTmbPositionAdjust': '0',
|
||||
'dashMaxIconSize': '48',
|
||||
'secWsTmbPositionAdjust': '-100',
|
||||
'dashMaxIconSize': '0',
|
||||
'centerDashToWs': 'false',
|
||||
'showAppsIconPosition': '0',
|
||||
'wsThumbnailScale': '13',
|
||||
|
@ -658,7 +680,6 @@
|
|||
'dashBgRadius': '0',
|
||||
'dashBgGS3Style': 'false',
|
||||
'runningDotStyle': '1',
|
||||
'enablePageShortcuts': 'true',
|
||||
'showWsSwitcherBg': 'false',
|
||||
'showWsPreviewBg': 'true',
|
||||
'wsPreviewBgRadius': '30',
|
||||
|
@ -678,8 +699,8 @@
|
|||
'overviewMode': '1',
|
||||
'wsSwitcherMode': '0',
|
||||
'workspaceSwitcherAnimation': '1',
|
||||
'searchIconSize': '96',
|
||||
'searchViewScale': '104',
|
||||
'searchIconSize': '0',
|
||||
'searchViewScale': '100',
|
||||
'appGridIconSize': '-1',
|
||||
'appGridColumns': '0',
|
||||
'appGridRows': '0',
|
||||
|
@ -687,7 +708,7 @@
|
|||
'appGridFolderColumns': '0',
|
||||
'appGridFolderRows': '0',
|
||||
'appGridFolderIconGrid': '3',
|
||||
'appGridContent': '0',
|
||||
'appGridContent': '2',
|
||||
'appGridIncompletePages': 'false',
|
||||
'appGridOrder': '0',
|
||||
'appFolderOrder': '0',
|
||||
|
@ -695,10 +716,14 @@
|
|||
'appGridActivePreview': 'true',
|
||||
'appGridFolderCenter': 'false',
|
||||
'appGridPageWidthScale': '90',
|
||||
'appGridPageHeightScale': '90',
|
||||
'appGridSpacing': '12',
|
||||
'appGridFolderSpacing': '12',
|
||||
'appGridShowPageArrows': 'false',
|
||||
'searchWindowsOrder': '1',
|
||||
'searchFuzzy': 'false',
|
||||
'searchMaxResultsRows': '5',
|
||||
'searchAppGridMode': '0',
|
||||
'dashShowWindowsBeforeActivation': '1',
|
||||
'dashIconScroll': '1',
|
||||
'dashIsolateWorkspaces': 'false',
|
||||
|
@ -728,7 +753,6 @@
|
|||
'overviewEscBehavior': '0',
|
||||
'newWindowFocusFix': 'false',
|
||||
'newWindowMonitorFix': '0',
|
||||
'appGridPerformance': 'true',
|
||||
'highlightingStyle': '1',
|
||||
|
||||
'workspaceSwitcherPopupModule': 'true',
|
||||
|
@ -759,7 +783,7 @@
|
|||
'workspaceThumbnailsPosition': '6',
|
||||
'wsMaxSpacing': '65',
|
||||
'wsPreviewScale': '95',
|
||||
'secWsPreviewScale': '100',
|
||||
'secWsPreviewScale': '95',
|
||||
'secWsPreviewShift': 'false',
|
||||
'wsThumbnailsFull': 'false',
|
||||
'secWsThumbnailsPosition': '2',
|
||||
|
@ -770,7 +794,7 @@
|
|||
'showWsTmbLabelsOnHover': 'false',
|
||||
'closeWsButtonMode': '2',
|
||||
'secWsTmbPositionAdjust': '0',
|
||||
'dashMaxIconSize': '48',
|
||||
'dashMaxIconSize': '0',
|
||||
'centerDashToWs': 'false',
|
||||
'showAppsIconPosition': '1',
|
||||
'wsThumbnailScale': '10',
|
||||
|
@ -784,7 +808,6 @@
|
|||
'dashBgRadius': '0',
|
||||
'dashBgGS3Style': 'false',
|
||||
'runningDotStyle': '1',
|
||||
'enablePageShortcuts': 'true',
|
||||
'showWsSwitcherBg': 'true',
|
||||
'showWsPreviewBg': 'true',
|
||||
'wsPreviewBgRadius': '30',
|
||||
|
@ -804,8 +827,8 @@
|
|||
'overviewMode': '2',
|
||||
'wsSwitcherMode': '0',
|
||||
'workspaceSwitcherAnimation': '1',
|
||||
'searchIconSize': '96',
|
||||
'searchViewScale': '104',
|
||||
'searchIconSize': '0',
|
||||
'searchViewScale': '100',
|
||||
'appGridIconSize': '-1',
|
||||
'appGridColumns': '0',
|
||||
'appGridRows': '0',
|
||||
|
@ -813,18 +836,22 @@
|
|||
'appGridFolderColumns': '0',
|
||||
'appGridFolderRows': '0',
|
||||
'appGridFolderIconGrid': '3',
|
||||
'appGridContent': '0',
|
||||
'appGridContent': '2',
|
||||
'appGridIncompletePages': 'false',
|
||||
'appGridOrder': '0',
|
||||
'appFolderOrder': '0',
|
||||
'appGridNamesMode': '1',
|
||||
'appGridActivePreview': 'true',
|
||||
'appGridFolderCenter': 'false',
|
||||
'appGridPageWidthScale': '90',
|
||||
'appGridSpacing': '5',
|
||||
'appGridPageWidthScale': '80',
|
||||
'appGridPageHeightScale': '90',
|
||||
'appGridSpacing': '12',
|
||||
'appGridFolderSpacing': '12',
|
||||
'appGridShowPageArrows': 'true',
|
||||
'searchWindowsOrder': '1',
|
||||
'searchFuzzy': 'false',
|
||||
'searchMaxResultsRows': '5',
|
||||
'searchAppGridMode': '0',
|
||||
'dashShowWindowsBeforeActivation': '1',
|
||||
'dashIconScroll': '1',
|
||||
'dashIsolateWorkspaces': 'false',
|
||||
|
@ -854,7 +881,6 @@
|
|||
'overviewEscBehavior': '0',
|
||||
'newWindowFocusFix': 'false',
|
||||
'newWindowMonitorFix': '0',
|
||||
'appGridPerformance': 'true',
|
||||
'highlightingStyle': '1',
|
||||
|
||||
'workspaceSwitcherPopupModule': 'true',
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
to cover the spacing between dash and the edge of the screen
|
||||
so the icons will be selectable even at the edge
|
||||
this spacing must be accounted for in overview allocate() */
|
||||
padding-right: 16px;
|
||||
padding-left: 16px;
|
||||
padding-right: 24px;
|
||||
padding-left: 24px;
|
||||
/*spacing between icons*/
|
||||
padding-top: 1px;
|
||||
padding-bottom: 1px;
|
||||
|
@ -35,12 +35,11 @@
|
|||
padding: 5px 0;
|
||||
}
|
||||
|
||||
#dash.vertical .app-well-app-running-dot,
|
||||
#dash.vertical .app-grid-running-dot {
|
||||
#dash.vertical .app-well-app-running-dot {
|
||||
margin: 4px 0px;
|
||||
}
|
||||
|
||||
#dash.vertical .app-well-app-running-dot-custom {
|
||||
#dash.vertical .app-grid-running-dot-custom {
|
||||
margin: 4px 0px;
|
||||
width: 2px;
|
||||
height: 16px;
|
||||
|
@ -65,14 +64,14 @@
|
|||
}
|
||||
|
||||
#dash.vertical-gs3-left {
|
||||
margin-right: 6px;
|
||||
margin-right: 12px;
|
||||
margin-left: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
#dash.vertical-gs3-right {
|
||||
margin-right: 0px;
|
||||
margin-left: 6px;
|
||||
margin-left: 12px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
|
@ -94,11 +93,14 @@
|
|||
border-color: rgba(150, 150, 150, 0.4);
|
||||
}
|
||||
|
||||
.app-well-app-running-dot-custom {
|
||||
.app-grid-running-dot-custom {
|
||||
width: 16px;
|
||||
height: 2px;
|
||||
}
|
||||
|
||||
.dash-label {
|
||||
border-radius: 14px;
|
||||
}
|
||||
|
||||
/* add shadow to the app grid app label to be readable if it overlaps light icon below */
|
||||
.overview-icon-with-label, .folder-name-label {
|
||||
|
@ -139,14 +141,32 @@
|
|||
|
||||
/* app grid page indicators */
|
||||
.page-indicator-icon {
|
||||
margin: 10px 10px 10px 10px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.page-indicator {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.page-indicators {
|
||||
spacing: 20px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.page-indicators-horizontal {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.page-indicators-vertical {
|
||||
margin-left: 0px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.search-entry{
|
||||
margin: 0;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 6px;
|
||||
background-color: rgba(200, 200, 200, 0.1);
|
||||
color: white;
|
||||
border-color: rgba(160, 160, 160, 0.4);
|
||||
|
@ -158,7 +178,7 @@
|
|||
|
||||
.search-entry:hover,
|
||||
.search-entry:focus {
|
||||
background-color: rgba(200, 200, 200, 0.2);
|
||||
background-color: rgba(200, 200, 200, 0.1);
|
||||
}
|
||||
|
||||
.search-entry-om2 {
|
||||
|
@ -177,26 +197,26 @@
|
|||
border-radius: 26px;
|
||||
border: 1px, rgb(60, 60, 60);
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.search-section-content-bg-om2 {
|
||||
background-color: rgb(40, 40, 40);
|
||||
}
|
||||
|
||||
.search-section-content {
|
||||
background-color: rgba(200, 200, 200, 0.1);
|
||||
}
|
||||
|
||||
/* Reduce edge fading of search results scroll view */
|
||||
.vfade { -st-vfade-offset: 34px; }
|
||||
.hfade { -st-hfade-offset: 34px; }
|
||||
|
||||
StButton#vhandle,
|
||||
.search-section-content {
|
||||
background-color: rgba(200, 200, 200, 0.1);
|
||||
background-color: rgba(200, 200, 200, 0.08);
|
||||
border: solid 1px rgba(150, 150, 150, 0.3);
|
||||
}
|
||||
|
||||
.search-section {
|
||||
spacing: 12px;
|
||||
}
|
||||
|
||||
/* "no results" / "searching..." text*/
|
||||
.search-statustext, .search-statustext-om2 {
|
||||
background-color: rgba(200, 200, 200, 0.1);
|
||||
background-color: rgba(200, 200, 200, 0.08);
|
||||
color: white;
|
||||
margin-top: 50px;
|
||||
padding: 30px;
|
||||
|
@ -215,12 +235,9 @@
|
|||
|
||||
/* reduce spacing between app icons in search results */
|
||||
.grid-search-results {
|
||||
spacing: 4px;
|
||||
}
|
||||
|
||||
/* hide vertical scroll bar, it's distracting in the search results */
|
||||
StButton#vhandle {
|
||||
background-color: transparent;
|
||||
spacing: 8px;
|
||||
margin-left: 12px;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.show-apps-icon-horizontal-hide {
|
||||
|
@ -257,6 +274,20 @@ StButton#vhandle {
|
|||
height: 18px;
|
||||
}
|
||||
|
||||
.prev-page-indicator {
|
||||
background-gradient-start: transparent;
|
||||
background-gradient-end: rgba(255, 255, 255, 0.05);
|
||||
background-gradient-direction: vertical;
|
||||
border-radius: 0px 0px 30px 30px;
|
||||
}
|
||||
.next-page-indicator {
|
||||
background-gradient-start: rgba(255, 255, 255, 0.05);
|
||||
background-gradient-end: transparent;
|
||||
background-gradient-direction: vertical;
|
||||
border-radius: 30px 30px 0px 0px;
|
||||
|
||||
}
|
||||
|
||||
/* reduce size of hot corner ripples to half */
|
||||
.ripple-box {
|
||||
width: 26px;
|
||||
|
@ -268,84 +299,80 @@ StButton#vhandle {
|
|||
margin-bottom: 8em; /* avoid overlap with dock extension */
|
||||
}
|
||||
|
||||
.app-folder-46,
|
||||
.app-folder-46 .overview-tile,
|
||||
.app-folder-46 .overview-icon,
|
||||
.app-folder-45 .overview-icon,
|
||||
.edit-folder-button,
|
||||
.folder-name-entry {
|
||||
background-color: rgba(200, 200, 200, 0.08);
|
||||
}
|
||||
|
||||
.app-folder-dialog-vshell {
|
||||
background-color: rgba(200, 200, 200, 0.08);
|
||||
.app-folder-dialog-container {
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
.app-folder-dialog {
|
||||
border-color: rgba(160, 160, 160, 0.3);
|
||||
}
|
||||
|
||||
.edit-folder-button:hover,
|
||||
.app-folder-46:hover,
|
||||
.app-folder-45:hover .overview-icon,
|
||||
.app-folder-45:focus .overview-icon {
|
||||
background-color: rgba(200, 200, 200, 0.15);
|
||||
}
|
||||
|
||||
/* add missing spacing between buttons */
|
||||
.edit-folder-button-46 {
|
||||
margin-right: 6px;
|
||||
.folder-name-container {
|
||||
spacing: 12px;
|
||||
}
|
||||
|
||||
/* 46 changes the default bg color from transparent to the solid color blending with widget background */
|
||||
.search-provider-icon,
|
||||
.list-search-result,
|
||||
.overview-tile {
|
||||
#dash.dash-46 .show-apps,
|
||||
#dash.dash-46 .overview-tile,
|
||||
#dash.dash-46 .overview-icon,
|
||||
.app-folder-45 .overview-icon, /* 45 only */
|
||||
.app-folder-46 .overview-icon,
|
||||
.page-navigation-arrow,
|
||||
.search-provider-icon,
|
||||
.list-search-result,
|
||||
.grid-search-result,
|
||||
.overview-tile {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/* Needed only for 46+, but doesn't hurt 45 */
|
||||
.search-provider-icon:hover,
|
||||
.search-provider-icon:focus,
|
||||
.search-provider-icon:selected,
|
||||
.list-search-result:hover,
|
||||
.list-search-result:focus,
|
||||
.list-search-result:selected,
|
||||
.overview-tile:hover,
|
||||
.overview-tile:focus,
|
||||
.overview-tile:selected,
|
||||
.overview-icon:hover,
|
||||
.overview-icon:focus,
|
||||
.overview-icon:selected {
|
||||
background-color: rgba(200, 200, 200, 0.15);
|
||||
#dash.dash-46 .overview-tile:hover .overview-icon,
|
||||
#dash.dash-46 .overview-tile:focus .overview-icon,
|
||||
#dash.dash-46 .overview-tile:selected .overview-icon,
|
||||
#dash.dash-46 .show-apps:hover .overview-icon,
|
||||
#dash.dash-46 .show-apps:focus .overview-icon,
|
||||
#dash.dash-46 .show-apps:selected .overview-icon,
|
||||
.edit-folder-button:hover,
|
||||
.page-navigation-arrow:hover,
|
||||
.search-provider-icon:hover,
|
||||
.search-provider-icon:focus,
|
||||
.search-provider-icon:selected,
|
||||
.list-search-result:hover,
|
||||
.list-search-result:focus,
|
||||
.list-search-result:selected,
|
||||
.app-display-46 .overview-tile:hover,
|
||||
.app-display-46 .overview-tile:focus,
|
||||
.app-display-46 .overview-tile:selected,
|
||||
.app-folder-46:hover,
|
||||
.app-folder-45:hover .overview-icon,
|
||||
.app-folder-45:focus .overview-icon,
|
||||
#searchResults .overview-tile:hover,
|
||||
#searchResults .overview-tile:focus,
|
||||
#searchResults .overview-tile:selected,
|
||||
.grid-search-result-46:hover,
|
||||
.grid-search-result-46:focus,
|
||||
.grid-search-result-46:selected,
|
||||
.app-folder-dialog .overview-tile:hover,
|
||||
.app-folder-dialog .overview-tile:focus,
|
||||
.app-folder-dialog .overview-tile:selected,
|
||||
.overview-icon:hover,
|
||||
.overview-icon:focus,
|
||||
.overview-icon:selected {
|
||||
background-color: rgba(200, 200, 200, 0.15);
|
||||
}
|
||||
|
||||
.overview-tile:drop, /* 46 needs to add color so the highlighting style is visible on the app folder preview */
|
||||
.app-folder-dialog,
|
||||
.edit-folder-button,
|
||||
.folder-name-entry,
|
||||
.app-folder-46,
|
||||
.app-folder-46 .overview-tile,
|
||||
.app-folder-45 .overview-icon, /* 45 only */
|
||||
.app-folder-45 .overview-icon,
|
||||
.edit-folder-button,
|
||||
.folder-name-entry {
|
||||
background-color: rgba(200, 200, 200, 0.08);
|
||||
}
|
||||
|
||||
.app-folder-46 .overview-icon,
|
||||
#dash.dash-46 .overview-icon {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#dash.dash-46 .overview-tile,
|
||||
#dash.dash-46 .show-apps {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#dash.dash-46 .overview-tile:hover .overview-icon,
|
||||
#dash.dash-46 .overview-tile:focus .overview-icon,
|
||||
#dash.dash-46 .overview-tile:selected .overview-icon,
|
||||
#dash.dash-46 .show-apps:hover .overview-icon,
|
||||
#dash.dash-46 .show-apps:focus .overview-icon,
|
||||
#dash.dash-46 .show-apps:selected .overview-icon {
|
||||
background-color: rgba(200, 200, 200, 0.15);
|
||||
}
|
||||
|
||||
#dash.vertical-46 {
|
||||
margin: 0px;
|
||||
|
@ -354,10 +381,12 @@ StButton#vhandle {
|
|||
|
||||
#dash.vertical-46-gs3-left {
|
||||
margin-left: 0px;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
#dash.vertical-46-gs3-right {
|
||||
margin-right: 0px;
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
#dash.vertical-46 .overview-tile,
|
||||
|
@ -365,7 +394,7 @@ StButton#vhandle {
|
|||
margin: 0px;
|
||||
background-color: transparent;
|
||||
/* this padding should keep the dash 6px from the screen edge */
|
||||
padding: 0, 18px;
|
||||
padding: 0, 24px;
|
||||
}
|
||||
|
||||
#dash.vertical-46 .dash-separator {
|
||||
|
@ -376,10 +405,16 @@ StButton#vhandle {
|
|||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
#dash.vertical-46 .app-well-app-running-dot-custom {
|
||||
#dash.vertical-46 .app-grid-running-dot {
|
||||
margin: 0px;
|
||||
offset-y: 0;
|
||||
}
|
||||
|
||||
#dash.vertical-46 .app-grid-running-dot-custom {
|
||||
margin: 0px;
|
||||
width: 2px;
|
||||
height: 16px;
|
||||
offset-y: 0;
|
||||
}
|
||||
|
||||
#dash.vertical-46 .dash-background {
|
||||
|
@ -411,4 +446,4 @@ StButton#vhandle {
|
|||
/* reverse padding */
|
||||
.ws-switcher-vertical {
|
||||
padding: 18px 12px
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue