problems in skinning revolution

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

problems in skinning revolution

Post by shadowslash » Fri Apr 17, 2009 7:14 pm

i'm developing a skinning method for runtime revolution and i've encountered some problems, the only way to create a custom Minimize, Maximize, Close button on the upper right part of the program is to set the stack decorations to empty... but another problem sprung up.. with the stack decoration set to empty, the taskbutton for my program will also be hidden! i wanna know if there're any ways to get around this problem?
Image
as you can see on the screenshot above, only the Revolution GUI has a taskbar button... here's a full body screenshot of the skinning system that i'm making for runtime revolution...
Image
any answer is greatly appreciated! Image
Parañaque, Philippines
Image
Image

TonyL
Posts: 24
Joined: Mon Aug 07, 2006 1:15 am

Post by TonyL » Sat Apr 18, 2009 10:37 pm

try this:

on preOpenStack
set the decorations of this stack to "title","minimize","close"
wait 1 second
end preOpenStack

PS. Don't forget to set your stack decorations back to empty before saving.

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

Post by shadowslash » Mon Apr 20, 2009 7:28 pm

it did show the task button but it still won't do, all i got was a doubled set of buttons as shown on the screenshot below...

Image
Parañaque, Philippines
Image
Image

margueratesullivan
Posts: 1
Joined: Mon Apr 20, 2009 12:32 pm

Post by margueratesullivan » Tue Apr 21, 2009 10:30 am

Does anyone know where I can find a living room decoration planner online?
Ikea has a similar thing online called a ktichen planner. But I have a brown and cream lviing room (brown carpet, cream furniture) and I am loking for tips and ideas, as I am redecorating soon.
prosenjit

whelkybaby
Posts: 47
Joined: Sat Nov 17, 2007 6:04 pm

Post by whelkybaby » Tue Apr 21, 2009 10:27 pm

Random idea...

How about creating a substack with a title that is the same as your window but called something like "fakeStack", setting its location to somewhere that's off the screen (e.g. set the bottomRight of stack "fakeStack" to -500,-500) and going straight to your main stack on the resume event?

Only drawback I can think of whether the alt-tab window-shuffler will show two windows or one window?

Steve

P.S. Happy birthday in a day or two!

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Post by mwieder » Wed Apr 22, 2009 7:02 am

I realize it's not quite the effect you're looking for, but how about

set the decorations of this stack to title
set the title of this stack to space

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

Post by shadowslash » Wed Apr 22, 2009 1:31 pm

thank you for the suggestions.. the one where i create the substack and stuff won't do because it WILL show the taskbar button but when the user uses alt+tab there would be lots of problem with that... as for the last suggestion, the one to use

Code: Select all

set the decoration of this stack to "title"
it won't do either because it only hid the three buttons in the upper right of the program but it still shows the main title toolbar whereas should have been the function of the title bar in the skinned program itself... Image
Parañaque, Philippines
Image
Image

SparkOut
Posts: 2943
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Wed Apr 22, 2009 3:26 pm

In your button to minimize the skinned window, try

Code: Select all

on mouseUp
   set the decorations of this stack to "title"
   set the iconic of this stack to true
end mouseUp
and in the stack script put

Code: Select all

on unIconifyStack
   send "unIconifyMe" to this stack in 0 milliseconds
end unIconifyStack

on unIconifyMe
   set the decorations of this stack to empty
end unIconifyMe
For some reason in a standalone if you try to set the decorations in the on unIconifyStack handler directly, it will set the stack as invisible too.

You will get a momentary flash of the regular Windows title bar as the window then animates its minimisation. You can set the visible of the stack to false beforehand, and then set to true again after setting the iconic of the stack if you want to avoid this, but that will mean you get no animation of the window minimising - it just looks like it vanishes and perhaps people will not notice the taskbar icon.

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

Post by shadowslash » Wed Apr 22, 2009 3:29 pm

thank you for the answer but how will i show the task bar button when the program is not minimized.. i need to show it without showing the native windows title bar on top of the program because the skin already has that in it's function... Image
Parañaque, Philippines
Image
Image

SparkOut
Posts: 2943
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Wed Apr 22, 2009 7:11 pm

Hmm. I actually don't know. It may be linked to the bugs 7530 and 7531 and or generally miss-hitting when it comes to windows with no control decorations.

SparkOut
Posts: 2943
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Wed Apr 22, 2009 8:53 pm

OK, here's a workaround:

Use a custom window shape, which will mean that the window decorations are not displayed, even though they can be left as set. It appears that in v 3.5 at least (maybe prior) setting a custom window shape will clear the decorations property. I'm not sure if this is intentional or not. I'm very confused by the iconification goings on, and I think it needs an overhaul.
However, import a 1 x 1 pixel image to be the rectangular shape of the stack. I suppose you could use a custom image with transparency to match your desired shape, and handle resizing a bit cleverly, but anyway, in the stack script:

Code: Select all

on resizeStack
   refitShape
end resizeStack

on uniconifyStack
   refitShape
end uniconifyStack

on preOpenStack
   refitShape
end preOpenStack

on refitShape
   set the rect of image id <theImageIdNr> to the rect of this stack
   set the topleft of image id <theImageIdNr> to 0,0
   set the windowShape of this stack to <theImageIdNr>
   set the decorations of this stack to "Title"
end refitShape
in the minimize button you can simply put

Code: Select all

on mouseUp
   set the iconic of this stack to true
end mouseUp
This should leave the icon on the taskbar while the program is active, and minimize to the taskbar too. On adjusting anything it seems that either the decorations or the windowshape get cleared as mutually exclusive by the engine, so the refitShape handler will put them back. I've played around with leaving one or other out and they seem to give inconsistent results, but the above appears to work - here on Windows XP at least.
HTH

(Happy almost birthday, too!)

Post Reply