@@ -102,7 +102,7 @@ final class ProviderSwitcherView: NSView {
102102 maxAllowedSegmentWidth: initialMaxAllowedSegmentWidth,
103103 stackedIcons: self . stackedIcons)
104104 self . rowSpacing = self . stackedIcons ? 4 : 2
105- self . rowHeight = Self . switcherRowHeight ( stackedIcons: self . stackedIcons, rowCount : self . rowCount )
105+ self . rowHeight = Self . switcherRowHeight ( stackedIcons: self . stackedIcons)
106106 let height : CGFloat = self . rowHeight * CGFloat( self . rowCount)
107107 + self . rowSpacing * CGFloat( max ( 0 , self . rowCount - 1 ) )
108108 self . preferredWidth = width
@@ -547,20 +547,8 @@ final class ProviderSwitcherView: NSView {
547547 return rows
548548 }
549549
550- private static func switcherRowHeight( stackedIcons: Bool , rowCount: Int ) -> CGFloat {
551- // Compact mode: reduce height for multi-row switcher to save vertical space.
552- // rowCount >= 4: reduce by 4pt (40 → 36). rowCount == 3: reduce by 4pt (40 → 36).
553- // Single and two-row layouts stay unchanged to preserve comfortable touch targets.
554- // 36pt base safely fits stacked buttons with two-line titles and quota bars.
555- let baseRowHeight : CGFloat = if stackedIcons {
556- if rowCount >= 3 {
557- 36
558- } else {
559- 36
560- }
561- } else {
562- 30
563- }
550+ private static func switcherRowHeight( stackedIcons: Bool ) -> CGFloat {
551+ let baseRowHeight : CGFloat = stackedIcons ? 36 : 30
564552 return baseRowHeight + self . quotaIndicatorReservedHeight
565553 }
566554
@@ -673,6 +661,14 @@ final class ProviderSwitcherView: NSView {
673661 self . buttons. map ( \. fittingSize)
674662 }
675663
664+ func _test_rowCount( ) -> Int {
665+ self . rowCount
666+ }
667+
668+ func _test_rowHeight( ) -> CGFloat {
669+ self . rowHeight
670+ }
671+
676672 func _test_setHoveredButtonTag( _ tag: Int ? ) {
677673 self . hoveredButtonTag = tag
678674 self . updateButtonStyles ( )
0 commit comments