Adium

Ticket #131 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

message viewing window partially transparent

Reported by: blackmage@pacbell.net Assigned to: anybody
Priority: normal Milestone: Adium X 1.0
Component: Core Adium Version:
Severity: normal Keywords: transparent window opacity webkit message view
Cc: Patch:
Pending:

Description

I have a request for a window design: message viewing portion of message window transparent, excluding message boxes, like the mockies.

Attachments

transparentWebview.diff (5.5 kB) - added by poisonousinsect on 01/19/2006 04:57:31 AM.
Lacks the permanent vertical scroll bar bgannin suggested in the forums (WebFrameView is not a descendent of NSScrollView). If it's not up to snuff, I'm happy to improve it.
transparentWebview.2.diff (4.9 kB) - added by poisonousinsect on 01/19/2006 05:02:38 AM.
Whoops, last version left in some extra code. Heh, sorry.
transparentWebview.3.diff (9.0 kB) - added by poisonousinsect on 01/19/2006 08:37:33 PM.
Improved version, detailed comments in a second since this text field is tiny.
Eclipse Transparent.zip (253.1 kB) - added by poisonousinsect on 01/20/2006 08:38:37 PM.
The default Eclipse style modified to have a single, transparent variant. The one limitation with this setup is that if any of the variants default to a transparent background, they all have to draw slower (the same thing is true with ShowsUserIcons for iconless variants, but that's not as big of a deal).

Change History

05/13/2005 10:59:46 PM changed by Machina

  • keywords changed from transparent window to transparent window opacity webkit message view .
  • owner changed from nobody to anybody.
  • version set to 0.90svn.
  • component changed from AIM to Core Adium.
  • severity changed from normal to enhancement.

More accurate description would be the ability to set transparent backgrounds for webkit styles such that a style could be constructed that had only the text boxes with nothing in between.

05/14/2005 01:48:56 AM changed by cbarrett

  • version deleted.
  • milestone changed from Adium X 0.81 to Adium X 0.90.

Why was this in the 0.81 milestone? Perhaps PM got confused with "Milestone" and "Version" ?

05/15/2005 07:40:03 PM changed by timothy@colloquy.info

Take a look at how this can be done in the Colloquy code. Works on 10.3.9 and 10.4 (requires the new WebKit).

http://project.colloquy.info/trac/file/trunk/JVStyleView.m

@interface WebView (WebViewPrivate) // WebKit 1.3 pending public API - (void) setDrawsBackground:(BOOL) draws; - (BOOL) drawsBackground; @end

Let me know if you have any questions or need more help.

05/29/2005 08:32:21 PM changed by adamiser

  • status changed from new to closed.
  • resolution set to wontfix.

This is not something we intend to add. A transparent webkit view would not look good without a custom window title, source/destination selectors, text entry field, and tabs. We have no plans to allow complete skinning of the application.

06/01/2005 07:17:07 AM changed by catfish_man

  • milestone deleted.

Removing milestone, since it's misleading on the roadmap.

01/18/2006 04:12:38 AM changed by poisonousinsect

I've modified an old version of Adium to support this, if I create a patch off the trunk will you guys accept it?

Info and screenshots in this thread: http://forums.cocoaforge.com/viewtopic.php?p=49581

01/18/2006 07:25:11 AM changed by evands

poisonousinsect: Depends on what the patch looks like, really...

01/18/2006 10:04:55 AM changed by evands

  • status changed from closed to reopened.
  • resolution deleted.
  • field_haspatch changed.

Based on your forum post, poisonousinsect, it sounds like a clean implementation; please do submit a patch so we can take a look.

01/19/2006 04:57:31 AM changed by poisonousinsect

  • attachment transparentWebview.diff added.

Lacks the permanent vertical scroll bar bgannin suggested in the forums (WebFrameView is not a descendent of NSScrollView). If it's not up to snuff, I'm happy to improve it.

01/19/2006 05:02:38 AM changed by poisonousinsect

  • attachment transparentWebview.2.diff added.

Whoops, last version left in some extra code. Heh, sorry.

01/19/2006 09:48:04 AM changed by evands

  1. We're decreasing performance for the majority case (opaque background), which needs to be fixed. Most importantly, the invalidate shadows call after every drawing operation shouldn't happen for an opaque background.
  2. Speaking of invalidate shadows, why is it necessary to wait until the next run loop to invalidate in the transparent case?
  3. What happens if the webview doesn't have a background image given your setDrawsBackground:NO call?

01/19/2006 11:11:38 AM changed by poisonousinsect

1. Okay, I can fix that. 2. I'll add a comment to explain that. 3. -setDrawsBackground: works on the WebView the same way as it works on scroll views, in that the actual web content (background color, background image, etc.) is unaffected. The only change is that it doesn't draw solid white behind the background anymore (which understandably blocks any transparency).

01/19/2006 08:37:33 PM changed by poisonousinsect

  • attachment transparentWebview.3.diff added.

Improved version, detailed comments in a second since this text field is tiny.

01/19/2006 08:56:22 PM changed by poisonousinsect

Okay. Optimized in a couple of ways:<br> 1. This version only calls -setDrawsBackground:YES if the background is opaque (which it tells either by an optional flag "DefaultBackgroundIsTransparent" in the message style [which defaults to opaque] or by looking at the user-entered custom color).<br> 2. The WebView store's whether it's opaque in an ivar so it doesn't even need to figure it out every time it draws.<br><br>

It seems you hinted at calling -setOpaque:NO on the window when the WebView is opaque. Theoretically that path is faster, but I chose not to use it because it does not make a noticeable difference in practical usage (even when looking for a regression on my 4+ year old iMac, I couldn't notice one). "Optimize later," and all that jazz. (Specifically, I understand that when drawing, it only backs up to the first opaque ancestor, which would be the Webview itself because I have it drawing its background when it's opaque.)<br><br>

Obviously, if you really want it to say it's opaque when it is, I will diligently work to improve it. But I really don't think its necessary.<br><br>

I also managed to get it to always draw the scroll bar, but I'll admit it's not particularly elegant. I am really not certain whether a permanent scroll bar should be used in this case. As the comment says, feel free to remove it.

01/19/2006 08:57:56 PM changed by poisonousinsect

Shoot, maybe someday I'll remember to use WikiFormatting...

01/19/2006 10:44:50 PM changed by anonymous

I would vote against a permanent scroll bar.

01/20/2006 07:34:24 AM changed by evands

poisonousinsect, sounds pretty good. I'll apply and review your patch; could you please attach a sample message style which uses a default transparent background so I can test that use case, as well?

01/20/2006 12:07:06 PM changed by Dan

I second that vote against a permanent scroll bar.

01/20/2006 08:38:37 PM changed by poisonousinsect

  • attachment Eclipse Transparent.zip added.

The default Eclipse style modified to have a single, transparent variant. The one limitation with this setup is that if any of the variants default to a transparent background, they all have to draw slower (the same thing is true with ShowsUserIcons for iconless variants, but that's not as big of a deal).

01/22/2006 01:48:56 AM changed by evands

  • milestone set to Adium X 1.0.

01/22/2006 01:49:02 AM changed by evands

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [15034]) Patch from poisonousinsect which allows selection of transparency for custom message style background colors and allows styles to use a DefaultBackgroundIsTransparent key to declare their backgrounds as transparent. Thanks :)

I also fixed a control dimming issue with the custom background controls in the Message preferences.

Closes #131

01/22/2006 02:33:54 AM changed by evands

(In [15035]) Major optimization: Don't invalidate shadows for a transparent message view in the middle of a live resize. Refs #131

01/22/2006 10:14:50 AM changed by poisonousinsect

Success! Haha, thank you.