Added background transparency live update when using QC

This commit is contained in:
Eric Doughty-Papassideris
2010-12-08 00:56:03 +01:00
parent bbc5e154ea
commit 7cf4294ff2

View File

@@ -651,6 +651,7 @@ static const size_t kModifierEventTypeSpecSize = sizeof(kModifierEventTypeSpec)
[udc addObserver:self forKeyPath:@"values.VisorPosition" options:0 context:nil];
[udc addObserver:self forKeyPath:@"values.VisorHideOnEscape" options:0 context:nil];
[udc addObserver:self forKeyPath:@"values.VisorUseBackgroundAnimation" options:0 context:nil];
[[[self class] getVisorProfile] addObserver:self forKeyPath:@"BackgroundColor" options:0 context:@"Update bkg"];
if ([ud boolForKey:@"VisorUseBackgroundAnimation"]) {
[self background];
@@ -1216,6 +1217,14 @@ static const size_t kModifierEventTypeSpecSize = sizeof(kModifierEventTypeSpec)
if ([keyPath isEqualToString:@"values.VisorUseBackgroundAnimation"]) {
[self updateBackgroundFrame];
}
if (background != nil &&
!isHidden &&
[keyPath isEqualToString:@"BackgroundColor"] &&
context != nil &&
[context isEqualToString:@"Update bkg"]) {
float bkgAlpha = [self getVisorProfileBackgroundAlpha];
[background setAlphaValue:bkgAlpha];
}
}
- (void)updateHotKeyRegistration {