-
Notifications
You must be signed in to change notification settings - Fork 900
/
Copy pathbrave_styles.xml
494 lines (424 loc) · 22 KB
/
brave_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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2019 The Brave Authors. All rights reserved.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this file,
You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="BraveSwitchTheme">
<item name="colorControlActivated">#fb542b</item>
<item name="switchStyle">@style/Widget.MaterialComponents.CompoundButton.Switch</item>
</style>
<style name="BraveDialogTheme" parent="Theme.AppCompat.Light.Dialog.Alert">
<item name="windowNoTitle">true</item>
</style>
<style name="BraveRadioButton" parent="Theme.AppCompat.Light">
<item name="colorControlNormal">@color/schemes_on_surface_variant</item>
<item name="colorControlActivated">@color/schemes_primary</item>
</style>
<style name="TippingSwitchTheme">
<item name="colorControlActivated">@color/rewards_panel_action_color</item>
<item name="colorSwitchThumbNormal">@color/modern_grey_600</item>
<item name="android:colorForeground">@color/modern_grey_600</item>
</style>
<style name="AppBottomSheetDialogTheme"
parent="Theme.Design.Light.BottomSheetDialog">
<item name="bottomSheetStyle">@style/AppModalStyle</item>
<item name="android:windowSoftInputMode">adjustResize</item>
</style>
<style name="AppModalStyle" parent="Widget.Design.BottomSheet.Modal">
<item name="android:background">@drawable/rounded_top_corners</item>
</style>
<style name="AppSetDefaultBottomSheetDialogTheme"
parent="Theme.Design.Light.BottomSheetDialog">
<item name="bottomSheetStyle">@style/AppModalSetDefaultStyle</item>
</style>
<style name="AppModalSetDefaultStyle" parent="Widget.Design.BottomSheet.Modal">
<item name="android:background">@drawable/rounded_set_default_top_corners</item>
</style>
<!-- Brave Wallet -->
<style name="BraveWalletTextView" parent="Widget.AppCompat.TextView">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">@color/wallet_text_color</item>
<item name="android:textColorLink">@color/brave_link</item>
<item name="android:textSize">14sp</item>
</style>
<style name="BraveWalletTextViewTitle" parent="Widget.AppCompat.TextView">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">@color/wallet_text_color</item>
<item name="android:textColorLink">@color/brave_link</item>
<item name="android:textAppearance">?attr/textAppearanceListItem</item>
<item name="android:textStyle">bold</item>
</style>
<style name="BraveWalletTextViewSubTitle" parent="Widget.AppCompat.TextView">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">@color/brave_theme_subtitle_text</item>
<item name="android:textColorLink">@color/brave_link</item>
<item name="android:textAppearance">?attr/textAppearanceListItem</item>
</style>
<style name="BraveWalletCheckBox" parent="Widget.MaterialComponents.CompoundButton.CheckBox">
<item name="buttonTint">@color/wallet_checkbox_background_color_selector</item>
<item name="buttonIconTint">@color/wallet_checkbox_color_selector</item>
<item name="android:textSize">@dimen/default_regular</item>
<item name="lineHeight">20sp</item>
<item name="fontStyle">normal</item>
<item name="fontWeight">400</item>
</style>
<style name="BraveWalletEditTextTheme">
<!-- Text selection background color. -->
<item name="android:textColorHighlight">@color/primary_20</item>
<!-- Text selection handles color, blinking cursor color and selected border. -->
<!-- It must be set as a theme at component level -->
<!-- as we don't want to change it for the whole app. -->
<item name="colorControlActivated">@color/icon_interactive</item>
<!-- Hint text color that translates to the top of the view. -->
<item name="android:textColorHint">@color/text_primary</item>
</style>
<style name="BraveWalletInputLayout" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<!-- Border color. -->
<item name="boxStrokeColor">@color/wallet_onboarding_input_field_stroke_color</item>
<!-- Hint text color that translates to the top of the view. -->
<item name="hintTextColor">@color/text_primary</item>
<!-- Blinking cursor color. -->
<item name="cursorColor">@color/icon_interactive</item>
<!-- Blinking cursor color on error state. -->
<item name="cursorErrorColor">@color/system_feedback_error</item>
</style>
<!-- Brave Wallet buttons -->
<style name="BraveWalletButton" parent="Widget.AppCompat.Button">
<item name="buttonStyle">?android:attr/borderlessButtonStyle</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">@color/brave_white</item>
<item name="android:background">@drawable/crypto_wallet_blue_button</item>
<item name="android:foreground">?android:attr/selectableItemBackground</item>
<item name="android:paddingHorizontal">16dp</item>
<item name="android:paddingVertical">8dp</item>
<item name="android:textAllCaps">false</item>
<item name="android:textSize">16sp</item>
<item name="android:gravity">center</item>
</style>
<style name="BraveWalletOnboardingButton" parent="BraveWalletButton">
<item name="android:background">@drawable/crypto_wallet_onboarding_blue_button</item>
<item name="android:textColor">@color/crypto_wallet_onboarding_button_text_color</item>
<item name="android:foreground">@null</item>
</style>
<style name="BraveWalletTextButton" parent="Widget.AppCompat.Button">
<item name="buttonStyle">?android:attr/borderlessButtonStyle</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">@color/brave_action_color</item>
<item name="android:background">@android:color/transparent</item>
<item name="android:textAllCaps">false</item>
<item name="android:textSize">16sp</item>
<item name="android:gravity">center</item>
</style>
<style name="BraveWalletButtonHollow" parent="Widget.AppCompat.Button">
<item name="buttonStyle">?android:attr/borderlessButtonStyle</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">@color/wallet_text_color</item>
<item name="android:background">@drawable/crypto_wallet_hollow_button</item>
<item name="android:paddingStart">16dp</item>
<item name="android:paddingEnd">16dp</item>
<item name="android:paddingTop">8dp</item>
<item name="android:paddingBottom">8dp</item>
<item name="android:textAllCaps">false</item>
<item name="android:textSize">16sp</item>
<item name="android:gravity">center</item>
</style>
<style name="BraveWalletEditTextBordered" parent="Widget.AppCompat.EditText">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">@color/wallet_text_color</item>
<item name="android:background">@drawable/rounded_wallet_edittext</item>
<item name="android:textColorHint">@color/brave_theme_hint_text</item>
<item name="android:padding">8dp</item>
<item name="android:textSize">14sp</item>
<item name="android:gravity">top</item>
<item name="android:textCursorDrawable">@null</item>
</style>
<!-- Buttons for Brave Sync -->
<style name="BraveSyncButton">
<item name="android:textColor">@android:color/white</item>
<item name="android:background">@drawable/brave_sync_btn</item>
<item name="android:layout_marginStart">15dp</item>
<item name="android:layout_marginEnd">15dp</item>
<item name="android:layout_marginBottom">15dp</item>
<item name="android:textAllCaps">false</item>
<item name="android:textSize">14sp</item>
</style>
<style name="BraveSyncTabsTextAppearance" parent="TextAppearance.Design.Tab">
<item name="textAllCaps">false</item>
<item name="android:textAllCaps">false</item>
</style>
<style name="BraveSyncButtonTransparent">
<item name="android:textColor">@color/brave_sync_btn_transparent_text_color</item>
<item name="android:background">@drawable/brave_sync_btn_transparent</item>
<item name="android:layout_marginStart">15dp</item>
<item name="android:layout_marginEnd">15dp</item>
<item name="android:layout_marginBottom">15dp</item>
<item name="android:textAllCaps">false</item>
<item name="android:textSize">14sp</item>
</style>
<style name="BraveSyncBottomButton">
<item name="android:layout_marginBottom">15dp</item>
<item name="android:textAllCaps">false</item>
<item name="android:textSize">14sp</item>
</style>
<style name="BraveSyncRedWarningTextSmallSemibold" parent="SmallSemibold">
<item name="android:lineSpacingExtra">2sp</item>
<item name="android:translationY">-0.97sp</item>
<item name="android:gravity">top</item>
<item name="android:textSize">12sp</item>
<item name="android:textColor">@color/systemfeedback_error_text</item>
<item name="android:textStyle">bold</item>
</style>
<style name="BraveSyncTitleTextHeadingH4" parent="HeadingH4">
<item name="android:textSize">16sp</item>
<item name="android:textColor">@color/text_primary</item>
<item name="android:textStyle">bold</item>
<item name="android:lineSpacingExtra">5sp</item>
<item name="android:translationY">-2.62sp</item>
</style>
<style name="BraveSyncDescriptionTextDefaultRegular" parent="DefaultRegular">
<item name="android:lineSpacingExtra">4sp</item>
<item name="android:translationY">-1.8sp</item>
<item name="android:textSize">14sp</item>
<item name="android:letterSpacing">-0.01</item>
<item name="android:textColor">@color/text_primary</item>
</style>
<style name="BookmarkTabPopupMenu" parent="Theme.AppCompat.DayNight">
<item name="android:textColor">@color/bookmark_menu_text_color</item>
<item name="android:popupBackground">@drawable/bookmark_menu_bg</item>
<item name="android:popupElevation">20dp</item>
<item name="android:popupMenuStyle">@drawable/bookmark_menu_bg</item>
</style>
<style name="NewTabPopupMenuLight" parent="Widget.AppCompat.PopupMenu">
<item name="android:textColor">@android:color/black</item>
<item name="android:itemBackground">@android:color/white</item>
</style>
<style name="NewTabPopupMenuDark" parent="Widget.AppCompat.PopupMenu">
<item name="android:textColor">@color/new_tab_menu_text_dark_color</item>
<item name="android:itemBackground">@color/new_tab_menu_bg_dark_color</item>
</style>
<style name="BraveTranslucent" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@color/translucent_activity_background_color</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:backgroundDimEnabled">false</item>
</style>
<style name="TippingBraveTranslucent" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@color/translucent_activity_background_color</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:backgroundDimEnabled">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:windowTranslucentStatus">false</item>
<item name="android:statusBarColor">#00000000</item>
</style>
<style name="BraveWalletAlertDialogTheme" parent="ThemeOverlay.MaterialComponents.MaterialAlertDialog">
<item name="android:background">@color/wallet_bg</item>
<item name="android:colorBackground">@color/wallet_bg</item>
</style>
<style name="BraveWalletTabsTextAppearance" parent="TextAppearance.Design.Tab">
<item name="textAllCaps">false</item>
</style>
<style name="BraveVpnToolbar" parent="Theme.AppCompat.Light">
<item name="colorControlNormal">@android:color/white</item>
<item name="android:background">@color/brave_plan_bg</item>
<item name="titleTextColor">@android:color/white</item>
<item name="android:textColorPrimary">@android:color/white</item>
</style>
<style name="VpnPaywallToolbar" parent="Theme.AppCompat.Light">
<item name="colorControlNormal">@android:color/white</item>
<item name="android:background">@color/primitive_blurple_10</item>
<item name="titleTextColor">@android:color/white</item>
<item name="android:textColorPrimary">@android:color/white</item>
</style>
<style name="BraveLeoToolbar" parent="Theme.AppCompat.Light">
<item name="colorControlNormal">@android:color/white</item>
<item name="android:background">@color/primitive_blurple_10</item>
<item name="titleTextColor">@android:color/white</item>
<item name="android:textColorPrimary">@android:color/white</item>
</style>
<!-- Wallet DApps -->
<style name="BraveWalletTextViewWhite">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">@android:color/white</item>
</style>
<style name="BraveWalletDAppNotificationDialogBottom" parent="@android:style/Theme.Dialog">
<item name="android:windowMinWidthMajor">98%</item>
<item name="android:windowMinWidthMinor">98%</item>
<item name="android:windowAnimationStyle">@style/BraveWalletDialogBottomAnimation</item>
</style>
<style name="BraveWalletDialogBottomAnimation">
<item name="android:windowEnterAnimation">@anim/slide_in_bottom</item>
<item name="android:windowExitAnimation">@anim/slide_out_bottom</item>
</style>
<style name="BraveWalletDAppNotificationDialogTop" parent="@android:style/Theme.Dialog">
<item name="android:windowMinWidthMajor">98%</item>
<item name="android:windowMinWidthMinor">98%</item>
<item name="android:windowAnimationStyle">@style/BraveWalletDialogTopAnimation</item>
</style>
<style name="BraveWalletDialogTopAnimation">
<item name="android:windowEnterAnimation">@anim/slide_in_top</item>
<item name="android:windowExitAnimation">@anim/slide_out_top</item>
</style>
<style name="ApproveTxBottomSheetDialogStyle" parent="Widget.MaterialComponents.BottomSheet.Modal">
<item name="shapeAppearance">@style/ShapeAppearanceRoundedCorners</item>
<item name="shouldRemoveExpandedCorners">false</item>
<item name="behavior_skipCollapsed">true</item>
<item name="backgroundTint">@color/container_background</item>
</style>
<style name="ShapeAppearanceRoundedCorners" parent="ShapeAppearance.MaterialComponents.LargeComponent">
<item name="cornerFamily">rounded</item>
<item name="cornerSize">30dp</item>
</style>
<style name="ApproveTxBottomSheetDialogTheme" parent="ThemeOverlay.MaterialComponents.BottomSheetDialog">
<item name="bottomSheetStyle">@style/ApproveTxBottomSheetDialogStyle</item>
</style>
<!-- Brave Ads Notifications -->
<style name="WebNotificationSmallIcon">
<item name="android:alpha">0.6</item>
</style>
<style name="WebNotificationLargeIcon">
<item name="android:background">@drawable/notification_template_icon_bg</item>
</style>
<style name="WebNotificationTitle"
parent="@android:style/TextAppearance.StatusBar.EventContent.Title">
<item name="android:layout_marginStart">8dp</item>
</style>
<!-- Brave Leo preferences -->
<style name="BraveLeoResetTextColor" parent="Widget.AppCompat.TextView">
<item name="android:textColor">@color/leo_reset_text_color</item>
</style>
<style name="TimerBottomSheetDialogTheme"
parent="Theme.Design.Light.BottomSheetDialog">
<item name="bottomSheetStyle">@style/TimerBottomSheetDialogStyle</item>
<item name="android:windowSoftInputMode">adjustResize</item>
</style>
<style name="TimerBottomSheetDialogStyle" parent="Widget.Design.BottomSheet.Modal">
<item name="android:background">@drawable/timer_rounded_bottomsheet</item>
</style>
<style name="BraveRewardsSecondaryTextColor" parent="Widget.AppCompat.TextView">
<item name="android:textColor">@color/rewards_panel_secondary_text_color</item>
</style>
<style name="BraveRewardsActionColor" parent="Widget.AppCompat.TextView">
<item name="android:textColor">@color/rewards_panel_action_color</item>
</style>
<!-- Brave Shields -->
<style name="BraveShieldsBlockCookieModeText" parent="DefaultRegular">
<item name="android:textSize">16sp</item>
</style>
<!-- Nala tokens styles -->
<style name="DefaultRegular">
<!-- Default Brave UI size -->
<item name="android:textSize">@dimen/default_regular</item>
<item name="lineHeight">20sp</item>
<item name="fontStyle">normal</item>
<item name="fontWeight">400</item>
</style>
<style name="DefaultBold" parent="DefaultRegular">
<item name="android:textStyle">bold</item>
</style>
<style name="SmallRegular">
<item name="android:textSize">@dimen/small_regular</item>
<item name="lineHeight">16sp</item>
<item name="fontStyle">normal</item>
<item name="fontWeight">400</item>
</style>
<style name="SmallSemibold">
<!--
TODO(alexeybarabash, Deep, Agustin) Shold we ambed this font?
Otherwise, app can't be built:
error: resource font/roboto (aka com.brave.browser_default:font/roboto) not found.
-->
<!-- <item name="android:fontFamily">@font/roboto</item> -->
<item name="android:textSize">@dimen/small_semibold</item>
<item name="android:textStyle">bold</item>
<item name="lineHeight">16sp</item>
<item name="fontStyle">normal</item>
<item name="fontWeight">600</item>
</style>
<style name="LargeRegular">
<!-- Default browser size for fonts -->
<item name="android:textSize">@dimen/large_regular</item>
<item name="lineHeight">24sp</item>
<item name="fontStyle">normal</item>
<item name="fontWeight">400</item>
</style>
<style name="LargeSemibold">
<!-- Default browser size for fonts -->
<item name="android:textSize">@dimen/large_semibold</item>
<item name="android:textStyle">bold</item>
<item name="lineHeight">24sp</item>
<item name="fontStyle">normal</item>
<item name="fontWeight">600</item>
</style>
<style name="LargeBold" parent="LargeSemibold">
<item name="android:textStyle">bold</item>
</style>
<style name="DefaultSemibold">
<!-- Default Brave UI size -->
<item name="android:textSize">@dimen/default_semibold</item>
<item name="android:textStyle">bold</item>
<item name="lineHeight">20sp</item>
<item name="fontStyle">normal</item>
<item name="fontWeight">600</item>
</style>
<style name="XSmallSemibold">
<item name="android:textSize">@dimen/x_small_semibold</item>
<item name="android:textStyle">bold</item>
<item name="lineHeight">16sp</item>
<item name="fontStyle">normal</item>
<item name="fontWeight">600</item>
</style>
<style name="XSmallBold" parent="XSmallSemibold">
<item name="android:textStyle">bold</item>
</style>
<style name="HeadingH1">
<item name="android:textSize">@dimen/heading_h1</item>
<item name="lineHeight">40sp</item>
<item name="fontStyle">normal</item>
<item name="fontWeight">500</item>
</style>
<style name="HeadingH1Bold" parent="HeadingH1">
<item name="android:textStyle">bold</item>
</style>
<style name="HeadingH3">
<item name="android:textSize">@dimen/heading_h3</item>
<item name="lineHeight">28sp</item>
<item name="fontStyle">normal</item>
<item name="fontWeight">500</item>
</style>
<style name="HeadingH3Bold" parent="HeadingH3">
<item name="android:textStyle">bold</item>
</style>
<style name="HeadingH4">
<item name="android:textSize">@dimen/heading_h4</item>
<item name="lineHeight">24sp</item>
<item name="fontStyle">normal</item>
<item name="fontWeight">600</item>
</style>
<style name="MonospaceSmall">
<item name="android:textSize">@dimen/monospace_small</item>
<item name="lineHeight">16sp</item>
<item name="fontStyle">normal</item>
<item name="fontWeight">400</item>
<!--
Use default monospace font instead of spec
<item name="android:fontFamily">@font/roboto_mono</item>
to avoid font embedding and save 83KB.
When there will be more places where roboto_mono is used,
then worth to embed and actually use roboto_mono.
-->
<item name="android:typeface">monospace</item>
</style>
</resources>