@@ -48,7 +48,7 @@ var createMenu = class extends BaseMenuLayout.BaseLayout{
4848 vertical : false
4949 } ) ;
5050
51- this . actionsBox . style = "spacing: 10px ; margin-right: 10px; padding-right: 0.4em;" ;
51+ this . actionsBox . style = "spacing: 6px ; margin-right: 10px; padding-right: 0.4em;" ;
5252 this . mainBox . add ( this . actionsBox ) ;
5353
5454 let userAvatarSize = 32 ;
@@ -60,14 +60,22 @@ var createMenu = class extends BaseMenuLayout.BaseLayout{
6060 let settingsButton = new MW . SettingsButton ( this ) ;
6161 this . actionsBox . add ( settingsButton . actor ) ;
6262
63- let userButton = new MW . UserButton ( this ) ;
64- this . actionsBox . add ( userButton . actor ) ;
65-
66- let lock = new MW . LockButton ( this ) ;
67- this . actionsBox . add ( lock . actor ) ;
68-
69- let logout = new MW . LogoutButton ( this ) ;
70- this . actionsBox . add ( logout . actor ) ;
63+ if ( this . _settings . get_boolean ( 'show-logout-button' ) ) {
64+ let logout = new MW . LogoutButton ( this ) ;
65+ this . actionsBox . add ( logout . actor ) ;
66+ }
67+ if ( this . _settings . get_boolean ( 'show-lock-button' ) ) {
68+ let lock = new MW . LockButton ( this ) ;
69+ this . actionsBox . add ( lock . actor ) ;
70+ }
71+ if ( this . _settings . get_boolean ( 'show-suspend-button' ) ) {
72+ let suspend = new MW . SuspendButton ( this ) ;
73+ this . actionsBox . add ( suspend . actor ) ;
74+ }
75+ if ( this . _settings . get_boolean ( 'show-power-button' ) ) {
76+ let power = new MW . PowerButton ( this ) ;
77+ this . actionsBox . add ( power . actor ) ;
78+ }
7179
7280 this . searchBox = new MW . SearchBox ( this ) ;
7381 this . _searchBoxChangedId = this . searchBox . connect ( 'changed' , this . _onSearchBoxChanged . bind ( this ) ) ;
0 commit comments