mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
workspaceThumbnail: Sync indicator with WorkspacesDisplay
Now that both ThumbnailsBox and WorkspacesDisplay use single adjustments for controlling indicator and scrolling, create the adjustment in OverviewControls and pass it to both objects, effectively syncing indicator to scrolling. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/821
This commit is contained in:
parent
f55ff01239
commit
9c1940ef9d
4 changed files with 53 additions and 52 deletions
|
|
@ -410,23 +410,12 @@ class ExtraWorkspaceView extends WorkspacesViewBase {
|
|||
|
||||
var WorkspacesDisplay = GObject.registerClass(
|
||||
class WorkspacesDisplay extends St.Widget {
|
||||
_init() {
|
||||
_init(scrollAdjustment) {
|
||||
super._init({ clip_to_allocation: true });
|
||||
this.connect('notify::allocation', this._updateWorkspacesActualGeometry.bind(this));
|
||||
|
||||
let workspaceManager = global.workspace_manager;
|
||||
let activeWorkspaceIndex = workspaceManager.get_active_workspace_index();
|
||||
this._scrollAdjustment = new St.Adjustment({
|
||||
value: activeWorkspaceIndex,
|
||||
lower: 0,
|
||||
page_increment: 1,
|
||||
page_size: 1,
|
||||
step_increment: 0,
|
||||
upper: workspaceManager.n_workspaces,
|
||||
});
|
||||
|
||||
workspaceManager.bind_property('n-workspaces',
|
||||
this._scrollAdjustment, 'upper', GObject.BindingFlags.SYNC_CREATE);
|
||||
this._scrollAdjustment = scrollAdjustment;
|
||||
|
||||
this._switchWorkspaceId =
|
||||
global.window_manager.connect('switch-workspace',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue