PageFragment: fix loading URLs appearance

This commit is contained in:
dece 2022-01-28 12:07:57 +01:00
parent 30d7ce72b8
commit 3190d608ca
5 changed files with 10 additions and 7 deletions

View file

@ -138,15 +138,15 @@ class PageFragment : Fragment(), ContentAdapterListener {
binding.contentProgressBar.hide() binding.contentProgressBar.hide()
binding.contentSwipeLayout.isRefreshing = false binding.contentSwipeLayout.isRefreshing = false
binding.addressBar.setText(vm.currentUrl) binding.addressBar.setText(vm.currentUrl)
binding.addressBar.setTypeface(null, Typeface.NORMAL) binding.addressBar.setTextColor(resources.getColor(R.color.url_bar, null))
} }
PageViewModel.State.CONNECTING -> { PageViewModel.State.CONNECTING -> {
binding.appBarLayout.setExpanded(true, true)
binding.contentProgressBar.show() binding.contentProgressBar.show()
binding.addressBar.setText(vm.loadingUrl?.toString() ?: "") binding.addressBar.setText(vm.loadingUrl?.toString() ?: "")
binding.addressBar.setTypeface(null, Typeface.ITALIC) binding.addressBar.setTextColor(resources.getColor(R.color.url_bar_loading, null))
} }
PageViewModel.State.RECEIVING -> { PageViewModel.State.RECEIVING -> {
binding.appBarLayout.setExpanded(true, true)
binding.contentSwipeLayout.isRefreshing = false binding.contentSwipeLayout.isRefreshing = false
} }
} }

View file

@ -30,6 +30,7 @@
android:importantForAutofill="no" android:importantForAutofill="no"
android:inputType="textUri" android:inputType="textUri"
android:text="" android:text=""
android:textColor="@color/url_bar"
tools:ignore="TextContrastCheck" /> tools:ignore="TextContrastCheck" />
</Toolbar> </Toolbar>

View file

@ -12,8 +12,6 @@
android:textColor="@color/text" android:textColor="@color/text"
android:fontFamily="@font/preformatted" android:fontFamily="@font/preformatted"
android:typeface="monospace" android:typeface="monospace"
android:paddingStart="16dp" android:padding="4dp"
android:paddingEnd="8dp" android:background="@color/background_emph" />
android:paddingTop="4dp"
android:paddingBottom="4dp" />
</HorizontalScrollView> </HorizontalScrollView>

View file

@ -9,4 +9,6 @@
<color name="second_accent">#2aa198</color> <color name="second_accent">#2aa198</color>
<color name="second_accent_dark">#073642</color> <color name="second_accent_dark">#073642</color>
<color name="link">#2aa198</color> <color name="link">#2aa198</color>
<color name="url_bar">#fdf6e3</color>
<color name="url_bar_loading">#586e75</color>
</resources> </resources>

View file

@ -11,6 +11,8 @@
<color name="second_accent">#6c71c4</color> <color name="second_accent">#6c71c4</color>
<color name="second_accent_dark">#073642</color> <color name="second_accent_dark">#073642</color>
<color name="link">#268bd2</color> <color name="link">#268bd2</color>
<color name="url_bar">#002b36</color>
<color name="url_bar_loading">#fdf6e3</color>
<!-- <!--
Based on Solarized Based on Solarized
SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB