Old 27th August 2006, 17:38   #1
r4dius
Junior Member
 
r4dius's Avatar
 
Join Date: Mar 2002
Posts: 47
Alpha and windows ...

Hi, just wanted to ask why is it that it's not (by default) possible to use layouts with antialiased alpha (desktop or background) borders etc ... and components like the playlist editor ?
Thanks
r4dius is offline   Reply With Quote
Old 27th August 2006, 17:43   #2
Mr Jones
Nothing to say...
 
Mr Jones's Avatar
 
Join Date: Sep 2000
Location: UK
Posts: 23,063
This is a very short and concise answer as to why components, browser, pl, ML etc, break Desktop alpha.

http://forums.winamp.com/showthread....27#post1615427
Mr Jones is offline   Reply With Quote
Old 28th August 2006, 11:49   #3
r4dius
Junior Member
 
r4dius's Avatar
 
Join Date: Mar 2002
Posts: 47
Thanks for the answer ,
if i understand even displaying the component without alpha if the rest of the container has alpha can't work ?
I tried using the script wich creates a second container etc ... btw the only problem with it is the "order" the containers are displayed, depending on the container you click (alpha one or playlist component) you can get what's on the image,
If you know a way to bypass this please let me know

r4dius is offline   Reply With Quote
Old 28th August 2006, 13:10   #4
martin.deimos
Android/UI Development
 
martin.deimos's Avatar
 
Join Date: Sep 2004
Location: Bavaria
Posts: 1,242
Send a message via ICQ to martin.deimos Send a message via AIM to martin.deimos Send a message via Yahoo to martin.deimos
ah see you're a code
perhaps you try GuiObject.setFocus();
or GuiObject.bringToFront();
but don't know if this works for layouts

we have the same problem in this thread in the SC forums:
http://forums.skinconsortium.com/viewtopic.php?t=240

perhaps we can find a solution together ( we always need coders )

WebSite: www.skinconsortium.com - Community for Userinterface Design & Coding
Skins: Click Here
martin.deimos is offline   Reply With Quote
Old 28th August 2006, 17:39   #5
r4dius
Junior Member
 
r4dius's Avatar
 
Join Date: Mar 2002
Posts: 47
Thanks martin !
it works well with the 2
I just added an id to the component, put it before the "<Wasabi:StandardFrame:PL" call and added the setFocus() to the clearlayout onmove, btw I forgot it would do the same when clicking on the playlist component too so that the clearlayout is overlayed by the rest ^^, I'm trying to figure out how to handle that, I tried to use onLeftButtonDown or Up with the component but looks like it won't work :/, if you have an idea



Edit;
Ok found another problem, first I don't know if I was drugged or what but can't get bringtofront working (maybe it was not working ... strange) and there's a problem when using the setfocus with the onmove has i said because when the clearwindow is docked it looks like it takes the focus when i click the main window so i can't for exemple change volume using the mouse wheel ...

Last edited by r4dius; 28th August 2006 at 19:11.
r4dius is offline   Reply With Quote
Old 28th August 2006, 20:56   #6
leechbite
Major Dude
 
leechbite's Avatar
 
Join Date: Sep 2003
Location: Canada
Posts: 635
Send a message via Yahoo to leechbite
i tried bringtofront before and it wont work on me as well.

one option is to use/add owner="container,layout" on the container/layout. e.g. on the playlist layout add owner="ur_pl_alpha_container_here,ur_pl_alpha_layout_here"

this will keep the playlist layout on top of pl_alpha layout all the time and will link them as well.
leechbite is offline   Reply With Quote
Old 28th August 2006, 22:26   #7
r4dius
Junior Member
 
r4dius's Avatar
 
Join Date: Mar 2002
Posts: 47
Hi, just tried this but I see no difference :/
r4dius is offline   Reply With Quote
Old 29th August 2006, 00:51   #8
leechbite
Major Dude
 
leechbite's Avatar
 
Join Date: Sep 2003
Location: Canada
Posts: 635
Send a message via Yahoo to leechbite
weird. it worked on me before. make sure you place it on the layout definition of the container containing the actual playlist. and the owner should point to the container having the alpha blend.
leechbite is offline   Reply With Quote
Old 29th August 2006, 09:50   #9
martin.deimos
Android/UI Development
 
martin.deimos's Avatar
 
Join Date: Sep 2004
Location: Bavaria
Posts: 1,242
Send a message via ICQ to martin.deimos Send a message via AIM to martin.deimos Send a message via Yahoo to martin.deimos
leech, i tried this one too but had no effect (owner="container,layout")

WebSite: www.skinconsortium.com - Community for Userinterface Design & Coding
Skins: Click Here
martin.deimos is offline   Reply With Quote
Old 29th August 2006, 10:16   #10
r4dius
Junior Member
 
r4dius's Avatar
 
Join Date: Mar 2002
Posts: 47
btw martin in the doc it uses a ; rather than a , but it was the same for me, please let me know if it changes something ^^
r4dius is offline   Reply With Quote
Old 29th August 2006, 15:32   #11
martin.deimos
Android/UI Development
 
martin.deimos's Avatar
 
Join Date: Sep 2004
Location: Bavaria
Posts: 1,242
Send a message via ICQ to martin.deimos Send a message via AIM to martin.deimos Send a message via Yahoo to martin.deimos
hehe fixed the whole thing :P
do these Steps:
1) download skin clearONE ( http://axialix.home.insightbb.com/Winamp/ )
2) open skins dir/clearONE/scripts/
3) now a example only with one script (i took standardframeML.m, cause it has a overlay with the playlist window)
4) add this line
code:
gripTop.onLeftButtonDown(int x, int y) {
layoutStandardFrame.setFocus();
}


5) recompile -> bug has gone

tried to do the same action with the layoutStandardFrame layout, but seems it won't accept mouse handles

just do the same for your script (you will need to use a - the layout full covering layer - instead of gripTop)

good luck,
Martin

WebSite: www.skinconsortium.com - Community for Userinterface Design & Coding
Skins: Click Here
martin.deimos is offline   Reply With Quote
Old 29th August 2006, 15:49   #12
r4dius
Junior Member
 
r4dius's Avatar
 
Join Date: Mar 2002
Posts: 47
hum do you mean you have a layer covering the all window ?
r4dius is offline   Reply With Quote
Old 29th August 2006, 15:55   #13
martin.deimos
Android/UI Development
 
martin.deimos's Avatar
 
Join Date: Sep 2004
Location: Bavaria
Posts: 1,242
Send a message via ICQ to martin.deimos Send a message via AIM to martin.deimos Send a message via Yahoo to martin.deimos
i think it covers the alphaWindow - just look in clearONe to what gridTop refers...

WebSite: www.skinconsortium.com - Community for Userinterface Design & Coding
Skins: Click Here
martin.deimos is offline   Reply With Quote
Old 29th August 2006, 16:26   #14
r4dius
Junior Member
 
r4dius's Avatar
 
Join Date: Mar 2002
Posts: 47
eheh tried it but made the layer over the all window, it works too (i thought it would disable playlist clicking but no) so it brings the windows on top when clicking everywhere (except on the component and buttons as they have to be over the layer ), thanks for the help guys
r4dius is offline   Reply With Quote
Old 29th August 2006, 20:42   #15
leechbite
Major Dude
 
leechbite's Avatar
 
Join Date: Sep 2003
Location: Canada
Posts: 635
Send a message via Yahoo to leechbite
hmm, im curious why it wont work cause im pretty sure owner tag still works, multipass uses this on the ColorTheme object on one of its drawer. im not sure but on xml definition the owner layout might need to be defined first before any child layout is defined.

another option is by script that checks of focus on the 2 containers. something like this:

PHP Code:

Global boolean mainFocus falsealphaFocus falselastFocus false;

