Browse Source

Allow service bar to be snapped to any side

Top, left, bottom, right.
pull/1622/head
Kevin Tran 7 years ago
parent
commit
caf47c7051
  1. 7
      app/view/main/MainController.js
  2. 23
      app/view/preferences/Preferences.js
  3. 2
      electron/main.js

7
app/view/main/MainController.js

@ -6,12 +6,7 @@ Ext.define('Rambox.view.main.MainController', {
,initialize: function( tabPanel ) {
const config = ipc.sendSync('getConfig');
if ( config.left_tabbar === true ) {
tabPanel.setTabPosition('left');
} else {
tabPanel.setTabPosition('top');
}
tabPanel.setTabPosition(config.tabbar_location);
tabPanel.setTabRotation(0);
}

23
app/view/preferences/Preferences.js

@ -147,10 +147,25 @@ Ext.define('Rambox.view.preferences.Preferences',{
,hidden: process.platform === 'darwin'
}
,{
xtype: 'checkbox'
,name: 'left_tabbar'
,boxLabel: 'Vertical service bar'
,value: config.left_tabbar
xtype: 'combo'
,name: 'tabbar_location'
,fieldLabel: 'Service bar location'
,labelAlign: 'left'
,width: 380
,labelWidth: 105
,value: config.tabbar_location
,displayField: 'label'
,valueField: 'value'
,editable: false
,store: Ext.create('Ext.data.Store', {
fields: ['value', 'label']
,data: [
{ 'value': 'top', 'label': 'Top' }
,{ 'value': 'left', 'label': 'Left' }
,{ 'value': 'bottom', 'label': 'Bottom' }
,{ 'value': 'right', 'label': 'Right' }
]
})
}
,{
xtype: 'combo'

2
electron/main.js

@ -20,7 +20,7 @@ const config = new Config({
defaults: {
always_on_top: false
,hide_menu_bar: false
,left_tabbar: false
,tabbar_location: 'top'
,window_display_behavior: 'taskbar_tray'
,auto_launch: !isDev
,flash_frame: true

Loading…
Cancel
Save