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) {
53
53
if (HttpLogin .isEnabledJcef ()) {
54
54
okAction = new OkAction () {
55
55
};
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
+ }
57
61
jcefPanel .getComponent ().setMinimumSize (new Dimension (1000 , 500 ));
58
62
jcefPanel .getComponent ().setPreferredSize (new Dimension (1000 , 500 ));
59
63
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 {
145
149
146
150
private Action okAction ;
147
151
152
+ public JcefPanel (Project project , Action okAction , boolean old ) {
153
+ super ( null );
154
+ this .project = project ;
155
+ this .okAction = okAction ;
156
+ init ();
157
+ }
158
+
148
159
public JcefPanel (Project project , Action okAction ) {
149
160
super (null , null );
150
161
this .project = project ;
151
162
this .okAction = okAction ;
163
+ init ();
164
+ }
165
+
166
+ private void init (){
152
167
getJBCefClient ().addLoadHandler (cefLoadHandler = new CefLoadHandlerAdapter () {
153
168
154
169
boolean successDispose = false ;
You can’t perform that action at this time.
0 commit comments