Tuesday, June 12, 2007

Frame (Got It Right)

Seems that this time I got it right with the frame and I'll at last stop inondating my blog with it! QPainterPath was the answer and antialisasing works well now. The rounding factor for the corners can be made customizable although that would require a preview in the config dialog in my opinion.
Maybe too much settings (no frame, frame color, frame width, frame opacity, picture size, choose the picture, rounding factor...) are not suitable, not sure what people expect.



I'll put the code in playground/base which unfortunately is a mess so far with old automake stuff and new stuff... I'll keep you posted on how to build it from there, it'll be probably smart to be able to build /playground/base/plasma/ on its own, without having to get the whole of base.

11 comments:

Robin said...

imho the inner radius should be smaller than the outer radius:
inner_radius = outer_radius - border_thickness

Otherwise this look a little bit strange.

anyway... very nice work :)

mootchie said...
This comment has been removed by the author.
mootchie said...

Is it possible to use a custom (svg) image as frame?
[ no edit option :-/ ]

Hans said...

Agree with Gizzmo, otherwise it looks very nice.
Custom svg as frame would rock!

Unknown said...

I agree with Gizzmo too. Moreover I think the radius should be the same in y and x direction. Different radiuses look to amateurish to me.

Unknown said...

Great Annma!

Why there is the need of a preview in the config dialog?

Is it hard/inefficient to apply the changes directly to the plasmoid, and use itself as a "live preview"?

annma said...

at Gizzmo: ok, thanks for the tip, I made the inner radius smaller!
at Stefaan: done, same radius in x & y directions
at antonio: yes, very true!
at hans and joaquim (my son is called Joachim :): how would I do that? open a file dialog from the config dialog so the user select a SVG file?
at thomas: yes, thanks for your ideas, that seems the best!

Unknown said...

also "no frame" is == to "0 frame width" :P

Cossidhón said...

Hi,

How about a slideshow function, you now, all pictures in dir. Slideshow speed settings en transition effects then come to mind. That way it looks just like the Vista equivalent in how much dev time? :-)

mootchie said...

Hey,

I usually over complicate stuff, so this might be more than you intended to do in this widget.

Using svg for a frame will probably need more than just a simple file dialog.
There's the problem of the image's dimension and the frame's dimension, so you might need something like:

* set image origin (relative to the frame) - x and y;
* keep image aspect ratio [yes/no] (no - will stretch to fit all frame) or scale frame to match the image size.

using inkscape to do a quick and ugly example:
ugly_frame.svg
example

Anyway it looks great as it is.

Another nice option would be to copy the link to the image/file.

Hans said...

>> Maybe too much settings (no frame, frame color, frame width, frame opacity, picture size, choose the picture, rounding factor...) are not suitable, not sure what people expect.

I think it would be nice if you simply could choose from a range of existing frames. Then, there will be an option to create a custom frame, where the options you listed will be shown. Maybe you should be able to edit existing frames too?

As for the SVG image, I don't know how to implant it. I just think it would be nice to have frame like postage stamps, the one JoaquimLeiteiro posted etc.

If you want I can draw a mockup to show how I think the frame configuration could look like. Note that I'm not an artist/usability expert, just a normal user with opinions. :)