Improve the memory reporter
ClosedPublic

Authored by woltherav on Feb 19 2019, 7:16 PM.

Details

Summary

Attempt at doing some of the stuff thought about in T10368

This turns the memory reporting button into a slider that fills up with color as the memory usage increases.

From 0% to 20% it'll be the themes' highlight color.
From 20 to 40% it'll mix to turn towards a dark yellow.
From 40% to 80% it'll mix to turn towards a darker red.
From 80% onwards it'll be red.

I did not remove the swapping warning icon, so that still triggers at 87.5% somewhere.

Below, blue is the highlight color of the theme.
Then two samples of the mid-tone color in a bright theme.
Then a sample of the high-end, I am swapping memory bar.
Finally, the bar's look in Fusion.

Problem: I've tried to also show the image size in the bar, that's the smaller fully filled rectangle. However, sometimes the image size is above the used memory size. In those cases I wasn't sure what to do, so I am current just not painting it in those cases. I am not sure why the image size can be above the memory size.

Test Plan

I've only tested with Breeze and Fusion, being on a Linux device.

Diff Detail

Repository
R37 Krita
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
woltherav requested review of this revision.Feb 19 2019, 7:16 PM
woltherav created this revision.
rempt accepted this revision.Feb 20 2019, 9:20 AM
rempt added a subscriber: rempt.

Works as advertised!

This revision is now accepted and ready to land.Feb 20 2019, 9:20 AM
This revision was automatically updated to reflect the committed changes.