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

Sliders use integer values instead of floating point values #1772

Open
InfinityGhost opened this issue Aug 16, 2020 · 0 comments · May be fixed by #1773
Open

Sliders use integer values instead of floating point values #1772

InfinityGhost opened this issue Aug 16, 2020 · 0 comments · May be fixed by #1773
Milestone

Comments

@InfinityGhost
Copy link

A large majority of platforms support floating point values, where the abstraction uses integers for the slider value. This severely limits the usefulness of sliders.
This might be this way is because of one or more platforms only supporting integer values for sliders, however that really shouldn't limit every other platform just for that, it could instead just round to nearest integer.

Code that Demonstrates the Problem

// Shortened for brevity
namespace Eto.Forms
{
    [Handler(typeof(IHandler))]
    public class Slider : Control
    {
        public int MaxValue { get; set; }
        public int MinValue { get; set; }
        public int Value { get; set; }
    }
}

Suggested change

// Shortened for brevity
namespace Eto.Forms
{
    [Handler(typeof(IHandler))]
    public class Slider : Control
    {
        public double MaxValue { get; set; }
        public double MinValue { get; set; }
        public double Value { get; set; }
    }
}

Specifications

  • Version: 2.5.4 NuGet package
@InfinityGhost InfinityGhost linked a pull request Aug 16, 2020 that will close this issue
8 tasks
@cwensley cwensley added this to the 3.0 milestone Jan 13, 2021
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

Successfully merging a pull request may close this issue.

2 participants