layouts: Make selection testable

From now on, all the parameters for loading layout are handled inside a single pure function, which makes them possible to test.

As a side benefit, the old preference order function composed of a mess of nested procedures is gone.
This commit is contained in:
Dorota Czaplejewicz
2021-04-05 10:36:41 +00:00
parent 93e4345e82
commit 1908769032
2 changed files with 212 additions and 102 deletions

View File

@ -600,7 +600,7 @@ impl View {
}
/// The physical characteristic of layout for the purpose of styling
#[derive(Clone, PartialEq, Debug)]
#[derive(Clone, Copy, PartialEq, Debug)]
pub enum ArrangementKind {
Base = 0,
Wide = 1,