Jehan
c8c12f2ac1
libgimpwidgets: improve/fix more of GimpMemSizeEntry.
...
Looking further at this widget, many things are not right. Here are the
changes:
- Use binary prefixes (i.e. kibibyte, mebibyte and gibibyte) instead of
decimal ones. We are making binary shifts so we were actually showing
the wrong units.
- Round the value to the closest integer when showing it, not towards 0.
Otherwise I had cases where it was showing 7GiB for an actual value of
7.69GiB (default as computed by GIMP from my actual physical memory).
Note that I am actually unsure even rounding makes sense. Shouldn't we
rather show double values with a few digits after the decimal points?
For such values, I think it would make sense.
- Do not edit the internally saved accurate value when the entry is
edited to the same less accurate value as our saved value would be
shown too. In particular when changing the display unit to a bigger
one, we don't want to lose accuracy. This is especially true for low
values. Say you don't have a lot of memory and you set the Tile cache
size to 1.5GiB (1536MiB), you certainly don't want it to become either
1 or 2GiB when switching display unit to GiB. Now even if the number
will still display with less accuracy, the internal value will stay
accurate.
(cherry picked from commit d886bb1b90
)
2020-08-05 15:43:46 +02:00
..
2017-08-24 15:35:27 -04:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2019-07-25 10:26:11 +02:00
2019-07-24 01:26:11 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-09-18 14:41:35 -04:00
2018-07-11 23:47:19 +02:00
2019-02-08 08:22:45 -05:00
2019-02-04 16:50:36 -05:00
2019-01-02 01:53:02 +01:00
2018-07-11 23:47:19 +02:00
2019-06-29 16:27:05 +02:00
2018-07-11 23:47:19 +02:00
2018-09-18 14:41:35 -04:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2019-07-24 19:13:32 +02:00
2018-07-11 23:47:19 +02:00
2019-03-27 20:14:45 -04:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2019-07-24 19:13:32 +02:00
2018-07-11 23:47:19 +02:00
2018-09-18 14:41:35 -04:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-09-18 14:41:35 -04:00
2018-07-11 23:47:19 +02:00
2019-07-25 12:40:33 +02:00
2019-07-24 01:26:11 +02:00
2018-09-18 14:41:35 -04:00
2018-07-11 23:47:19 +02:00
2020-01-06 23:10:04 +02:00
2020-01-06 23:10:04 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2019-07-25 12:40:33 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-14 14:23:42 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2019-07-24 15:17:15 +02:00
2019-07-24 15:17:15 +02:00
2018-07-11 23:47:19 +02:00
2020-01-06 23:10:05 +02:00
2019-03-27 20:14:45 -04:00
2018-07-11 23:47:19 +02:00
2018-09-18 14:41:35 -04:00
2018-07-11 23:47:19 +02:00
2020-08-05 15:43:46 +02:00
2018-07-11 23:47:19 +02:00
2019-07-25 12:40:33 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2019-10-12 17:11:52 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2019-05-07 19:09:56 +09:00
2018-07-11 23:47:19 +02:00
2019-03-23 23:33:07 +00:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-09-18 14:41:35 -04:00
2018-07-11 23:47:19 +02:00
2019-03-09 07:43:13 -05:00
2018-07-11 23:47:19 +02:00
2019-03-09 07:43:13 -05:00
2018-07-11 23:47:19 +02:00
2018-09-18 14:41:35 -04:00
2018-07-11 23:47:19 +02:00
2020-04-20 18:45:17 +03:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2020-01-06 23:10:04 +02:00
2018-07-11 23:47:19 +02:00
2020-07-14 13:01:35 +03:00
2018-11-10 06:57:54 -05:00
2019-03-27 20:14:45 -04:00
2018-07-11 23:47:19 +02:00
2019-03-27 20:14:45 -04:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2019-07-25 12:40:33 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2019-07-24 01:26:11 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2019-03-09 07:43:13 -05:00
2019-02-05 03:49:51 -05:00
2018-11-10 06:57:54 -05:00
2019-06-01 16:43:07 +02:00
2019-06-01 16:43:07 +02:00
2018-03-19 23:11:27 +01:00
2019-07-24 15:17:15 +02:00
2018-07-11 23:47:19 +02:00
2018-07-11 23:47:19 +02:00
2018-09-18 14:41:35 -04:00
2018-07-11 23:47:19 +02:00
2018-11-19 09:28:58 -05:00
2020-01-06 23:10:04 +02:00
2018-07-11 23:47:19 +02:00