File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
src/main/java/com/shuzijun/leetcode/plugin/window/login Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,11 @@ public LoginPanel(@Nullable Project project) {
5353 if (HttpLogin .isEnabledJcef ()) {
5454 okAction = new OkAction () {
5555 };
56- jcefPanel = new JcefPanel (project , okAction );
56+ try {
57+ jcefPanel = new JcefPanel (project , okAction );
58+ } catch (IllegalArgumentException e ) {
59+ jcefPanel = new JcefPanel (project , okAction ,true );
60+ }
5761 jcefPanel .getComponent ().setMinimumSize (new Dimension (1000 , 500 ));
5862 jcefPanel .getComponent ().setPreferredSize (new Dimension (1000 , 500 ));
5963 panel .addToCenter (new JBScrollPane (jcefPanel .getComponent (), JBScrollPane .VERTICAL_SCROLLBAR_AS_NEEDED , JBScrollPane .HORIZONTAL_SCROLLBAR_NEVER ));
@@ -145,10 +149,21 @@ private static class JcefPanel extends JCEFHtmlPanel {
145149
146150 private Action okAction ;
147151
152+ public JcefPanel (Project project , Action okAction , boolean old ) {
153+ super ( null );
154+ this .project = project ;
155+ this .okAction = okAction ;
156+ init ();
157+ }
158+
148159 public JcefPanel (Project project , Action okAction ) {
149160 super (null , null );
150161 this .project = project ;
151162 this .okAction = okAction ;
163+ init ();
164+ }
165+
166+ private void init (){
152167 getJBCefClient ().addLoadHandler (cefLoadHandler = new CefLoadHandlerAdapter () {
153168
154169 boolean successDispose = false ;
You can’t perform that action at this time.
0 commit comments