Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken options: :left, :top, :resizable #49

Open
translunar opened this issue Sep 7, 2011 · 6 comments
Open

Broken options: :left, :top, :resizable #49

translunar opened this issue Sep 7, 2011 · 6 comments

Comments

@translunar
Copy link
Contributor

It looks like the image method definition is trying to set the top and left positions of the Image object, but it doesn't actually appear to work. Is this normal?

I also can't get :resizable => false to work on the window method. I didn't try it on app.

Loving green_shoes so far. Trying to use it to build a GUI for rubyvis / sciruby.

John

@ashbb
Copy link
Owner

ashbb commented Sep 8, 2011

Hi John,

Yeah, the image method with :left and :top attributes doesn't work well for now. This is a bug. But sorry, I've no good solution so far.
So, please write the code like this:

require 'green_shoes'
Shoes.app do
 image('./something.png').move 100, 100
end

If you can use the latest Green Shoes on Github, you can also write like this:

require 'green_shoes'
Shoes.app do
 style Shoes::Image, nocontrol: true
 image './something.png', left: 100, top: 100
end

The :resizable attirbute is not supported in Green Shoes so far.

BTW, are you trying to use Green Shoes to build a GUI for rubyvis / sciruby? Awesome!!
On GitHub? Please let me know!

ashbb

@translunar
Copy link
Contributor Author

Thanks. I was able to get it to work with move eventually.

And yes, I've been experimenting with using green shoes for a plotter GUI. You can find it in the gui branch of SciRuby/sciruby on github. (I have some more code I'll push today, most likely.)

FYI, though: I'm a terrible coder. Most likely someone else will come back and improve upon my ideas (clbustos has already threatened to), which is most of what I was hoping for. :)

Thanks again.
John

On Sep 8, 2011, at 6:57 AM, [email protected] wrote:

Hi John,

Yeah, the image method with :left and :top attributes doesn't work well for now. This is a bug. But sorry, I've no good solution so far.
So, please write the code like this:

require 'green_shoes'
Shoes.app do
image('./something.png').move 100, 100
end

If you can use the latest Green Shoes on Github, you can also write like this:

require 'green_shoes'
Shoes.app do
style Shoes::Image, nocontrol: true
image './something.png', left: 100, top: 100
end

The :resizable attirbute is not supported in Green Shoes so far.

BTW, are you trying to use Green Shoes to build a GUI for rubyvis / sciruby? Awesome!!
On GitHub? Please let me know!

ashbb

Reply to this email directly or view it on GitHub:
#49 (comment)

@ashbb
Copy link
Owner

ashbb commented Sep 9, 2011

Hi John,

Thank you for the fantastic suggestion. Try out sample56. ;-)

ashbb

@translunar
Copy link
Contributor Author

Oh, nice! I actually implemented something very similar, but which also accepts an RSVG::Handle, in case the image has already been read.

The code's pretty similar to yours.

http://github.com/mohawkjohn/green_shoes

You'll also notice code in there for code_box, which is like edit_box but for Gtk::SourceView and Gtk::SourceBuffer. (I was preparing to do a pull request, but wanted to test a bit more first.)

@translunar
Copy link
Contributor Author

Okay. Instead of doing a pull request, I'd just suggest you look at the commits I made in my fork (except for adding the gemspec). I also added a trivial resize method to App, and an option to set :title on alerts.

Possibly code_box should be a plugin instead.

@ashbb
Copy link
Owner

ashbb commented Sep 10, 2011

Hi John,

I've looked at your commits. The code_box, resize method and :title on alert are great ideas. Are they completed? If so, I'd like to merge your commits into my master repo. So, could you send me a pull request?

ashbb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants