Browse Source

Add orientation check for tab bar on initialize.

pull/1622/head
Kevin Tran 7 years ago
parent
commit
a51f1bb8e4
  1. 1
      app/view/main/Main.js
  2. 10
      app/view/main/MainController.js

1
app/view/main/Main.js

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

10
app/view/main/MainController.js

@ -3,6 +3,16 @@ Ext.define('Rambox.view.main.MainController', {
,alias: 'controller.main' ,alias: 'controller.main'
,initialize: function( tabPanel ) {
const config = ipc.sendSync('getConfig');
if ( config.left_tabbar === true ) {
const mainView = Ext.cq1('app-main');
mainView.setTabPosition('left');
mainView.setTabRotation(0);
}
}
// Make focus on webview every time the user change tabs, to enable the autofocus in websites // Make focus on webview every time the user change tabs, to enable the autofocus in websites
,onTabChange: function( tabPanel, newTab, oldTab ) { ,onTabChange: function( tabPanel, newTab, oldTab ) {
var me = this; var me = this;

Loading…
Cancel
Save