Skip to content

Version 2.4.0

Compare
Choose a tag to compare
@rydmike rydmike released this 15 Apr 20:42
· 126 commits to master since this release

[2.4.0] - April 15, 2022

FIX

  • Fixes issue #44 "High wheelWidth cause wrong cursor position in the ColorPicker"

NEW FEATURES

  • The order of the action buttons Cancel - OK on the bottom of the built-in
    dialog can be changed to OK - Cancel. come in three flavors controlled by enum
    ColorPickerActionButtonOrder having values:

    • okIsRight this is the default in order to no break past behavior.
    • okIsLeft
    • adaptive order depends on platform. Windows uses okIsLeft others
      okIsRight.

    The feature is enabled via the ColorPickerActionButtons configuration
    and its new property dialogActionOrder.

  • By default, the picker tries to set focus to its own widgets when it is
    created. It does this when either [ctrlC] or [ctrlV] are enabled in
    order for the keyboard listener to be able to react to copy-paste events
    even if no control on the widget has been focused yet.
    If you need another widget to retain focus, e.g., if the picker is used on a
    surface/scope shared with other widgets and not in its own dialog, then
    setting [autoFocus] to false might help.

    If both [ctrlC] and [ctrlV] are false, the picker yields the focus the
    same way as setting [autoFocus] false, but then you have no keyboard shortcut
    copy-paste functions at all. With [autoFocus] false, you can still use
    keyboard copy-paste shortcuts and yield the focus from the picker.
    When you do this, the copy-paste keyboard shortcuts will not work until
    one of the pickers components have been focused by interacting with them.

    The picker still grabs focus when you click on its background, as one way
    to set focus to keyboard listener to enable copy-paste keyboard shortcuts
    or when you operate any of its controls, the control in question
    always gains focus.

    You can now turn OFF the autofocus used by the keyboard listener by setting
    autoFocus to false in ColorPickerCopyPasteBehavior.

    This new feature can potentially also be used to address issue #33.

UPDATED

  • The generated Material Color swatch you get when you click on any color in the
    wheel picker has been updated and is a bit improved. It is still not the
    actual M2 MaterialColor swatch algorithm, like the Tonal Palette is when it
    comes to Material 3. Which is using the actual seed algorithm for the primary
    tonal palette you get with the selected color as input. The wheel does detect when
    you have selected any Material 2 swatch color and shows its swatch then.
    For other colors, it computes a MaterialColor swatch. This swatch
    is still not using the correct algorithm, but it is a bit better looking
    than before.

    There is currently no know Dart implementation of this algorithm, if there
    were it would be in use here. There are some versions in JS of the algorithm
    that have been reverse engineered from the Material 2 design guide website.
    If someone wants to make a Dart version, that would be fabulous. Links and more
    information can be found in ColorTools.createPrimarySwatch

WED DEMO

The web demo app has been updated to demonstrate above new features.