-
Notifications
You must be signed in to change notification settings - Fork 31
/
styles.xml
239 lines (208 loc) · 11.6 KB
/
styles.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2019 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Control styles -->
<style name="Widget.BrowserUI.CheckBox" parent="Widget.Material3.CompoundButton.CheckBox">
<item name="buttonTint">@color/selection_control_button_tint_list</item>
<item name="android:minWidth">0dp</item>
<item name="android:minHeight">0dp</item>
<item name="android:textAppearance">@style/TextAppearance.TextMedium.Primary</item>
</style>
<style name="Widget.BrowserUI.RadioButton" parent="Widget.Material3.CompoundButton.RadioButton">
<item name="buttonTint">@color/selection_control_button_tint_list</item>
<item name="android:minWidth">0dp</item>
<item name="android:minHeight">0dp</item>
<item name="android:textAppearance">@style/TextAppearance.TextMedium.Primary</item>
</style>
<style name="Widget.BrowserUI.Switch" parent="Widget.MaterialComponents.CompoundButton.Switch">
<item name="thumbTint">@color/switch_thumb_tint_list</item>
<item name="trackTint">@color/switch_track_tint</item>
<item name="trackTintMode">src_in</item>
</style>
<style name="Widget.BrowserUI.Switch.Incognito" parent="Widget.MaterialComponents.CompoundButton.Switch">
<item name="thumbTint">@color/switch_thumb_tint_incognito_baseline_list</item>
<item name="trackTint">@color/switch_track_tint_incognito_baseline_list</item>
</style>
<!-- TextInputLayout style -->
<style name="Widget.BrowserUI.TextInputLayout" parent="Widget.Design.TextInputLayout">
<item name="errorTextAppearance">@style/TextAppearance.ErrorCaption</item>
</style>
<!-- Basic theme for an overflow menu displayed in Chrome. -->
<style name="Base.OverflowMenuThemeOverlay" parent="">
<item name="android:popupMenuStyle">@android:style/Widget.Material.PopupMenu</item>
<item name="android:popupBackground">@null</item>
<item name="android:listDivider">@null</item>
<item name="android:listPreferredItemHeightSmall">48dp</item>
<item name="android:textAppearance">@style/TextAppearance.TextLarge.Primary</item>
<item name="colorControlHighlight">@color/control_highlight_color</item>
</style>
<style name="OverflowMenuThemeOverlay" parent="Base.OverflowMenuThemeOverlay" />
<style name="AlertDialogButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
<item name="android:textAppearance">@style/TextAppearance.Button.Text.Blue</item>
</style>
<!-- Styled to match BlackHeadline but setup to override values in the app compat parent theme.
Note that the fontFamily doesn't get applied on older versions of Android.
See https://crbug.com/918697.-->
<style name="TextAppearance.AlertDialogTitleStyle"
parent="RtlOverlay.DialogWindowTitle.AppCompat">
<item name="android:textColor">@color/default_text_color_list</item>
<item name="android:textSize">@dimen/headline_size</item>
<item name="android:fontFamily">@font/accent_font</item>
<item name="android:textStyle">normal</item>
</style>
<style name="AlertDialogContent">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textAlignment">viewStart</item>
<item name="android:paddingStart">@dimen/dialog_padding_sides</item>
<item name="android:paddingEnd">@dimen/dialog_padding_sides</item>
<item name="android:paddingTop">@dimen/dialog_padding_top</item>
</style>
<style name="AlertDialogSummaryViewItem" parent="@android:style/TextAppearance.Small">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textAlignment">viewStart</item>
<item name="android:paddingTop">10dp</item>
</style>
<style name="ProgressBarStyle" parent="Widget.AppCompat.ProgressBar">
<item name="android:indeterminateTint">@macro/default_icon_color_accent1</item>
</style>
<!-- Switch styling for dark theme -->
<!-- TODO(sinansahin): See if we can pass the baseline dark theme to the incognito NTP instead.
-->
<style name="SwitchMaterialDark">
<!-- TODO(sinansahin): When we migrate the switch style to Material3, we should override
colorOnSurface and colorPrimary instead of these attributes because they are what
m3_selection_control_ripple_color_selector uses. -->
<item name="colorControlActivated">@color/default_control_color_active_dark</item>
<item name="colorControlHighlight">@color/default_control_color_highlight_dark</item>
<item name="switchStyle">@style/Widget.BrowserUI.Switch.Incognito</item>
</style>
<!-- Styling for an app menu item row. -->
<style name="AppMenuItem">
<item name="android:paddingStart">16dp</item>
<item name="android:paddingEnd">16dp</item>
<item name="android:background">?attr/listChoiceBackgroundIndicator</item>
</style>
<!-- Checkbox styles. -->
<style name="DefaultCheckboxStyle" parent="TextAppearance.TextMedium.Secondary">
<!-- The space between the checkbox and text. -->
<item name="android:paddingStart">16dp</item>
</style>
<style name="ModernToolbar" parent="Base.ModernToolbar">
<item name="android:background">@macro/default_bg_color</item>
</style>
<style name="Base.ModernToolbar" parent="Widget.MaterialComponents.Toolbar">
<item name="titleTextAppearance">@style/TextAppearance.Headline.Primary</item>
<item name="titleTextColor">@macro/default_text_color</item>
<item name="windowActionBarOverlay">true</item>
</style>
<style name="TextButton.OnAccent1" tools:ignore="UnusedResources">
<item name="android:textAppearance">@style/TextAppearance.Button.OnAccent1</item>
<item name="buttonTextColor">@color/default_text_color_on_accent1_list</item>
<item name="rippleColor">@color/filled_button_ripple_color</item>
</style>
<!-- Text styles -->
<!-- Primary text styles -->
<style name="TextAppearance.Headline.Primary">
<item name="android:textColor">@color/default_text_color_list</item>
</style>
<style name="TextAppearance.TextLarge.Primary">
<item name="android:textColor">@color/default_text_color_list</item>
</style>
<style name="TextAppearance.TextMediumThick.Primary">
<item name="android:textColor">@color/default_text_color_list</item>
</style>
<style name="TextAppearance.TextMedium.Primary">
<item name="android:textColor">@color/default_text_color_list</item>
</style>
<style name="TextAppearance.TextSmall.Primary">
<item name="android:textColor">@color/default_text_color_list</item>
</style>
<!-- Secondary text styles -->
<style name="TextAppearance.TextLarge.Secondary">
<item name="android:textColor">@color/default_text_color_secondary_list</item>
</style>
<style name="TextAppearance.TextMediumThick.Secondary">
<item name="android:textColor">@color/default_text_color_secondary_list</item>
</style>
<style name="TextAppearance.TextAccentMediumThick.Secondary">
<item name="android:textColor">@color/default_text_color_secondary_list</item>
</style>
<style name="TextAppearance.TextMedium.Secondary">
<item name="android:textColor">@color/default_text_color_secondary_list</item>
</style>
<style name="TextAppearance.TextSmall.Secondary">
<item name="android:textColor">@color/default_text_color_secondary_list</item>
</style>
<!-- Accent1 text styles -->
<style name="TextAppearance.TextMedium.Accent1">
<item name="android:textColor">@color/default_text_color_accent1_tint_list</item>
</style>
<style name="TextAppearance.TextMediumThick.Accent1">
<item name="android:textColor">@color/default_text_color_accent1_tint_list</item>
</style>
<style name="TextAppearance.TextSmall.Accent1">
<item name="android:textColor">@color/default_text_color_accent1_tint_list</item>
</style>
<style name="TextAppearance.TextLarge.Link" parent="TextAppearance.TextLarge">
<item name="android:textColor">@color/default_text_color_link_tint_list</item>
</style>
<style name="TextAppearance.TextMedium.Link" parent="TextAppearance.TextMedium">
<item name="android:textColor">@color/default_text_color_link_tint_list</item>
</style>
<style name="TextAppearance.TextSmall.Link" parent="TextAppearance.TextSmall">
<item name="android:textColor">@color/default_text_color_link_tint_list</item>
</style>
<!-- Formerly inverse text styles -->
<!-- Text styles used on dark background on light theme, and light background on dark theme. -->
<style name="TextAppearance.Headline.Primary.OnAccent1" tools:ignore="UnusedResources">
<item name="android:textColor">@color/default_text_color_on_accent1_list</item>
</style>
<style name="TextAppearance.TextMediumThick.Primary.OnAccent1" tools:ignore="UnusedResources">
<item name="android:textColor">@color/default_text_color_on_accent1_list</item>
</style>
<style name="TextAppearance.TextMedium.Primary.OnAccent1" tools:ignore="UnusedResources">
<item name="android:textColor">@color/default_text_color_on_accent1_list</item>
</style>
<style name="TextAppearance.TextSmall.Primary.OnAccent1" tools:ignore="UnusedResources">
<item name="android:textColor">@color/default_text_color_on_accent1_list</item>
</style>
<style name="TextAppearance.Button.OnAccent1" parent="TextAppearance.TextMediumThick.Primary.OnAccent1"/>
<!-- Chip Text Styles -->
<style name="TextAppearance.ChipText" parent="TextAppearance.TextAccentMediumThick">
<item name="android:textColor">@color/chip_text_color_secondary_list</item>
</style>
<style name="TextAppearance.ChipHint" parent="TextAppearance.TextAccentMediumThick">
<item name="android:textColor">@color/chip_text_color_secondary_list</item>
</style>
<!-- Other text styles -->
<style name="TextAppearance.BlackLink" tools:ignore="UnusedResources">
<item name="android:textColor">@color/default_text_color_secondary_list</item>
<item name="android:textSize">@dimen/text_size_medium</item>
<item name="android:textStyle">bold</item>
</style>
<style name="TextAppearance.BlackToolbarTitle" tools:ignore="UnusedResources">
<item name="android:textColor">@color/default_text_color_secondary_list</item>
<item name="android:textSize">@dimen/text_size_large</item>
<item name="android:textStyle">bold</item>
</style>
<style name="TextAppearance.EditorDialogSectionAddButton"
parent="TextAppearance.TextMedium.Link">
<item name="android:textAllCaps">true</item>
</style>
<!-- Disabled text styles -->
<style name="TextAppearance.TextLarge.Disabled" tools:ignore="UnusedResources">
<item name="android:textColor">@color/default_text_color_disabled_list</item>
</style>
<style name="TextAppearance.TextMedium.Disabled">
<item name="android:textColor">@color/default_text_color_disabled_list</item>
</style>
<style name="TextAppearance.TextSmall.Disabled" tools:ignore="UnusedResources">
<item name="android:textColor">@color/default_text_color_disabled_list</item>
</style>
</resources>