File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed
resources/electron/electron-plugin Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,10 @@ class Positioner {
7474 x : Math . floor ( screenSize . x + ( screenSize . width / 2 - windowSize [ 0 ] / 2 ) ) ,
7575 y : Math . floor ( ( screenSize . height + screenSize . y ) / 2 - windowSize [ 1 ] / 2 ) ,
7676 } ,
77+ upperCenter : {
78+ x : Math . floor ( screenSize . x + ( screenSize . width / 2 - windowSize [ 0 ] / 2 ) ) ,
79+ y : Math . floor ( screenSize . y + ( screenSize . height - windowSize [ 1 ] ) / 3 ) ,
80+ } ,
7781 } ;
7882 if ( position . substr ( 0 , 4 ) === "tray" ) {
7983 if ( positions [ position ] . x + windowSize [ 0 ] >
Original file line number Diff line number Diff line change @@ -117,6 +117,14 @@ class Positioner {
117117 ( screenSize . height + screenSize . y ) / 2 - windowSize [ 1 ] / 2 ,
118118 ) ,
119119 } ,
120+ upperCenter : {
121+ x : Math . floor (
122+ screenSize . x + ( screenSize . width / 2 - windowSize [ 0 ] / 2 ) ,
123+ ) ,
124+ y : Math . floor (
125+ screenSize . y + ( screenSize . height - windowSize [ 1 ] ) / 3 ,
126+ ) ,
127+ } ,
120128 } ;
121129
122130 // Default to right if the window is bigger than the space left.
Original file line number Diff line number Diff line change @@ -87,4 +87,9 @@ public function center(): self
8787 {
8888 return $ this ->windowPosition ('center ' );
8989 }
90+
91+ public function upperCenter (): self
92+ {
93+ return $ this ->windowPosition ('upperCenter ' );
94+ }
9095}
You can’t perform that action at this time.
0 commit comments