Bug 823644: Base TextAppearances for the application. [r=mfinkle]

--HG--
extra : rebase_source : 2321d6b1215713dc191710fcb6c80793b917cc44
This commit is contained in:
Sriram Ramasubramanian 2013-03-14 11:44:09 -07:00
parent 79be486e54
commit 0d795683b3
4 changed files with 132 additions and 2 deletions

View File

@ -15,7 +15,6 @@
-->
<style name="Widget.BaseListView" parent="android:style/Widget.Holo.ListView"/>
<!--
Application styles. All customizations that are not specific
to a particular API level can go here.

View File

@ -25,6 +25,33 @@
<!-- highlight-focused on menu button: 10% black over black -->
<color name="highlight_menu_focused">#FF1A1A1A</color>
<!--
Application theme colors
-->
<!-- Default colors -->
<color name="text_color_primary">#222222</color>
<color name="text_color_secondary">#666666</color>
<color name="text_color_tertiary">#9198A1</color>
<!-- Default inverse colors -->
<color name="text_color_primary_inverse">#FFFFFF</color>
<color name="text_color_secondary_inverse">#DDDDDD</color>
<color name="text_color_tertiary_inverse">#A4A7A9</color>
<!-- Disabled colors -->
<color name="text_color_primary_disable_only">#999999</color>
<!-- Hint colors -->
<color name="text_color_hint">#666666</color>
<color name="text_color_hint_inverse">#7F828A</color>
<!-- Highlight colors -->
<color name="text_color_highlight">#FF9500</color>
<color name="text_color_highlight_inverse">#D06BFF</color>
<!-- Link colors -->
<color name="text_color_link">#22629E</color>
<color name="autocomplete_listitem_text">#000000</color>
<color name="splash_background">#000000</color>
<color name="splash_msgfont">#ffffff</color>

View File

@ -38,6 +38,76 @@
<item name="android:ellipsize">marquee</item>
</style>
<!--
TextAppearance
Note: Gecko uses light theme as default, while Android uses dark.
If Android convention has to be followd, the list of colors specified
in themes.xml would be inverse, and things would get confusing.
Hence, Gecko's TextAppearance is based on text over light theme and
TextAppearance.Inverse is based on text over dark theme.
-->
<style name="TextAppearance">
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textColorHighlight">?android:attr/textColorHighlight</item>
<item name="android:textColorHint">?android:attr/textColorHint</item>
<item name="android:textColorLink">?android:attr/textColorLink</item>
<item name="android:textSize">16sp</item>
<item name="android:textStyle">normal</item>
</style>
<style name="TextAppearance.Inverse">
<item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
<item name="android:textColorHint">?android:attr/textColorHintInverse</item>
<item name="android:textColorHighlight">?android:attr/textColorHighlightInverse</item>
<item name="android:textColorLink">?android:attr/textColorLinkInverse</item>
</style>
<style name="TextAppearance.Large">
<item name="android:textSize">22sp</item>
</style>
<style name="TextAppearance.Large.Inverse">
<item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
<item name="android:textColorHint">?android:attr/textColorHintInverse</item>
<item name="android:textColorHighlight">?android:attr/textColorHighlightInverse</item>
<item name="android:textColorLink">?android:attr/textColorLinkInverse</item>
</style>
<style name="TextAppearance.Medium">
<item name="android:textSize">18sp</item>
</style>
<style name="TextAppearance.Medium.Inverse">
<item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
<item name="android:textColorHint">?android:attr/textColorHintInverse</item>
<item name="android:textColorHighlight">?android:attr/textColorHighlightInverse</item>
<item name="android:textColorLink">?android:attr/textColorLinkInverse</item>
</style>
<style name="TextAppearance.Small">
<item name="android:textSize">14sp</item>
<item name="android:textColor">?android:attr/textColorSecondary</item>
</style>
<style name="TextAppearance.Small.Inverse">
<item name="android:textColor">?android:attr/textColorSecondaryInverse</item>
<item name="android:textColorHint">?android:attr/textColorHintInverse</item>
<item name="android:textColorHighlight">?android:attr/textColorHighlightInverse</item>
<item name="android:textColorLink">?android:attr/textColorLinkInverse</item>
</style>
<style name="TextAppearance.Micro">
<item name="android:textSize">12sp</item>
<item name="android:textColor">?android:attr/textColorTertiary</item>
</style>
<style name="TextAppearance.Micro.Inverse">
<item name="android:textColor">?android:attr/textColorTertiaryInverse</item>
<item name="android:textColorHint">?android:attr/textColorHintInverse</item>
<item name="android:textColorHighlight">?android:attr/textColorHighlightInverse</item>
<item name="android:textColorLink">?android:attr/textColorLinkInverse</item>
</style>
<!-- BrowserToolbar -->
<style name="BrowserToolbar">
<item name="android:layout_width">fill_parent</item>

View File

@ -34,7 +34,41 @@
Application Theme. All customizations that are not specific
to a particular API level can go here.
-->
<style name="Gecko" parent="GeckoBase"/>
<style name="Gecko" parent="GeckoBase">
<!-- Default colors -->
<item name="android:textColorPrimary">@color/text_color_primary</item>
<item name="android:textColorSecondary">@color/text_color_secondary</item>
<item name="android:textColorTertiary">@color/text_color_tertiary</item>
<!-- Default inverse colors -->
<item name="android:textColorPrimaryInverse">@color/text_color_primary_inverse</item>
<item name="android:textColorSecondaryInverse">@color/text_color_secondary_inverse</item>
<item name="android:textColorTertiaryInverse">@color/text_color_tertiary_inverse</item>
<!-- Disabled colors -->
<item name="android:textColorPrimaryDisableOnly">@color/text_color_primary_disable_only</item>
<!-- Hint colors -->
<item name="android:textColorHint">@color/text_color_hint</item>
<item name="android:textColorHintInverse">@color/text_color_hint_inverse</item>
<!-- Highlight colors -->
<item name="android:textColorHighlight">@color/text_color_highlight</item>
<item name="android:textColorHighlightInverse">@color/text_color_highlight_inverse</item>
<!-- Link colors -->
<item name="android:textColorLink">@color/text_color_link</item>
<!-- TextAppearances -->
<item name="android:textAppearance">@style/TextAppearance</item>
<item name="android:textAppearanceInverse">@style/TextAppearance.Inverse</item>
<item name="android:textAppearanceLarge">@style/TextAppearance.Large</item>
<item name="android:textAppearanceMedium">@style/TextAppearance.Medium</item>
<item name="android:textAppearanceSmall">@style/TextAppearance.Small</item>
<item name="android:textAppearanceLargeInverse">@style/TextAppearance.Large.Inverse</item>
<item name="android:textAppearanceMediumInverse">@style/TextAppearance.Medium.Inverse</item>
<item name="android:textAppearanceSmallInverse">@style/TextAppearance.Small.Inverse</item>
</style>
<style name="Gecko.Dialog" parent="GeckoDialogBase"/>