@@ -69,16 +69,17 @@ local function ColorPicker(win, label, initColor)
6969 draw .SetFont (Globals .Style .Font )
7070 local txtW , txtH = draw .GetTextSize (label )
7171 local padding = Globals .Style .ItemPadding
72- local extraVerticalInset = math.ceil ((Globals .Style .ItemSpacingY or padding ) * 0.5 )
73- local verticalInset = padding + extraVerticalInset
7472 local colorSize = math.max (Globals .Style .ItemSize , txtH )
75- local height = colorSize + (verticalInset * 2 )
73+ local height = colorSize + (padding * 2 )
7674 local previewBlockW = colorSize + (padding * 2 )
7775 local arrowBoxW = height
7876 local width = previewBlockW + padding + txtW + padding + arrowBoxW
7977
8078 local ctx = WidgetBase .Setup (win , " ColorPicker" , label , width , height )
8179 local absX , absY = ctx .absX , ctx .absY
80+ local baseSpacing = Globals .Style .ItemSpacingY or Globals .Defaults .WINDOW_CONTENT_PADDING
81+ local spacingBoost = baseSpacing + padding
82+ win ._nextLineSpacingBoost = math.max (win ._nextLineSpacingBoost or 0 , spacingBoost )
8283
8384 -- State management
8485 local state = Utils .GetState (win , ctx .widgetKey , {
@@ -185,7 +186,7 @@ local function ColorPicker(win, label, initColor)
185186 end
186187 local mainW = width - arrowBoxW
187188 local arrowX = px + mainW
188- local colorY = py + verticalInset
189+ local colorY = py + padding
189190 local colorX = px + padding
190191 local colorX2 = colorX + colorSize
191192 Common .QueueRect (win , Globals .Layers .WidgetBackground , px , py , px + mainW , py + height , bg , nil )
0 commit comments