intel / rib

Rapid Interface Builder (RIB) is a browser-based design tool for quickly prototyping and creating the user interface for web applications. Layout your UI by dropping widgets onto a canvas. Run the UI in an interactive "Preview mode". Export the generated HTML and Javascript. It's that simple!
https://01.org/rib
Apache License 2.0
148 stars 74 forks source link

Fixed a background image bug #122

Closed wuyongfeng closed 12 years ago

wuyongfeng commented 12 years ago

[Widgets] Fixed Bug: The background image resizes upon insertion of many widgets, distorting itself Description

EXACT STEPS LEADING TO PROBLEM:

  1. Open RIB.
  2. Specify a link pointing to an image in the background input of the page.
  3. Insert lots of widgets. ACTUAL OUTCOME:

    The background image keeps resizing, distorting itself. EXPECTED OUTCOME:

    The image should be fixed.

wuyongfeng commented 12 years ago

I am sorry,Commit Has been modified, and the Pull requests.

grgustaf commented 12 years ago

I don't think this is a clear improvement. Really, the behavior the user wants for the image completely depends on what the image is. If it's photo, the old method tends to be better. If it is a pattern, they would want to tile it. For something like a color gradient or abstract painting where the scale doesn't really matter, then this patched version might be perfect since it always keeps the image taking up the full screen. But for photos is not good.

Since I don't think it's markedly better than the previous implementation I'm not really wanting to merge this.

I guess what we could do is present some properties that let the user choose what the behavior should be. However, doing this with the "style=" attribute is wrong from the get-go. We really shouldn't be teaching users to do that because the right way is through CSS. So I'd probably prefer to wait until we have some support for modifying the user's CSS file before we go farther with this.

zhizhangchen commented 12 years ago

The main purpose of the PR is to fix the distorting bug. As for the tiling thing, we can add more properties to handle it. As for the "style=" problem, we can improve the implementation by adding a "main.css", which is generated when serializing ADM tree. Styles can be put in that file. So I suggest we still accept this PR and we can send other PRs for the "more properties" and "style=" things.

wuyongfeng commented 12 years ago

Demand a mess and not very clear, to do so whether it is worth

grgustaf commented 12 years ago

OK, I accepted the patch. Really, just because QA files a bug doesn't mean that we have to fix it even when it doesn't really make progress. They can now just as well file a bug about the image aspect ratio being distorted. Instead, we need a more comprehensive solution.