Browse Source

Properly reconfigure tab reorderer after redock

When the user changes the tab dock to left or right, the reorderer gets
into an inconsistent state. To solve this, the reorderer needs to be
reconfigured to look at the proper dimensions.
pull/1622/head
Kevin Tran 7 years ago
parent
commit
156e9acad4
  1. 2
      app/view/main/Main.js
  2. 9
      app/view/main/MainController.js

2
app/view/main/Main.js

@ -385,6 +385,6 @@ Ext.define('Rambox.view.main.Main', {
,add: 'updatePositions'
,remove: 'updatePositions'
,childmove: 'updatePositions'
,beforerender: 'initialize'
,boxready: 'initialize'
}
});

9
app/view/main/MainController.js

@ -8,6 +8,15 @@ Ext.define('Rambox.view.main.MainController', {
tabPanel.setTabPosition(config.tabbar_location);
tabPanel.setTabRotation(0);
let reorderer = tabPanel.plugins.find((plugin) => plugin.ptype == "tabreorderer");
if ( reorderer !== undefined ) {
const names = reorderer.container.getLayout().names;
reorderer.dd.dim = names.width;
reorderer.dd.startAttr = names.beforeX;
reorderer.dd.endAttr = names.afterX;
}
}
// Make focus on webview every time the user change tabs, to enable the autofocus in websites

Loading…
Cancel
Save