SetGadgetFont leads to narrow line spacing in ListViewGadget

Mac OSX specific forum
Lebostein
Addict
Addict
Posts: 829
Joined: Fri Jun 11, 2004 7:07 am

SetGadgetFont leads to narrow line spacing in ListViewGadget

Post by Lebostein »

Is this only depending on the font? But this line spacing I see seems to small (the line height ends exactly with the tail of the "y"). However, the line spacing is much larger in the default state...

Code: Select all

if OpenWindow(0, 0, 0, 270*2, 140, "ListViewGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  ListViewGadget(0, 10, 10, 250, 120)
  For a = 1 To 12
    AddGadgetItem (0, -1, "Item yyy " + Str(a) + " of the Listview")   ; definieren des Listview-Inhalts
  Next
  SetGadgetState(0, 0)
  ListViewGadget(1, 10+270, 10, 250, 120)
  LoadFont(0, "Helvetica", 13)
  SetGadgetFont(1, FontID(0))
  For a = 1 To 12
    AddGadgetItem (1, -1, "Item yyy " + Str(a) + " of the Listview")   ; definieren des Listview-Inhalts
  Next
  SetGadgetState(1, 0)
  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Image
mrbungle
Enthusiast
Enthusiast
Posts: 149
Joined: Wed Dec 30, 2020 3:18 am

Re: SetGadgetFont leads to narrow line spacing in ListViewGadget

Post by mrbungle »

Not sure if this is a bug or intended behavior but I noticed this behavior and set the rowheight to ensure consistency
Post Reply