I added a transparent Webkit option, now what?

An instant messenger which can connect to AIM, GTalk, Jabber, ICQ, and more.
poisonousinsect
Harmless
Posts: 5
Joined: Mon Jan 16, 2006 5:59 am

I added a transparent Webkit option, now what?

Postby poisonousinsect » Mon Jan 16, 2006 6:42 am

Pictures speak louder than words.

My own Atomos (slightly modified to work):
Image

Smooth Operator (unmodified):
Image
Thanks to Ian for hosting these images.

    Problems:
  • Adium's developers have said (repeatedly) that they don't want to add this feature.
  • I don't know jack about Subversion, so it's unlikely that I would manage to merge it with the official branch.
  • My code is kind of an inelegant kludge (I had no experience with Adium's code or open source in general).
What should I do? Technically it's bundled up and I could ask Ian to host it at a moment's notice, but I don't want to piss anyone off, more less maintain an unofficial branch myself.

(P.S. I just found a bug with dragging out tabs to create new windows. Don't much feel like compiling for another hour after fixing it, though.)

User avatar
cbarrett
Adium Team
Posts: 389
Joined: Thu Dec 02, 2004 2:30 am
Location: Kailua, HI
Contact:

Postby cbarrett » Mon Jan 16, 2006 11:10 am

What interests me most is the bug you've discovered in dragging windows. If you could outline what's involved in that (perhaps in a ticket?), that'd be great.

As far as the subject at hand goes, I'd like to see what you've done, out of curiosity. There are instructions on the wiki for getting Subversion, and it's not particularly hard to use. We can walk you through generating a patch, if you want. Since you said you don't know jack about svn, I'm assuming you did this to a 0.8x source tarball?

If you're interested in helping out more, we'd love to have you. Pick out some tickets, leave comments saying that you're gonna try it out, and someone with trac access will assign it to you.

Keep up the good work :)

1985
Latté
Posts: 88
Joined: Mon Mar 07, 2005 5:35 pm
Contact:

Postby 1985 » Mon Jan 16, 2006 4:05 pm

Nice, I'd like to see this..
It's not a bug. It's an undocumented feature.

poisonousinsect
Harmless
Posts: 5
Joined: Mon Jan 16, 2006 5:59 am

Postby poisonousinsect » Mon Jan 16, 2006 5:32 pm

cbarrett wrote:What interests me most is the bug you've discovered in dragging windows. If you could outline what's involved in that (perhaps in a ticket?), that'd be great.
Heh, I should've been more specific. It's a bug with the code I've added—I apparently hooked into the wrong "window creation" code (or it happens in more than one place), because when splitting a tab out into its own window, my transparent view doesn't get loaded.

For what it's worth, I did track down bug with setting the default input font color—maybe it's already been fixed—I'll look into it and file it with the Trac database tomorrow.

cbarrett wrote:As far as the subject at hand goes, I'd like to see what you've done, out of curiosity. There are instructions on the wiki for getting Subversion, and it's not particularly hard to use. We can walk you through generating a patch, if you want.
Well, the main holdup was that this feature was set to "wontfix" in the Trac database. If you don't think it's an improvement, it doesn't matter how many guys are trying to add it to your code repository…

cbarrett wrote:Since you said you don't know jack about svn, I'm assuming you did this to a 0.8x source tarball?
Yes, I just grabbed the first version I saw (it happened to be 0.86—I suppose not enough has changed that it would be a huge problem).

cbarrett wrote:If you're interested in helping out more, we'd love to have you. Pick out some tickets, leave comments saying that you're gonna try it out, and someone with trac access will assign it to you.
We'll see. Implementing my one pet feature is one thing, but I have a project of my own, too…

Diatribe
Frappa
Posts: 128
Joined: Fri May 06, 2005 6:34 pm

Postby Diatribe » Mon Jan 16, 2006 5:34 pm

I would love to see this added to the official version. And I think I am not alone on this one. :D
Looks great and I think it would be an awesome addition.

User avatar
The_Tick
Cocoaforge Admin
Posts: 4642
Joined: Thu Dec 02, 2004 6:06 am
Contact:

Postby The_Tick » Mon Jan 16, 2006 10:50 pm

So I've got a beginning list as to why not to implement this:

- Without a border all the way around the window, it looks like some floating toolbar and then junk at the bottom
- Shadow stops at the cocoa interfaces from what I can tell. You get a little shadow otherwise, but it really does look like the window just stops.
- Reminds me of http://www.pro-networks.org/main/images ... _beta4.jpg IE7, but inverse.
- Can already be achieved via third party tools

Catfish_Man mentioned that this would add a pref as well. I thought about that for a second, and realized that if left up to the authors of message styles alone, it would cause a huge problem for people who have vision problems. So a pref would definitely be required.


If these are resolved I'd see less issues with adding it imho.

Nsma
Latté
Posts: 56
Joined: Mon Nov 07, 2005 6:34 am

Postby Nsma » Tue Jan 17, 2006 12:37 am

The_Tick wrote:So I've got a beginning list as to why not to implement this:

- Can already be achieved via third party tools


I use WindowShade if thats what you're referring to but it fades the whole window.

The one above is cool because the box where the actual words are shown doesnt fade so its cool..

And if the background could be changed to different transparencies or colors or even add a background image it would be cool.

It does look a little rough though.

poisonousinsect
Harmless
Posts: 5
Joined: Mon Jan 16, 2006 5:59 am

Postby poisonousinsect » Tue Jan 17, 2006 7:01 am

I guess I'll go through this point by point…

The_Tick wrote:- Without a border all the way around the window, it looks like some floating toolbar and then junk at the bottom
It does look a little weird, but as soon as you send a couple messages it fills up and visually links them together quickly.

Also, unlike, say, Safari (where you can turn on transparency from the Debug menu), the visual weight of Adium is focused at the bottom, not the top. So even with a large window and an empty message history, it still feels clear that they're linked together.

The_Tick wrote:- Shadow stops at the cocoa interfaces from what I can tell. You get a little shadow otherwise, but it really does look like the window just stops.
I don't see what you mean. OS X automatically applies shadows around whatever is opaque, including the window titlebar, scroll bar, chat bubbles, and text entry/tab area. I intentionally call -invalidateShadow to keep it in sync as new messages are displayed (although at the moment, when scrolling, it doesn't update until you let go of the scroll bar).

