|
22 | 22 | Application styles. All customizations that are not specific |
23 | 23 | to a particular API level can go here. |
24 | 24 | --> |
25 | | - <style name="Widget.Button" parent="Widget.BaseButton"/> |
| 25 | + <style name="Widget.Button" parent="Widget.BaseButton"> |
| 26 | + <item name="android:textAppearance">@style/TextAppearance.Widget.Button</item> |
| 27 | + </style> |
26 | 28 |
|
27 | | - <style name="Widget.EditText" parent="Widget.BaseEditText"/> |
| 29 | + <style name="Widget.EditText" parent="Widget.BaseEditText"> |
| 30 | + <item name="android:textAppearance">@style/TextAppearance.Widget.EditText</item> |
| 31 | + </style> |
28 | 32 |
|
29 | | - <style name="Widget.TextView" parent="Widget.BaseTextView"/> |
| 33 | + <style name="Widget.TextView" parent="Widget.BaseTextView"> |
| 34 | + <item name="android:textAppearance">@style/TextAppearance.Widget.TextView</item> |
| 35 | + </style> |
30 | 36 |
|
31 | 37 | <style name="Widget.ListView" parent="Widget.BaseListView"> |
32 | 38 | <item name="android:divider">#D1D5DA</item> |
|
50 | 56 | <item name="android:ellipsize">marquee</item> |
51 | 57 | </style> |
52 | 58 |
|
| 59 | + <!-- |
| 60 | + TextAppearance |
| 61 | + Note: Gecko uses light theme as default, while Android uses dark. |
| 62 | + If Android convention has to be followd, the list of colors specified |
| 63 | + in themes.xml would be inverse, and things would get confusing. |
| 64 | + Hence, Gecko's TextAppearance is based on text over light theme and |
| 65 | + TextAppearance.Inverse is based on text over dark theme. |
| 66 | + --> |
| 67 | + <style name="TextAppearance"> |
| 68 | + <item name="android:textColor">?android:attr/textColorPrimary</item> |
| 69 | + <item name="android:textColorHighlight">@color/text_color_highlight</item> |
| 70 | + <item name="android:textColorHint">?android:attr/textColorHint</item> |
| 71 | + <item name="android:textColorLink">?android:attr/textColorLink</item> |
| 72 | + <item name="android:textSize">16sp</item> |
| 73 | + <item name="android:textStyle">normal</item> |
| 74 | + </style> |
| 75 | + |
| 76 | + <style name="TextAppearance.Inverse"> |
| 77 | + <item name="android:textColor">?android:attr/textColorPrimaryInverse</item> |
| 78 | + <item name="android:textColorHint">?android:attr/textColorHintInverse</item> |
| 79 | + <item name="android:textColorHighlight">@color/text_color_highlight_inverse</item> |
| 80 | + <item name="android:textColorLink">?android:attr/textColorLinkInverse</item> |
| 81 | + </style> |
| 82 | + |
| 83 | + <style name="TextAppearance.Large"> |
| 84 | + <item name="android:textSize">22sp</item> |
| 85 | + </style> |
| 86 | + |
| 87 | + <style name="TextAppearance.Large.Inverse"> |
| 88 | + <item name="android:textColor">?android:attr/textColorPrimaryInverse</item> |
| 89 | + <item name="android:textColorHint">?android:attr/textColorHintInverse</item> |
| 90 | + <item name="android:textColorHighlight">@color/text_color_highlight_inverse</item> |
| 91 | + <item name="android:textColorLink">?android:attr/textColorLinkInverse</item> |
| 92 | + </style> |
| 93 | + |
| 94 | + <style name="TextAppearance.Medium"> |
| 95 | + <item name="android:textSize">18sp</item> |
| 96 | + </style> |
| 97 | + |
| 98 | + <style name="TextAppearance.Medium.Inverse"> |
| 99 | + <item name="android:textColor">?android:attr/textColorPrimaryInverse</item> |
| 100 | + <item name="android:textColorHint">?android:attr/textColorHintInverse</item> |
| 101 | + <item name="android:textColorHighlight">@color/text_color_highlight_inverse</item> |
| 102 | + <item name="android:textColorLink">?android:attr/textColorLinkInverse</item> |
| 103 | + </style> |
| 104 | + |
| 105 | + <style name="TextAppearance.Small"> |
| 106 | + <item name="android:textSize">14sp</item> |
| 107 | + <item name="android:textColor">?android:attr/textColorSecondary</item> |
| 108 | + </style> |
| 109 | + |
| 110 | + <style name="TextAppearance.Small.Inverse"> |
| 111 | + <item name="android:textColor">?android:attr/textColorSecondaryInverse</item> |
| 112 | + <item name="android:textColorHint">?android:attr/textColorHintInverse</item> |
| 113 | + <item name="android:textColorHighlight">@color/text_color_highlight_inverse</item> |
| 114 | + <item name="android:textColorLink">?android:attr/textColorLinkInverse</item> |
| 115 | + </style> |
| 116 | + |
| 117 | + <style name="TextAppearance.Micro"> |
| 118 | + <item name="android:textSize">12sp</item> |
| 119 | + <item name="android:textColor">?android:attr/textColorTertiary</item> |
| 120 | + </style> |
| 121 | + |
| 122 | + <style name="TextAppearance.Micro.Inverse"> |
| 123 | + <item name="android:textColor">?android:attr/textColorTertiaryInverse</item> |
| 124 | + <item name="android:textColorHint">?android:attr/textColorHintInverse</item> |
| 125 | + <item name="android:textColorHighlight">@color/text_color_highlight_inverse</item> |
| 126 | + <item name="android:textColorLink">?android:attr/textColorLinkInverse</item> |
| 127 | + </style> |
| 128 | + |
| 129 | + <style name="TextAppearance.Widget" /> |
| 130 | + |
| 131 | + <style name="TextAppearance.Widget.Button" parent="TextAppearance.Small"> |
| 132 | + <item name="android:textColor">@color/primary_text</item> |
| 133 | + </style> |
| 134 | + |
| 135 | + <style name="TextAppearance.Widget.EditText"> |
| 136 | + <item name="android:textColor">@color/primary_text</item> |
| 137 | + </style> |
| 138 | + |
| 139 | + <style name="TextAppearance.Widget.TextView"> |
| 140 | + <item name="android:textColor">@color/primary_text</item> |
| 141 | + </style> |
| 142 | + |
53 | 143 | <!-- BrowserToolbar --> |
54 | 144 | <style name="BrowserToolbar"> |
55 | 145 | <item name="android:layout_width">fill_parent</item> |
|
277 | 367 |
|
278 | 368 | <style name="AboutHome.TextAppearance" /> |
279 | 369 |
|
280 | | - <style name="AboutHome.TextAppearance.Title"> |
281 | | - <item name="android:textSize">15sp</item> |
| 370 | + <style name="AboutHome.TextAppearance.Title" parent="TextAppearance"> |
282 | 371 | <item name="android:textColor">@color/abouthome_section_title</item> |
283 | 372 | </style> |
284 | 373 |
|
285 | | - <style name="AboutHome.TextAppearance.SubTitle"> |
286 | | - <item name="android:textSize">12sp</item> |
| 374 | + <style name="AboutHome.TextAppearance.SubTitle" parent="TextAppearance.Micro"> |
287 | 375 | <item name="android:textColor">@color/abouthome_section_subtitle</item> |
288 | 376 | </style> |
289 | 377 |
|
|
0 commit comments