🏡 index : quine-global-labs/bazaar.git

using Gtk 4.0;

template $BzFlathubCategorySection : Box {
  orientation: vertical;
  spacing: 10;
  visible: bind $invert_boolean($is_null(template.category as <$BzFlathubCategory>) as <bool>) as <bool>;
  margin-bottom: 12;

  Label section_title {
    styles [
      "title-1",
    ]
    visible: bind template.has-title as <bool>;
    xalign: 0.0;
    hexpand: true;
    margin-start: 3;
    margin-end: 3;
    margin-bottom: 5;
    ellipsize: end;
  }

  $BzDynamicListView section_list {
    styles [
      "flathub-page-section",
    ]
    hexpand: true;
    scroll: false;
    noscroll-kind: flow-box;
    child-type: "BzAppTile";
    child-prop: "group";
    row-spacing: bind $get_spacing(template.compact) as <int>;
    column-spacing: bind $get_spacing(template.compact) as <int>;
  }

  Button more_button {
    styles [
      "pill",
    ]
    can-shrink: true;
    halign: center;
    valign: center;
    margin-top: 5;
    clicked => $on_more_button_clicked();
  }
}