The_Tick wrote:- Reminds me of http://www.pro-networks.org/main/images ... _beta4.jpg IE7, but inverse.
Heh heh. I'd liken it more to Adium's existing ability to change the contact list's background transparency.

The_Tick wrote:- Can already be achieved via third party tools
What tools? WindowShade and SetAlphaValue both change the entire window's transparency (using NSWindow's -setAlphaValue:).

I specifically punch a hole directly underneath the WebView (taking advantage of NSRectFill, which uses NSCompositeCopy to actually paint -clearColor), and it doesn't effect the transparency of the text or icons in the WebView on top of it.

The_Tick wrote:Catfish_Man mentioned that this would add a pref as well. I thought about that for a second, and realized that if left up to the authors of message styles alone, it would cause a huge problem for people who have vision problems. So a pref would definitely be required.
You can kind of see in my second screenshot—all I did was turn on the alpha slider for the existing color well control (with NSColorPanel's -setShowsAlpha:). Of course, message style authors can already specify the default background, and that wouldn't change.

Under the hood, I just modified AIColorAddition's -stringRepresentation to store the alpha value (and it turned out that -representedColor already knew how to deal with the alpha component—handy).


The_Tick, if you or any other Adium devs want to IM me, I can get you a compiled copy of my modified version, just so you can try it out. The screenshots don't really do it justice, but after playing with it I think you'll admit that it's actually pretty cool…

---

Nsma wrote:And if the background could be changed to different transparencies or colors or even add a background image it would be cool.
I just tried it, and transparent PNGs (and I expect GIFs and TIFFs too) work perfectly. As for transparencies and colors, see the second screenshot—the background is set to a 36% opaque powder blue.

Nsma wrote:It does look a little rough though.
Well, I'm open to suggestions for improvement…

User avatar
bgannin
Growl Team
Posts: 1817
Joined: Thu Dec 02, 2004 8:11 am
Location: ..here
Contact:

Postby bgannin » Tue Jan 17, 2006 7:31 am

Quite lucid and well-articulated (as well as implemented from the sound of it.) My only addendum would be that an always enabled scrollbar (though a tiny bit distracting to some) would enable a fuller frame 'connectivity' by enforcing at least 3/4's of the original border, with a minimal amount having no 'heavy' border.
Try my software!

#define ADIUMX pimp //by me
#define QUESTION ((2b) || (!2b))
Have you hugged a programmer today?

poisonousinsect
Harmless
Posts: 5
Joined: Mon Jan 16, 2006 5:59 am

Postby poisonousinsect » Tue Jan 17, 2006 8:56 am

bgannin wrote:Quite lucid and well-articulated (as well as implemented from the sound of it.) My only addendum would be that an always enabled scrollbar (though a tiny bit distracting to some) would enable a fuller frame 'connectivity' by enforcing at least 3/4's of the original border, with a minimal amount having no 'heavy' border.
I hadn't thought about it, but now that you mention it, I think that'd be perfect.

---

Anyway, I just installed Subversion and got the latest code.

Should I just make a new ticket (or reopen the original one?) and put in a link to this thread? I'm perfectly happy to update my code for the "trunk" and create a patch, but I'd rather not waste my time if the group consensus is opposed to this feature. (Personally, I can keep using 0.86 for a while, and the tab splitting bug I mentioned doesn't really effect me…)

By the way, the other bug I mentioned has apparently been fixed—or at least, AIDefaultFormattingPlugin seems to have completely disappeared, and similar code in AIInterfaceController doesn't have the same problem.


Edit to add: I went ahead and commented on the #131 ticket. Hopefully someone will say if I should even bother making a patch. Next time I'll know better.

Egypt Urnash
Harmless
Posts: 12
Joined: Mon Oct 17, 2005 3:36 pm
Location: Boston
Contact:

Postby Egypt Urnash » Wed Jan 18, 2006 2:35 pm

I'd love to see this as an option. I have my contact list and Growl notifies configured to harmonize with my backdrop picture, and it just seems weird for those parts of Adium to work with it, and not the actual window.

Having three of the four sides of the window confined seems sort of weird... I know you need the title bar to hang the toolbar off of, though. I don't know if the OS would let you do it without horrible hacks involving sticking two windows "together" (see MudWalker), but I find myself imagining this:

Code: Select all

--------------------^
--------------------|
--------------------|
----conversation----|
--------------------|
--------------------|
--------------------v
[x-+   title bar   -]
|    text input      |
tab tab tab tab tab

Possibly with some padding between the conversation and the title bar - though that's probably best left up to the style author.

But I don't think Interface Builder is going to want to let you move the title bar around like that!

User avatar
bgannin
Growl Team
Posts: 1817
Joined: Thu Dec 02, 2004 8:11 am
Location: ..here
Contact:

Postby bgannin » Wed Jan 18, 2006 3:16 pm

Toolbars are coded, not built in Interface Builder :)

This is not possible in OS X without a substantial amount of work.
Try my software!



#define ADIUMX pimp //by me

#define QUESTION ((2b) || (!2b))

Have you hugged a programmer today?

User avatar
TheSilverFox06
Grandé
Posts: 770
Joined: Fri Dec 03, 2004 10:16 pm
Location: St. Paul, MN
Contact:

Postby TheSilverFox06 » Wed Jan 18, 2006 4:16 pm

I think the idea of always having a scrollbar is good, but leaving it as an option should be considered. If I were to use transparency on my message view, I would probably leave it at 75 or 80% opacity, so the window would seem sufficiently connected. I wouldn't complain too much if this wasn't left as an option though.

Diatribe
Frappa
Posts: 128
Joined: Fri May 06, 2005 6:34 pm

Postby Diatribe » Wed Jan 18, 2006 6:19 pm

I guess I'd disable the "always show scroll bar". As SilverFox I'd also leave it at a higher opacity so it wouldn't we a problem. I think an option would be nice.

poisonousinsect
Harmless
Posts: 5
Joined: Mon Jan 16, 2006 5:59 am

Postby poisonousinsect » Thu Jan 19, 2006 10:20 am

I just submitted the patch (twice, actually, because the first time I botched it). It fixes the tab splitting bug and the shadow updating bug that I mentioned in this thread.

Unfortunately it does not have the permanent scroll bar that bgannin suggested because WebViews have their own custom method of scrolling (private classes and whatnot, I believe). Of course, someone else can add that at a later date (or I will, if I ever find out how).

It might be possible to have Adium's scroll view show the empty scroll bar until the WebView displays its own, and then turn off the original one, but that seemed like too nasty a hack to use.


Return to “Adium”

Who is online

Users browsing this forum: Majestic-12 [Bot]