Skip to content

Commit ffba6d0

Browse files
authored
Web view card and colors adjustments (#5976)
Task/Issue URL: https://app.asana.com/1/137249556945/project/72649045549333/task/1210095910664828?focus=true ### Description This PR makes 3 small changes to the main browser fragment. 1. Removes the web view card and rounded corners. 2. Removes the dark scroll bar track, making it transparent. 3. Adjusts the color attribute used for focused view background.
1 parent a3d70ad commit ffba6d0

File tree

7 files changed

+12
-54
lines changed

7 files changed

+12
-54
lines changed

app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ import com.duckduckgo.app.browser.omnibar.experiments.FadeOmnibarItemPressedList
147147
import com.duckduckgo.app.browser.omnibar.getOmnibarType
148148
import com.duckduckgo.app.browser.omnibar.model.OmnibarPosition.BOTTOM
149149
import com.duckduckgo.app.browser.omnibar.model.OmnibarPosition.TOP
150-
import com.duckduckgo.app.browser.omnibar.model.OmnibarType.FADE
151150
import com.duckduckgo.app.browser.print.PrintDocumentAdapterFactory
152151
import com.duckduckgo.app.browser.print.PrintInjector
153152
import com.duckduckgo.app.browser.remotemessage.SharePromoLinkRMFBroadCastReceiver
@@ -2813,12 +2812,7 @@ class BrowserTabFragment :
28132812

28142813
binding.daxDialogOnboardingCtaContent.layoutTransition.enableTransitionType(LayoutTransition.CHANGING)
28152814

2816-
val webViewLayout = if (!isActiveCustomTab() && visualDesignExperimentDataStore.getOmnibarType() == FADE) {
2817-
R.layout.include_duckduckgo_browser_experiment_webview
2818-
} else {
2819-
R.layout.include_duckduckgo_browser_webview
2820-
}
2821-
2815+
val webViewLayout = R.layout.include_duckduckgo_browser_webview
28222816
webView = layoutInflater.inflate(
28232817
webViewLayout,
28242818
binding.webViewContainer,

app/src/main/res/layout/include_duckduckgo_browser_experiment_webview.xml

Lines changed: 0 additions & 44 deletions
This file was deleted.

app/src/main/res/layout/include_duckduckgo_browser_webview.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
android:scrollbarStyle="outsideInset"
2828
android:scrollbarThumbHorizontal="@color/webViewScrollbarThumbColor"
2929
android:scrollbarThumbVertical="@color/webViewScrollbarThumbColor"
30-
android:scrollbarTrackHorizontal="@color/webViewScrollbarTrackColor"
31-
android:scrollbarTrackVertical="@color/webViewScrollbarTrackColor"
30+
android:scrollbarTrackHorizontal="?attr/daxColorWebViewScrollbarTrack"
31+
android:scrollbarTrackVertical="?attr/daxColorWebViewScrollbarTrack"
3232
android:overScrollMode="always"
3333
android:visibility="gone"
3434
app:layout_behavior="@string/appbar_scrolling_view_behavior"

app/src/main/res/layout/view_focused_view.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
app:isExpandable="false"
2424
app:showPlaceholders="false"
2525
app:favoritesPlacement="focused_state"
26-
android:background="?attr/daxColorSurface" />
26+
android:background="?attr/daxColorBrowserOverlay" />
2727

2828

common/common-ui/src/main/res/values/design-experiments-theming.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
<item name="daxColorBrowserOverlay">?attr/daxColorBackground</item>
4747

4848
<item name="tabItemSelectionCircleWidth">1dp</item>
49+
50+
<item name="daxColorWebViewScrollbarTrack">@android:color/transparent</item>
4951
</style>
5052

5153
<style name="Theme.DuckDuckGo.Light.Experiment" parent="Theme.DuckDuckGo.Light">
@@ -78,6 +80,8 @@
7880
<item name="daxColorBrowserOverlay">?attr/daxColorBackground</item>
7981

8082
<item name="tabItemSelectionCircleWidth">1dp</item>
83+
84+
<item name="daxColorWebViewScrollbarTrack">@android:color/transparent</item>
8185
</style>
8286

8387
</resources>

common/common-ui/src/main/res/values/design-system-colors.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@
118118
<attr name="daxColorTextInputFocusedOutline" format="color"/>
119119
<attr name="daxColorTextInputEnabledOutline" format="color"/>
120120

121+
<attr name="daxColorWebViewScrollbarTrack" format="color"/>
122+
121123
<!-- Design System Brand Colors -->
122124
<color name="disabledColor">#59000000</color>
123125
<color name="alertGreen">#21C000</color>

common/common-ui/src/main/res/values/design-system-theming.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@
132132
<item name="elevationOverlayEnabled">false</item>
133133

134134
<item name="tabItemSelectionCircleWidth">2dp</item>
135+
136+
<item name="daxColorWebViewScrollbarTrack">@color/webViewScrollbarTrackColor</item>
135137
</style>
136138

137139
<!-- The app theme will mostly contain values for colour attributes -->

0 commit comments

Comments
 (0)