Snap memory slider to sensible/distinguishable values
@gnome-nuclearsunshine
Submitted by GN Link to original bug (#764862)
Description
The current memory slider has three issues that make it difficult to set rounded/useful allocations:
-
The slider increments by 64 MiB when adjusted using the keyboard (not sure if this varies according to , but after it reaches 1 GiB the displayed value is rounded to the nearest 0.1 GiB. This results in many keyboard-adjacent positions having the same displayed value since the increment is less than the rounding resolution.
-
The slider has single-pixel resolution when dragged with the mouse, resulting in (on my system - 32 GiB total), increments of ~35.3 MiB and adjacent values like 805.6 MiB, 840.9 MiB, 876.2 etc. This makes it impossible to select round allocation values with the mouse, and when combined with the rounding of the displayed value, makes it look like the user has selected a round value when in reality they will have a very odd allocation of e.g. ~35.3n+64 MiB.
-
The slider is sticky at its minimum value of 64 MiB, making it impossible to allocate even approximately 128 MiB with the mouse (at least on a system with a lot of physical memory).
I'd suggest instead, a non-linear series of discrete values for the slider, when using either the keyboard or mouse, preferably that correspond to exact-MiB values, e.g.:
< 1.0 GiB: 64 MiB increments (exact MiB value displayed)
= 1.0 GiB: 256 MiB increments (exact GiB value displayed, e.g. 1.25 GiB)
The active slider width is about 908 px, so this should result in full mouse/keyboard adjustability past 200 GiB of system memory. Past that the keyboard would be needed for fine adjustment.