current widget name displayed on current profile label
This commit is contained in:
1 parent
97d17f505b
commit
6be5aa6507
3 files changed
+42
-2
No files matched your search
@@ -93,6 +93,29 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
" Profile: %@ Widget: %@" : {
|
||||||
|
"extractionState" : "manual",
|
||||||
|
"localizations" : {
|
||||||
|
"zh-Hans" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : " 当前布局: %@ 当前组件: %@"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-Hant" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : " 当前布局: %@ 当前组件: %@"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-HK" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : " 当前布局: %@ 当前组件: %@"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
" Wake-on-LAN" : {
|
" Wake-on-LAN" : {
|
||||||
"extractionState" : "manual",
|
"extractionState" : "manual",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
|
|||||||
@@ -13,8 +13,10 @@
|
|||||||
+ (NSString *)localizedStringForKey:(NSString *)key, ... {
|
+ (NSString *)localizedStringForKey:(NSString *)key, ... {
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, key);
|
va_start(args, key);
|
||||||
|
|
||||||
NSString *format = NSLocalizedStringFromTable(key, @"Localizable", nil);
|
NSString *format = NSLocalizedStringFromTable(key, @"Localizable", nil);
|
||||||
NSString *result = [[NSString alloc] initWithFormat:format arguments:args];
|
NSString *result = [[NSString alloc] initWithFormat:format arguments:args];
|
||||||
|
|
||||||
va_end(args);
|
va_end(args);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
+17
-2
@@ -650,13 +650,19 @@
|
|||||||
|
|
||||||
OnScreenWidgetView* widgetView = (OnScreenWidgetView* )notification.object;
|
OnScreenWidgetView* widgetView = (OnScreenWidgetView* )notification.object;
|
||||||
|
|
||||||
|
|
||||||
[self->selectedWidgetView.stickBallLayer removeFromSuperlayer];
|
[self->selectedWidgetView.stickBallLayer removeFromSuperlayer];
|
||||||
[self->selectedWidgetView.crossMarkLayer removeFromSuperlayer];
|
[self->selectedWidgetView.crossMarkLayer removeFromSuperlayer];
|
||||||
self->widgetViewSelected = true;
|
self->widgetViewSelected = true;
|
||||||
self->controllerLayerSelected = false;
|
self->controllerLayerSelected = false;
|
||||||
self->selectedWidgetView = widgetView;
|
self->selectedWidgetView = widgetView;
|
||||||
|
|
||||||
|
[self autoFitLabel:self.currentProfileLabel];
|
||||||
|
self.currentProfileLabel.textAlignment = NSTextAlignmentLeft;
|
||||||
|
[self.currentProfileLabel setText:
|
||||||
|
[LocalizationHelper localizedStringForKey:@" Profile: %@ Widget: %@",
|
||||||
|
[profilesManager getSelectedProfile].name,
|
||||||
|
selectedWidgetView.buttonLabel]];
|
||||||
|
|
||||||
self.undoButton.alpha = selectedWidgetView.layoutChanges.count>1 ? 1.0 : 0.3;
|
self.undoButton.alpha = selectedWidgetView.layoutChanges.count>1 ? 1.0 : 0.3;
|
||||||
|
|
||||||
[self.layoutOSC updateGuidelinesForOnScreenWidget:self->selectedWidgetView]; // shows guideline immediately when widget is tapped
|
[self.layoutOSC updateGuidelinesForOnScreenWidget:self->selectedWidgetView]; // shows guideline immediately when widget is tapped
|
||||||
@@ -739,6 +745,14 @@
|
|||||||
self->selectedControllerLayer = controllerLayer;
|
self->selectedControllerLayer = controllerLayer;
|
||||||
self->controllerLoadedBounds = controllerLayer.bounds;
|
self->controllerLoadedBounds = controllerLayer.bounds;
|
||||||
|
|
||||||
|
[self autoFitLabel:self.currentProfileLabel];
|
||||||
|
self.currentProfileLabel.textAlignment = NSTextAlignmentLeft;
|
||||||
|
[self.currentProfileLabel setText:
|
||||||
|
[LocalizationHelper localizedStringForKey:@" Profile: %@ Widget: %@",
|
||||||
|
[profilesManager getSelectedProfile].name,
|
||||||
|
selectedControllerLayer.name]];
|
||||||
|
|
||||||
|
|
||||||
// setup slider values
|
// setup slider values
|
||||||
CGFloat sizeFactor = [OnScreenControls getControllerLayerSizeFactor:controllerLayer]; // calculated sizeFactor from loaded layer bounds.
|
CGFloat sizeFactor = [OnScreenControls getControllerLayerSizeFactor:controllerLayer]; // calculated sizeFactor from loaded layer bounds.
|
||||||
[self.widgetSizeSlider setValue:sizeFactor];
|
[self.widgetSizeSlider setValue:sizeFactor];
|
||||||
@@ -906,7 +920,8 @@
|
|||||||
[self.currentProfileLabel setText:[LocalizationHelper localizedStringForKey:@"Profile: %@",[profilesManager getSelectedProfile].name]];
|
[self.currentProfileLabel setText:[LocalizationHelper localizedStringForKey:@"Profile: %@",[profilesManager getSelectedProfile].name]];
|
||||||
self.currentProfileLabel.layer.cornerRadius = [self isIPhone] ? 9 : 12;
|
self.currentProfileLabel.layer.cornerRadius = [self isIPhone] ? 9 : 12;
|
||||||
self.currentProfileLabel.clipsToBounds = YES;
|
self.currentProfileLabel.clipsToBounds = YES;
|
||||||
|
self.currentProfileLabel.textAlignment = NSTextAlignmentCenter;
|
||||||
|
|
||||||
self.widgetSizeStack.userInteractionEnabled = YES;
|
self.widgetSizeStack.userInteractionEnabled = YES;
|
||||||
for(UIView* view in _widgetPanelStack.subviews){
|
for(UIView* view in _widgetPanelStack.subviews){
|
||||||
view.userInteractionEnabled = YES;
|
view.userInteractionEnabled = YES;
|
||||||
|
|||||||
Reference in new issue
Block a user