darktable.gui.panel_get_size

function(
  panel : types.dt_ui_panel_t
):int

Gets the size in pixels of the specified panel. This only works for the left, right, and bottom panels.