@@ -22,12 +22,14 @@ class ThumbnailWsmatrixPopupList extends WorkspaceSwitcherPopupList {
2222 let workArea = Main . layoutManager . getWorkAreaForMonitor ( this . _monitorIndex ) ;
2323 let themeNode = this . get_theme_node ( ) ;
2424 let spacing = themeNode . get_length ( 'spacing' ) ;
25+ let indicatorThemeNode = children [ children . length - 1 ] . get_theme_node ( ) ;
26+ let indicatorTopFullBorder = indicatorThemeNode . get_padding ( St . Side . TOP ) + indicatorThemeNode . get_border_width ( St . Side . TOP ) ;
27+ let indicatorBottomFullBorder = indicatorThemeNode . get_padding ( St . Side . BOTTOM ) + indicatorThemeNode . get_border_width ( St . Side . BOTTOM ) ;
2528
2629 let availHeight = workArea . height - themeNode . get_vertical_padding ( ) ;
2730
2831 let height = this . _rows * this . _scale * children [ 0 ] . get_height ( ) ;
29- // TODO add 2*indicator border to spacing here
30- let totalSpacing = spacing * ( this . _rows - 1 ) ;
32+ let totalSpacing = spacing * ( this . _rows - 1 ) + indicatorTopFullBorder + indicatorBottomFullBorder ;
3133
3234 height += totalSpacing ;
3335 height = Math . round ( Math . min ( height , availHeight ) ) ;
@@ -42,12 +44,14 @@ class ThumbnailWsmatrixPopupList extends WorkspaceSwitcherPopupList {
4244 let workArea = Main . layoutManager . getWorkAreaForMonitor ( this . _monitorIndex ) ;
4345 let themeNode = this . get_theme_node ( ) ;
4446 let spacing = themeNode . get_length ( 'spacing' ) ;
47+ let indicatorThemeNode = children [ children . length - 1 ] . get_theme_node ( ) ;
48+ let indicatorLeftFullBorder = indicatorThemeNode . get_padding ( St . Side . LEFT ) + indicatorThemeNode . get_border_width ( St . Side . LEFT ) ;
49+ let indicatorRightFullBorder = indicatorThemeNode . get_padding ( St . Side . RIGHT ) + indicatorThemeNode . get_border_width ( St . Side . RIGHT ) ;
4550
4651 let availWidth = workArea . width - themeNode . get_horizontal_padding ( ) ;
4752
4853 let width = this . _columns * this . _scale * children [ 0 ] . get_width ( ) ;
49- // TODO add 2*indicator border to spacing here
50- let totalSpacing = spacing * ( this . _columns - 1 ) ;
54+ let totalSpacing = spacing * ( this . _columns - 1 ) + indicatorLeftFullBorder + indicatorRightFullBorder ;
5155
5256 width += totalSpacing ;
5357 width = Math . round ( Math . min ( width , availWidth ) ) ;
0 commit comments