Numeric keypad spans the full keyboard height

- Sections take "fillHeight": their rows stretch over the whole key area
  instead of sitting at the bottom at the shared row height
- Rows of other blocks are unaffected; the template turns it on for the numpad

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-14 22:31:42 +02:00
co-authored by Claude Opus 5.5
parent 2e418bd1f7
commit 75bbe2e566
8 changed files with 49 additions and 22 deletions
+7 -7
View File
@@ -181,21 +181,21 @@ QList<Block> LayoutModel::composeBlocks() const
Block main;
for (const Section &section : m_layout.sections) {
if (section.placement == Section::Placement::Above && shown(section.id))
main += section.rows;
main.rows += section.rows;
}
if (layer && shown(MainSectionId))
main += layer->rows;
main.rows += layer->rows;
QList<Block> blocks;
if (!main.isEmpty())
if (!main.rows.isEmpty())
blocks.append(main);
for (const Section &section : m_layout.sections) {
if (section.placement == Section::Placement::Right && shown(section.id))
blocks.append(section.rows);
blocks.append({section.rows, section.fillHeight});
}
// Never show nothing.
if (blocks.isEmpty() && layer)
blocks.append(layer->rows);
blocks.append({layer->rows});
return blocks;
}
@@ -205,7 +205,7 @@ void LayoutModel::rebuild()
m_blocks = composeBlocks();
m_keys.clear();
for (const Block &block : std::as_const(m_blocks)) {
for (const Row &row : block) {
for (const Row &row : block.rows) {
for (const KeyDef &key : row) {
if (key.type != KeyType::Spacer)
m_keys.append(key);
@@ -227,7 +227,7 @@ void LayoutModel::relayout()
const QList<QRectF> all = computeKeyRects(m_blocks, m_size);
qsizetype i = 0;
for (const Block &block : std::as_const(m_blocks)) {
for (const Row &row : block) {
for (const Row &row : block.rows) {
for (const KeyDef &key : row) {
if (key.type != KeyType::Spacer)
m_rects.append(all[i]);