Skip to content

Commit 4607988

Browse files
committed
ui(settings): improve community template grid
1 parent 9839ea7 commit 4607988

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/shell/settings/template_store_content.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ namespace settings {
6161
});
6262
}
6363

64+
[[nodiscard]] std::string itemTooltip(std::size_t index) const override {
65+
if (m_indices == nullptr || m_catalog == nullptr || index >= m_indices->size()) {
66+
return {};
67+
}
68+
return noctalia::theme::formatTemplateTooltip((*m_catalog)[(*m_indices)[index]]);
69+
}
70+
6471
void onActivate(std::size_t index) override {
6572
if (m_content != nullptr) {
6673
m_content->toggleAtFilteredIndex(index);
@@ -462,7 +469,7 @@ namespace settings {
462469
const float minCardHeight = (Style::controlHeightSm + Style::spaceSm * 2.0f) * scale;
463470
auto grid = ui::virtualGridView({
464471
.out = &m_grid,
465-
.minCellWidth = 128.0f * scale,
472+
.minCellWidth = 152.0f * scale,
466473
.cellHeight = std::max(cardHeight, minCardHeight),
467474
.squareCells = false,
468475
.columnGap = Style::spaceSm * scale,

0 commit comments

Comments
 (0)