On Thu, 2010-04-22 at 18:03 +0100, Thomas Wood wrote:
> > But my question now is, can i change the color of the bar online?
> > I want to change this color when the progress is on +50%, the default
> > color
> > now
> > is RED and i want to change it to GREEN when this take 51%.
> > Can i do it on Mx Clutter?
> > 
> > 
> This isn't something that we currently support, but I think it would be
> a good feature for the future.

wouldn't this be simply achieved by having a pseudo-class and calling:

  if (progress >= 0.5f)
    mx_stylable_set_style_pseudo_class (progress_bar, "is-valid");
  else
    mx_stylable_set_style_pseudo_class (progress_bar, "not-valid");

  mx_progress_bar_set_progress (progress_bar, progress);

inside the application code? after all, if the app imposes a particular
style on the progress bar then it should also be in charge of applying
that particular style depending on its own semantics.

(though, I agree that having an API like:

  mx_progress_bar_set_style_ranges (progress_bar,
                                    "pseudo-1", 0.0, 0.2,
                                    "pseudo-2", 0.2, 0.5,
                                    ...)

would be a fun addition to the class).

ciao,
 Emmanuele.

-- 
Emmanuele Bassi, Open Source Software Engineer
Intel Open Source Technology Center

_______________________________________________
Moblin dev Mailing List
dev@moblin.org

To manage or unsubscribe from this mailing list visit:
http://lists.moblin.org/listinfo/dev or your user account on http://moblin.org 
once logged in.

For more information on the Moblin Developer Mailing lists visit:
http://moblin.org/community/mailing-lists

Reply via email to