diff --git a/.gitignore b/.gitignore index eb3db7f1c..70017a0e8 100755 --- a/.gitignore +++ b/.gitignore @@ -73,4 +73,6 @@ cline_docs/ .continue/ prompt_history.json chat.json -docs/superpowers/ \ No newline at end of file +docs/superpowers/ +.agents +.antigravitycli/ diff --git a/app/src/main/java/helium314/keyboard/keyboard/emoji/DynamicGridKeyboard.java b/app/src/main/java/helium314/keyboard/keyboard/emoji/DynamicGridKeyboard.java index 0e900cc2a..36d2b4b67 100644 --- a/app/src/main/java/helium314/keyboard/keyboard/emoji/DynamicGridKeyboard.java +++ b/app/src/main/java/helium314/keyboard/keyboard/emoji/DynamicGridKeyboard.java @@ -65,19 +65,33 @@ public DynamicGridKeyboard(final SharedPreferences prefs, final Keyboard templat final Key key1 = getTemplateKey(Constants.RECENTS_TEMPLATE_KEY_CODE_1); final int horizontalGap = Math.abs(key1.getX() - key0.getX()) - key0.getWidth(); final float widthScale = determineWidthScale(key0.getWidth() + horizontalGap); + int columnsNumCalc = 1; + int horizontalStepCalc = 1; + int horizontalGapCalc = 0; if (categoryId == EmojiCategory.ID_EMOTICONS) { // Emoticons need more space, so we use approx half the columns final int standardColumns = mBaseWidth / (int) ((key0.getWidth() + horizontalGap) * widthScale); - mColumnsNum = Math.max(1, standardColumns / 2); - mHorizontalStep = mBaseWidth / mColumnsNum; - mHorizontalGap = (int) (horizontalGap * widthScale * 2); + columnsNumCalc = Math.max(1, standardColumns / 2); + horizontalStepCalc = Math.max(1, mBaseWidth / columnsNumCalc); + horizontalGapCalc = (int) (horizontalGap * widthScale * 2); } else { - mHorizontalGap = (int) (horizontalGap * widthScale); - mHorizontalStep = (int) ((key0.getWidth() + horizontalGap) * widthScale); - mColumnsNum = mBaseWidth / mHorizontalStep; + horizontalGapCalc = (int) (horizontalGap * widthScale); + horizontalStepCalc = Math.max(1, (int) ((key0.getWidth() + horizontalGap) * widthScale)); + columnsNumCalc = mBaseWidth / horizontalStepCalc; } - mVerticalStep = (int) ((key0.getHeight() + mVerticalGap) + int verticalStepCalc = (int) ((key0.getHeight() + mVerticalGap) / Math.sqrt(Settings.getValues().mKeyboardHeightScale)); + if (Settings.getValues().mEmojiKeyFit) { + final float scale = Settings.getValues().mFontSizeMultiplierEmoji; + horizontalGapCalc = (int) (horizontalGapCalc * scale); + horizontalStepCalc = Math.max(1, (int) (horizontalStepCalc * scale)); + columnsNumCalc = Math.max(1, mBaseWidth / horizontalStepCalc); + verticalStepCalc = (int) (verticalStepCalc * scale); + } + mHorizontalGap = horizontalGapCalc; + mHorizontalStep = horizontalStepCalc; + mColumnsNum = columnsNumCalc; + mVerticalStep = verticalStepCalc; if (spacerWidth > 0) setSpacerColumns(spacerWidth); mMaxKeyCount = maxKeyCount; diff --git a/dev-log.md b/dev-log.md index 6aa2c9238..ec827f247 100644 --- a/dev-log.md +++ b/dev-log.md @@ -653,3 +653,24 @@ The backspace fixes were ready in PR #8, and the user asked to merge them to `ma ### Open Questions / Next Steps - Push the updated shortcuts PR branch. + +--- + +## 2026-05-26 — Sync with upstream LeanType main + +### Context +The issue requested syncing from upstream LeanType (LeanBitLab/HeliboardL), not upstream HeliBoard. + +### Actions Taken +- Repointed `upstream` remote to `https://github.com/LeanBitLab/HeliboardL.git` and fetched `upstream/main`. +- Verified shared history and divergence between `origin/main` and `upstream/main`. +- Merged `upstream/main` into `copilot/sync-with-upstream`. +- Reviewed merged file changes (`DynamicGridKeyboard.java` and `.gitignore`). +- Attempted to run `./gradlew compileOfflineRunTestsKotlin --no-daemon` for validation. + +### Decisions Made +- Used a direct merge commit to preserve upstream LeanType history instead of cherry-picking. +- Kept upstream's emoji grid scaling update as-is because it merged cleanly and is isolated. + +### Open Questions / Next Steps +- Gradle validation is blocked in this environment because `dl.google.com` is unreachable during dependency resolution.