Bug 409818 - For float bit depths, some fraction inputs convert too early, making it impossible to type in some fractions
Summary: For float bit depths, some fraction inputs convert too early, making it impos...
Alias: None
Product: krita
Classification: Applications
Component: Color Selectors (show other bugs)
Version: 4.2.2
Platform: Microsoft Windows Microsoft Windows
: NOR minor
Target Milestone: ---
Assignee: Jasper
Depends on:
Reported: 2019-07-15 13:24 UTC by kram.fama
Modified: 2019-09-13 10:02 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description kram.fama 2019-07-15 13:24:05 UTC

In the specific color selector, if you switch to either 16bit or 32bit float color input, you can't put in any fractions that start with 1/6 or 1/8 (other than 1/8 and 1/6 themselves) because as soon as you hit 6 or 8 the result is evaluated. For example, 1/64 can not be put in. As far as I could tell, these two specific families of fractions are the only ones affected.

1. Open new document
2. Find or add Specific Color Selector Dock
3. Change bit depth to 16 or 32 bit float
4. For any of the fields, type in 1/6 or 1/8


The input immediately evaluates to 0,16 or 0,12 respectively


Before conversion, further input should be awaited in case a more complicated expression is desired. For example, 1/7 will not instantly convert and you could type out 1/78 or what ever you like before conversion happens.


 Version: 4.2.2
 Languages: de, en_US
 Hidpi: true


  Version (compiled): 5.12.4
  Version (loaded): 5.12.4

OS Information

  Build ABI: x86_64-little_endian-llp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: winnt
  Kernel Version: 10.0.17763
  Pretty Productname: Windows 10 (10.0)
  Product Type: windows
  Product Version: 10
Comment 1 vanyossi 2019-07-16 04:44:30 UTC
16bit float
2/64 and 2/84 can be written but 2/34 and 2/78 can't

its possible to write 2/34, but not 2/341
Comment 2 Halla Rempt 2019-08-13 07:36:54 UTC
Hi Jasper,

Are you going to work on this? If so, and if you've got questions, please join the rest of the developers on #krita on irc.freenode.net.
Comment 3 Dmitry Kazakov 2019-09-13 10:02:09 UTC
Git commit 92b37d03c08ffd4ac2fad2c09d3c28124b871b9a by Dmitry Kazakov, on behalf of Jasper Hartog.
Committed on 13/09/2019 at 10:00.
Pushed by dkazakov into branch 'krita/4.2'.

Stop too early converting of fractions of the FloatColorInput

Fix the input field from converting the fractions too early by blocking
the input field from signals from the slider.
The slider would trigger the input with a rounded value which resulted
in the early conversion.

M  +4    -0    libs/widgets/kis_color_input.cpp