@@ -192,39 +192,21 @@ class MenuBarManager {
192
192
193
193
if ( process . platform === 'win32' ) {
194
194
// Vertical or Horizontal Taskbar
195
-
196
- // Vertical Taskbar, small icon mode isn't applicable
197
- if ( trayBounds . height === 32 || trayBounds . height === 33 ) {
198
- if ( trayBounds . x <= halfScreenWidth && trayBounds . y >= halfScreenHeight ) {
199
- // Vertical Left Bottom
200
-
201
- trayPosition = 'trayBottomLeft' ;
202
- windowPosition = this . _windowPositioner . calculate ( trayPosition , trayBounds ) ;
203
- positionToSet = { x : windowPosition . x + 78 , y : windowPosition . y - 10 , } ;
204
- } else if ( trayBounds . x >= halfScreenWidth && trayBounds . y >= halfScreenHeight ) {
205
- // Vertical Right Bottom
206
-
207
- trayPosition = 'trayBottomRight' ;
195
+ console . log ( trayBounds , halfScreenWidth , halfScreenHeight , trayBounds . x >= halfScreenWidth , ( trayBounds . y >= 30 || trayBounds . y <= 110 ) ) ;
196
+
197
+ if ( ( trayBounds . x + trayBounds . width ) <= halfScreenWidth ) {
198
+ trayPosition = 'trayBottomLeft' ;
199
+ windowPosition = this . _windowPositioner . calculate ( trayPosition , trayBounds ) ;
200
+ positionToSet = { x : windowPosition . x + 78 , y : windowPosition . y - 10 , } ;
201
+ } else if ( ( trayBounds . x + trayBounds . width ) >= halfScreenWidth ) {
202
+ if ( ( trayBounds . y + trayBounds . height ) <= halfScreenHeight ) {
203
+ trayPosition = 'trayCenter' ;
208
204
windowPosition = this . _windowPositioner . calculate ( trayPosition , trayBounds ) ;
209
- positionToSet = { x : windowPosition . x - 8 , y : windowPosition . y - 10 , } ;
210
- }
211
-
212
- // Horizontal Taskbar
213
- // Supporting small or regular sized icons
214
- } else if ( trayBounds . height === 30 || trayBounds . height === 31 || trayBounds . height === 40 ) {
215
- // Is bottom or top
216
- if ( trayBounds . x >= halfScreenWidth && trayBounds . y >= halfScreenHeight ) {
217
- // Horizontal Bottom Left
218
-
205
+ positionToSet = { x : windowPosition . x , y : windowPosition . y + 8 , } ;
206
+ } else if ( ( trayBounds . y + trayBounds . height ) >= halfScreenHeight ) {
219
207
trayPosition = 'trayBottomCenter' ;
220
208
windowPosition = this . _windowPositioner . calculate ( trayPosition , trayBounds ) ;
221
209
positionToSet = { x : windowPosition . x , y : windowPosition . y - 6 , } ;
222
- } else if ( trayBounds . x >= halfScreenWidth && trayBounds . y === 0 ) {
223
- // Horizontal Top Left
224
-
225
- trayPosition = 'trayCenter' ;
226
- windowPosition = this . _windowPositioner . calculate ( trayPosition , trayBounds ) ;
227
- positionToSet = { x : windowPosition . x , y : windowPosition . y + 8 , } ;
228
210
}
229
211
}
230
212
0 commit comments