librelist archives

« back to archive

Fwd: [shoes4] ShoesComposite and ShoesLayout (#83)

Fwd: [shoes4] ShoesComposite and ShoesLayout (#83)

From:
Peter Fitzgibbons
Date:
2012-07-02 @ 14:48
HI Folks,
Firstly, I'm ccing to ML for wider audience.

Secondly, I am sorry that I have not had real time to put forth to research
or contribution to the codebase lately.  OTOH, you all get a GorillaSize
pat on the back for astounding effort and contribution to the code base!
 You can all be proud.

Now, on to the topic.
"you can use transparent colors for backgrounds on slots that hold text" in
Shoes3.  In SWT you can't?  This sounds ridiculously specific, IMHO.
 Though I realize I don't have the research time to disprove it.

Could one of you rephrase this question (with possible pure-JRuby/SWT
example) of this and fwd to the SWT Dev ML ? (requires free reg at
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev)

Can one of you post a jpg of the failing example in Shoes4?

Shoes On!

Peter Fitzgibbons
(847) 859-9550
Email: peter.fitzgibbons@gmail.com
IM GTalk: peter.fitzgibbons
IM AOL: peter.fitzgibbons@gmail.com



On Mon, Jul 2, 2012 at 7:13 AM, Eric Watson <
reply+i-5354455-73d515affe3a29e9d8659f40dfa23b5b9b8e0675-11318@reply.github.com
> wrote:

> @ashbb if we want everyone to see this conversation, we'll have to start a
> new issue. Also related, which not everyone saw: (a Qt backend)[
> https://github.com/shoes/shoes4/issues/38#issuecomment-6670333]
>
> Here's what I don't yet understand. In Shoes 3, you can use transparent
> colors for backgrounds on slots that hold text, as below. It seems like if
> we can't use Swt Composites, we will have to "fake" all layout and manually
> manage drawing all of the elements on a single canvas. This is what
> @pjfitzgibbons **really** doesn't want to do.
>
> But I don't know if a framework exists that will manage any of this heavy
> lifting for us.
>
> Transparency example (in Shoes 3):
>
> ![](https://img.skitch.com/20120702-nwkdfd991c4tiefn3x2jf45wp3.jpg)
>
> ```ruby
> Shoes.app do
>   @transparent_color = rgb(0, 200, 200, 100)
>   stack do
>     [firebrick, midnightblue].each do |color|
>       stack :width => 400, :height => 200 do
>         background color
>         tagline "opaque background", :stroke => white
>         para "text can't be transparent", :stroke => @transparent_color
>       end
>     end
>
>     @overlay = stack :width => 300, :height => 300, :left => 200, :top =>
> 50 do
>       background rgb(200, 200, 50, 100)
>       tagline "transparent background", :stroke => white
>       para "text can't be transparent", :stroke => rgb(0, 200, 200, 100)
>     end
>
>     stack :width => self.width, :height => self.height, :top => 0, :left
> => 0 do
>       fill @transparent_color
>       stroke rgb(40, 140, 100, 200)
>       strokewidth 8
>       @ball = oval :top => 0, :left => 72, :width => 300
>     end
>
>     subtitle "text can't be transparent", :stroke => @transparent_color
>   end
>
>   animate do |frame|
>     d1 = (Math.cos(frame/16) * 10).to_i
>     d2 = (Math.sin(frame/10) * 10).to_i
>     @ball.move @ball.left + d1, @ball.top + d2
>     @overlay.move @overlay.left, @overlay.top + d1
>   end
> end
> ```
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/shoes/shoes4/issues/83#issuecomment-6706547
>