mainLayout.onGetFocus() {
    
mainFocus true;

    if (!
lastFocus) { // if last focus is neither of the container, refocus both containers.
        
alphaLayout.setFocus();
        
mainLayout.setFocus();
    }

    
lastFocus true;
}

mainLayout.onKillFocus() {
    
mainFocus false;

    if (
alphaLayout.isActive()) lastFocus true; else lastFocus false;
}

alphaLayout.onGetFocus() {
    
alphaFocus true;

    if (!
lastFocus) { // if last focus is neither of the container, refocus both containers.
        
mainLayout.setFocus();
        
alphaLayout.setFocus();
    }

    
lastFocus true;
}

alphaLayout.onKillFocus() {
    
alphaFocus false;

    if (
mainLayout.isActive()) lastFocus true; else lastFocus false;

might be buggy, but you get the idea. i did something similar with kameleon/warp. the downside of this is it will mess up the system right-click menu.
leechbite is offline   Reply With Quote
Old 29th August 2006, 22:56   #16
r4dius
Junior Member
 
r4dius's Avatar
 
Join Date: Mar 2002
Posts: 47
Hum one thing I forgot, I'll try to handle when "Desktop alpha" is disabled ^^
r4dius is offline   Reply With Quote
Old 30th August 2006, 21:28   #17
r4dius
Junior Member
 
r4dius's Avatar
 
Join Date: Mar 2002
Posts: 47
Hi again, just tried your code leechbite, actually i can't get it to work :/, ongetfocus is not working or something as I made a settext in a ongetfocus and it won't work :/
r4dius is offline   Reply With Quote
Old 31st August 2006, 01:10   #18
leechbite
Major Dude
 
leechbite's Avatar
 
Join Date: Sep 2003
Location: Canada
Posts: 635
Send a message via Yahoo to leechbite
oh yeah, i forgot ongetfocus is still broken. you can use a timer to check the focus on both containers periodically, maybe 10 times/sec.

checktimer.onTimer() {
if ((mainLayout.isActive() || alphaLayout.isactive()) {
if (!lastfocus) {
mainLayout.setFocus();
alphaLayout.setFocus();
}

lastfocus = true;
} else lastfocus = false;
}

or something like that.
leechbite is offline   Reply With Quote
Old 1st September 2006, 00:20   #19
r4dius
Junior Member
 
r4dius's Avatar
 
Join Date: Mar 2002
Posts: 47
thanks leechbite just tried it and it looks like it works perfectly , just added it to the original timer for windows "synch"
r4dius is offline   Reply With Quote
Old 1st September 2006, 00:41   #20
leechbite
Major Dude
 
leechbite's Avatar
 
Join Date: Sep 2003
Location: Canada
Posts: 635
Send a message via Yahoo to leechbite
no prob. now try doing some right-click menus..
leechbite is offline   Reply With Quote
Old 1st September 2006, 00:45   #21
r4dius
Junior Member
 
r4dius's Avatar
 
Join Date: Mar 2002
Posts: 47
ahah how that ?
there's no problem execpt if i right click the clear window when it's not focused (it focuses the window but kills the popup, it works fine when focused) is it what you mean ?
r4dius is offline   Reply With Quote
Old 1st September 2006, 01:31   #22
leechbite
Major Dude
 
leechbite's Avatar
 
Join Date: Sep 2003
Location: Canada
Posts: 635
Send a message via Yahoo to leechbite
yup. also, i might affect right-click on the winamp tab on the taskbar.
leechbite is offline   Reply With Quote
Old 1st September 2006, 01:41   #23
r4dius
Junior Member
 
r4dius's Avatar
 
Join Date: Mar 2002
Posts: 47
I see, so you mean winamp coders don't want us to make perfect working stuff ^^
r4dius is offline   Reply With Quote
Old 1st September 2006, 06:15   #24
Mr Jones
Nothing to say...
 
Mr Jones's Avatar
 
Join Date: Sep 2000
Location: UK
Posts: 23,063
God no, that's half the fun....
Mr Jones is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Skinning and Design > Modern Skins

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump