This commit is contained in:
2025-12-16 20:20:57 +08:00
parent 59297eac77
commit b43567748c
5 changed files with 38 additions and 6 deletions

View File

@@ -56,9 +56,10 @@
topBar.backgroundColor = [UIColor clearColor];
[self addSubview:topBar];
self.backButton = [UIButton buttonWithType:UIButtonTypeSystem];
self.backButton.titleLabel.font = [UIFont systemFontOfSize:30 weight:UIFontWeightSemibold];
[self.backButton setTitle:@"⌨︎" forState:UIControlStateNormal];
self.backButton = [UIButton buttonWithType:UIButtonTypeCustom];
// self.backButton.titleLabel.font = [UIFont systemFontOfSize:30 weight:UIFontWeightSemibold];
// [self.backButton setTitle:@"⌨︎" forState:UIControlStateNormal];
[self.backButton setImage:[UIImage imageNamed:@"back_keybord_icon"] forState:UIControlStateNormal];
[self.backButton addTarget:self action:@selector(onBack) forControlEvents:UIControlEventTouchUpInside];
[topBar addSubview:self.backButton];
@@ -78,9 +79,9 @@
make.width.height.mas_equalTo(32);
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.backButton.mas_right).offset(12);
make.centerX.equalTo(self);
make.centerY.equalTo(topBar);
make.right.lessThanOrEqualTo(topBar.mas_right).offset(-12);
// make.right.lessThanOrEqualTo(topBar.mas_right).offset(-12);
}];
UICollectionViewFlowLayout *layout = [UICollectionViewFlowLayout new];

View File

@@ -152,7 +152,16 @@
// - caseVariant: 0/1/2 => //
NSString *identifier = self.key.identifier;
NSInteger variant = (NSInteger)self.key.caseVariant;
UIImage *iconImg = [[KBSkinManager shared] iconImageForKeyIdentifier:identifier caseVariant:variant];
KBSkinManager *skinManager = [KBSkinManager shared];
UIImage *iconImg = [skinManager iconImageForKeyIdentifier:identifier caseVariant:variant];
if (!iconImg && [identifier isEqualToString:@"ai"]) {
NSString *skinId = skinManager.current.skinId ?: @"";
BOOL usingDefaultSkin = (skinId.length == 0 || [skinId isEqualToString:@"default"]);
if (usingDefaultSkin) {
iconImg = [UIImage imageNamed:@"ai_key_icon"];
}
}
//
self.iconView.image = iconImg;