akiraux / Akira

Native Linux App for UI and UX Design built in Vala and GTK
GNU General Public License v3.0
5.24k stars 203 forks source link

Add viewlayer masking #680

Closed mbfraga closed 2 years ago

mbfraga commented 2 years ago

Summary / How this PR fixes the problem?

Add ability to mask ViewLayers. This will work via a RAII class that on construction masks and on destruction unmasks a specific viewlayer. If the viewlayer is masked, it doesn't show even if it is technically set visible. This allows a user to easily scope when a viewlayer should be disabled temporarily.

This PR also includes some warning removals on newer versions of vala (0.54).

Finally this includes a significant improvment to selecting multiple things in the layer listbox by blocking unnecessarily selection change signals.

Steps to Test

Create 10k objects with "j". Select all by clicking first item in the list, and scrolling down and selection the last. It should now be significantly faster than before, and will generally scale linearly rather than squared :P