Commit 9a70cd0 1 parent dbf24d0 commit 9a70cd0 Copy full SHA for 9a70cd0
File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -57,4 +57,22 @@ ig.module('ultimate-localized-ui.fixes.quest-dialog')
57
57
) ;
58
58
} ,
59
59
} ) ;
60
+
61
+ sc . QuestStartDialogButtonBox . inject ( {
62
+ init ( ...args ) {
63
+ this . parent ( ...args ) ;
64
+ let btn1 = this . acceptButton ;
65
+ let btn2 = this . declineButton ;
66
+ // left border + right border
67
+ let totalBorderWidth = this . hook . size . x - btn1 . hook . size . x ;
68
+ let prevBtnWidth = Math . max ( btn1 . hook . size . x , btn2 . hook . size . x ) ;
69
+ // This will forcibly recompute the width of the buttons
70
+ btn1 . setText ( btn1 . text , false ) ;
71
+ btn2 . setText ( btn2 . text , false ) ;
72
+ let newBtnWidth = Math . max ( prevBtnWidth , btn1 . hook . size . x , btn2 . hook . size . x ) ;
73
+ btn1 . setWidth ( newBtnWidth ) ;
74
+ btn2 . setWidth ( newBtnWidth ) ;
75
+ this . hook . size . x = newBtnWidth + totalBorderWidth ;
76
+ } ,
77
+ } ) ;
60
78
} ) ;
You can’t perform that action at this time.
0 commit comments