Page MenuHomePhabricator

efl.ui.spin
Open, TODOPublic

Description

class Efl.Ui.Spin @beta
├ (P) special_value
├ (E) changed
├ (E) min,reached
├ (E) max,reached

Related Objects

StatusAssignedTask
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
Resolvedbu5hm4n
InvalidNone
InvalidNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
bu5hm4n created this task.May 3 2019, 11:58 AM
bu5hm4n triaged this task as TODO priority.
zmike added a comment.Wed, Jun 12, 9:49 AM
struct @beta Efl.Ui.Spin_Special_Value
{
   [[Special value]]
   value: double; [[Target value]]
   label: string; [[String to replace]]
}
zmike added a comment.Wed, Jun 12, 9:50 AM

This special_value is pretty weird. It feels like it should be a format thing?

zmike moved this task from Backlog to Evaluating on the efl: api board.Wed, Jun 12, 9:51 AM

Totally agreed. I think we should have simply implemented the format mixin on this here...

The min max events, should they be on the range interactive interface ?

zmike added a comment.Thu, Jun 13, 6:11 AM

I agree with both of the above ideas.

How would you implement the special values with a format string? The Efl.Ui.Format mixin is still beta and I do not understand how format_string and format_cb interact.

Also, the min,max events belong to the Efl.Ui.Range_Display interface, since it's the one actually defining the min and max values, and the range value. The docs for Range_Display are all wrong, btw 😢

zmike added a comment.Fri, Jun 14, 7:15 AM

I agree with both of the above ideas.

And I still don't know how would you implement the special values with a format string.

zmike added a comment.Fri, Jun 14, 9:07 AM

I think you would use the callback?

I've written my concerns in T7898.

OK, I think the special_value property is redundant if we use the Efl.Ui.Format mixin. Probably a leftover from older times.

How about we remove special_value from here and we study if it is worth adding it to Efl.Ui.Format?

zmike added a comment.Tue, Jun 18, 9:00 AM

I think it's a corner case. This should be handled through the callback I think, if I'm remembering correctly how that works.

The callback can handle every case. format_string is useful for printf-like strings, and I think special_value could be beneficial too.
I would not consider it a corner case, since that is how spinners with weekday names, or month names are implemented.

zmike added a comment.Tue, Jun 18, 9:24 AM

Yea I read this before I saw the format ticket comments.