1 /* 2 * Copyright (C) 2023 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.settingslib.spa.framework.theme 18 19 import androidx.compose.foundation.layout.PaddingValues 20 import androidx.compose.ui.unit.dp 21 22 object SettingsDimension { 23 val paddingTiny = 2.dp 24 val paddingSmall = 4.dp 25 val paddingLarge = 16.dp 26 val paddingExtraLarge = 24.dp 27 28 val itemIconSize = 24.dp 29 val itemIconContainerSize = 72.dp 30 val itemPaddingStart = paddingExtraLarge 31 val itemPaddingEnd = paddingLarge 32 val itemPaddingVertical = paddingLarge 33 val itemPadding = PaddingValues( 34 start = itemPaddingStart, 35 top = itemPaddingVertical, 36 end = itemPaddingEnd, 37 bottom = itemPaddingVertical, 38 ) 39 val textFieldPadding = PaddingValues( 40 start = itemPaddingStart, 41 end = itemPaddingEnd, 42 ) 43 val menuFieldPadding = PaddingValues( 44 start = itemPaddingStart, 45 end = itemPaddingEnd, 46 bottom = itemPaddingVertical, 47 ) 48 val itemPaddingAround = 8.dp 49 val itemDividerHeight = 32.dp 50 51 val iconLarge = 48.dp 52 53 /** The size when app icon is displayed in list. */ 54 val appIconItemSize = 32.dp 55 56 /** The size when app icon is displayed in App info page. */ 57 val appIconInfoSize = iconLarge 58 59 /** The vertical padding for buttons. */ 60 val buttonPaddingVertical = 12.dp 61 62 /** The [PaddingValues] for buttons. */ 63 val buttonPadding = PaddingValues(horizontal = itemPaddingEnd, vertical = buttonPaddingVertical) 64 65 /** The horizontal padding for dialog items. */ 66 val dialogItemPaddingHorizontal = itemPaddingStart 67 68 /** The [PaddingValues] for dialog items. */ 69 val dialogItemPadding = 70 PaddingValues(horizontal = dialogItemPaddingHorizontal, vertical = buttonPaddingVertical) 71 72 /** The sizes info of illustration widget. */ 73 val illustrationMaxWidth = 412.dp 74 val illustrationMaxHeight = 300.dp 75 val illustrationPadding = paddingLarge 76 val illustrationCornerRadius = 28.dp 77 } 78