This commit is contained in:
2026-03-04 10:20:22 +08:00
parent 72069cc737
commit 2a122d27a9
5 changed files with 67 additions and 13 deletions

View File

@@ -73,6 +73,9 @@ NS_ASSUME_NONNULL_BEGIN
@end
@interface KBKeyboardLayout : NSObject
@property (nonatomic, strong, nullable) NSNumber *rowSpacing;
@property (nonatomic, strong, nullable) NSNumber *topInset;
@property (nonatomic, strong, nullable) NSNumber *bottomInset;
@property (nonatomic, strong, nullable) NSArray<KBKeyboardRowConfig *> *rows;
@property (nonatomic, strong, nullable) NSArray<KBKeyboardRowConfig *> *shiftRows;
@end

View File

@@ -184,6 +184,9 @@ static NSString * const kKBKeyboardLayoutI18nFileName = @"kb_keyboard_layouts_i1
}
KBKeyboardLayout *mergedLayout = [KBKeyboardLayout new];
mergedLayout.rowSpacing = baseLayout.rowSpacing ?: layout.rowSpacing;
mergedLayout.topInset = baseLayout.topInset ?: layout.topInset;
mergedLayout.bottomInset = baseLayout.bottomInset ?: layout.bottomInset;
mergedLayout.rows = [self kb_mergeRowsFromBase:baseLayout.rows override:layout.rows];
mergedLayout.shiftRows = [self kb_mergeRowsFromBase:baseLayout.shiftRows override:layout.shiftRows];
mergedLayouts[key] = mergedLayout;