Ticket #131: transparentWebview.diff
| File transparentWebview.diff, 5.5 kB (added by poisonousinsect, 3 years ago) |
|---|
-
Plugins/WebKit
old new 107 107 108 108 //Observe preference changes and set our initial preferences 109 109 [[adium preferenceController] registerPreferenceObserver:self forGroup:PREF_GROUP_WEBKIT_MESSAGE_DISPLAY]; 110 111 //Allow the alpha component to be set for our background color 112 [[NSColorPanel sharedColorPanel] setShowsAlpha:YES]; 110 113 } 111 114 112 115 /*! … … 114 117 */ 115 118 - (void)viewWillClose 116 119 { 120 //Hide the alpha component 121 [[NSColorPanel sharedColorPanel] setShowsAlpha:NO]; 122 117 123 [[adium notificationCenter] removeObserver:self]; 118 124 [[adium preferenceController] unregisterPreferenceObserver:self]; 119 125 [previewListObjectsDict release]; previewListObjectsDict = nil; -
Plugins/WebKit
old new 32 32 33 33 return self; 34 34 } 35 - (void)drawRect:(NSRect)rect 36 { 37 [super drawRect:rect]; 38 [[self window] performSelector:@selector(invalidateShadow) 39 withObject:nil 40 afterDelay:0 41 inModes:[NSArray arrayWithObjects:NSDefaultRunLoopMode, NSEventTrackingRunLoopMode, nil]]; 42 } 43 35 44 //Font Family ---------------------------------------------------------------------------------------------------------- 36 45 #pragma mark Font Family 37 46 - (void)setFontFamily:(NSString *)familyName -
Plugins/WebKit
old new 41 41 42 42 @class AIContentMessage, AIContentStatus, AIContentObject; 43 43 44 @interface WebView (PRIVATE) 45 - (void)setDrawsBackground:(BOOL)flag; 46 @end 47 44 48 @interface AIWebKitMessageViewController (PRIVATE) 45 49 - (id)initForChat:(AIChat *)inChat withPlugin:(AIWebKitMessageViewPlugin *)inPlugin; 46 50 - (void)_initWebView; … … 335 339 [webView setUIDelegate:self]; 336 340 [webView setDraggingDelegate:self]; 337 341 [webView setMaintainsBackForwardList:NO]; 338 342 if ([webView respondsToSelector:@selector(setDrawsBackground:)]) [webView setDrawsBackground:NO]; 343 339 344 if (!draggedTypes) { 340 345 draggedTypes = [[NSArray alloc] initWithObjects: 341 346 NSFilenamesPboardType, -
Plugins/WebKit
old new 1023 1023 } 1024 1024 } 1025 1025 if (customBackgroundColor) { 1026 [bodyTag appendString:[NSString stringWithFormat:@"background-color: #%@; ", [customBackgroundColor hexString]]]; 1026 float red, green, blue, alpha; 1027 [customBackgroundColor getRed:&red green:&green blue:&blue alpha:&alpha]; 1028 [bodyTag appendString:[NSString stringWithFormat:@"background-color: rgba(%i, %i, %i, %f); ", (int)(red * 255.0), (int)(green * 255.0), (int)(blue * 255.0), alpha]]; 1027 1029 } 1028 1030 } 1029 1031 -
Plugins/Dual
old new 88 88 89 89 //Load our window 90 90 myWindow = [self window]; 91 91 92 //Disable the optimization for opaque windows since ours might not be 93 [myWindow setOpaque:NO]; 94 92 95 //Tab hiding suppression (used to force tab bars visible when a drag is occuring) 93 96 tabBarIsVisible = YES; 94 97 supressHiding = NO; … … 297 300 } 298 301 299 302 [inTabViewItem setContainer:self]; 303 304 //Make the area under our tab view's message display view transparent 305 // [[[self window] contentView] makeTransparentUnderView:[[inTabViewItem messageViewController] messageDisplayView]]; 300 306 301 307 if (!silent) [[adium interfaceController] chatDidOpen:[inTabViewItem chat]]; 302 308 } … … 314 320 [tabView_messages selectNextTabViewItem:nil]; 315 321 } 316 322 323 //Make the entire tab opaque again 324 //This includes the message display view we added before 325 // [[[self window] contentView] makeOpaqueUnderView:[inTabViewItem view]]; 326 317 327 //Remove the tab and let the interface know a container closed 318 328 [containedChats removeObject:[inTabViewItem chat]]; 319 329 if (!silent) [[adium interfaceController] chatDidClose:[inTabViewItem chat]]; -
Plugins/Dual
old new 272 272 //scrollView_messages is originally a placeholder; replace it with controllerView_messages 273 273 [controllerView_messages setFrame:[scrollView_messages documentVisibleRect]]; 274 274 [[customView_messages superview] replaceSubview:customView_messages with:controllerView_messages]; 275 276 //This is what draws our transparent background 277 //Technically, it could be set in MessageView.nib, too 278 [scrollView_messages setBackgroundColor:[NSColor clearColor]]; 279 275 280 [controllerView_messages setNextResponder:textView_outgoing]; 276 281 } 277 282