1 /*
2  * Copyright (C) 2024 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.launcher3.taskbar.customization
18 
19 /** Taskbar Icon Specs */
20 object TaskbarIconSpecs {
21 
22     // Mapping of visual icon size to icon specs value http://b/235886078
23     val iconSize40dp = TaskbarIconSize(44)
24     val iconSize44dp = TaskbarIconSize(48)
25     val iconSize48dp = TaskbarIconSize(52)
26     val iconSize52dp = TaskbarIconSize(57)
27 
28     val transientTaskbarIconSizes = arrayOf(iconSize44dp, iconSize48dp, iconSize52dp)
29 
30     val defaultPersistentIconSize = iconSize40dp
31     val defaultTransientIconSize = iconSize44dp
32 
33     val minimumIconSize = iconSize40dp
34 
35     val defaultPersistentIconMargin = TaskbarIconMarginSize(6)
36     val defaultTransientIconMargin = TaskbarIconMarginSize(12)
37 
38     val minimumTaskbarIconTouchSize = TaskbarIconSize(48)
39 
40     val transientOrPinnedTaskbarIconPaddingSize = iconSize52dp
41 
42     val transientTaskbarIconSizeByGridSize =
43         mapOf(
44             TransientTaskbarIconSizeKey(6, 5, false) to iconSize52dp,
45             TransientTaskbarIconSizeKey(6, 5, true) to iconSize52dp,
46             TransientTaskbarIconSizeKey(4, 4, false) to iconSize48dp,
47             TransientTaskbarIconSizeKey(4, 4, true) to iconSize52dp,
48             TransientTaskbarIconSizeKey(4, 5, false) to iconSize48dp,
49             TransientTaskbarIconSizeKey(4, 5, true) to iconSize48dp,
50             TransientTaskbarIconSizeKey(5, 5, false) to iconSize44dp,
51             TransientTaskbarIconSizeKey(5, 5, true) to iconSize44dp,
52         )
53 }
54