Skip to content

Commit 0832a71

Browse files
authored
Tab switcher button update (#6422)
Task/Issue URL: https://app.asana.com/1/137249556945/project/1207418217763355/task/1210820480162719?focus=true ### Description This PR updates the tab switcher button icon and tab count text size. ### Steps to test this PR - [x] Add 100 tabs in the Developer settings - [x] Verify the infinity symbol fits in the tab switcher button icon - [x] Delete one tab - [x] Verify the tab count fits in the tab switcher button icon ### UI changes <img width="1080" height="2400" alt="image" src="https://github.com/user-attachments/assets/06a6d14d-153b-4e73-bedb-c798b5f1ecf9" /> <img width="1080" height="2400" alt="image" src="https://github.com/user-attachments/assets/ac4cc421-8941-4cf9-917c-199abb22ccea" /> --- - To see the specific tasks where the Asana app for GitHub is being used, see below: - https://app.asana.com/0/0/1210845190061589
1 parent 6ff9650 commit 0832a71

File tree

3 files changed

+38
-27
lines changed

3 files changed

+38
-27
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@
4444
android:id="@+id/tabCount"
4545
android:layout_width="24dp"
4646
android:layout_height="24dp"
47-
android:layout_marginStart="9.75dp"
48-
android:layout_marginTop="5.5dp"
47+
android:layout_marginStart="8dp"
48+
android:layout_marginTop="7.5dp"
4949
android:fontFamily="sans-serif-condensed"
5050
android:gravity="center"
5151
android:textColor="?attr/daxColorPrimaryIcon"
52-
android:textSize="9dp"
52+
android:textSize="12dp"
5353
android:textStyle="bold"
5454
tools:ignore="DeprecatedWidgetInXml,SpUsage"
5555
tools:text="99" />
@@ -58,15 +58,15 @@
5858
android:id="@+id/tabCountInfinite"
5959
android:layout_width="24dp"
6060
android:layout_height="24dp"
61-
android:layout_marginStart="10dp"
62-
android:layout_marginTop="4dp"
61+
android:layout_marginStart="8dp"
62+
android:layout_marginTop="6.5dp"
6363
android:fontFamily="sans-serif-condensed"
6464
android:gravity="center"
6565
android:text=""
6666
android:textColor="?attr/daxColorPrimaryIcon"
67-
android:textSize="11dp"
67+
android:textSize="13dp"
6868
android:textStyle="bold"
6969
android:visibility="gone"
7070
tools:ignore="DeprecatedWidgetInXml,HardcodedText,SpUsage" />
7171

72-
</FrameLayout>
72+
</FrameLayout>

common/common-ui/src/main/res/drawable/ic_tab_24.xml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,14 @@
1313
~ See the License for the specific language governing permissions and
1414
~ limitations under the License.
1515
-->
16-
1716
<vector xmlns:android="http://schemas.android.com/apk/res/android"
1817
android:width="24dp"
1918
android:height="24dp"
2019
android:viewportWidth="24"
2120
android:viewportHeight="24">
22-
<path
23-
android:pathData="M6,7a5,5 0,0 1,5 -5h6a5,5 0,0 1,5 5v6a5,5 0,0 1,-5 5h-6a5,5 0,0 1,-5 -5L6,7ZM11,3.5h6A3.5,3.5 0,0 1,20.5 7v6a3.5,3.5 0,0 1,-3.5 3.5h-6A3.5,3.5 0,0 1,7.5 13L7.5,7A3.5,3.5 0,0 1,11 3.5Z"
24-
android:fillColor="?attr/daxColorPrimaryIcon"
25-
android:fillType="evenOdd"/>
26-
<path
27-
android:pathData="M3.411,6.95c0.466,-0.396 1.09,0.008 1.09,0.619 0,0.271 -0.135,0.52 -0.321,0.717A2.491,2.491 0,0 0,3.5 10v5A5.5,5.5 0,0 0,9 20.5h5c0.663,0 1.266,-0.259 1.713,-0.68 0.198,-0.185 0.447,-0.32 0.718,-0.32 0.61,0 1.014,0.623 0.618,1.089A3.991,3.991 0,0 1,14 21.999H9a7,7 0,0 1,-7 -7v-5c0,-1.221 0.548,-2.315 1.411,-3.049Z"
28-
android:fillColor="?attr/daxColorPrimaryIcon"/>
21+
22+
<path
23+
android:pathData="M19.5,8A3.5,3.5 0,0 0,16 4.5L8,4.5A3.5,3.5 0,0 0,4.5 8v8A3.5,3.5 0,0 0,8 19.5h8a3.5,3.5 0,0 0,3.5 -3.5L19.5,8ZM21,16a5,5 0,0 1,-5 5L8,21a5,5 0,0 1,-5 -5L3,8a5,5 0,0 1,5 -5h8a5,5 0,0 1,5 5v8Z"
24+
android:fillColor="?attr/daxColorPrimaryIcon" />
25+
2926
</vector>
Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,30 @@
1-
<!--TODO this icon needs to be aligned with all the other new icons-->
1+
<!--
2+
~ Copyright (c) 2025 DuckDuckGo
3+
~
4+
~ Licensed under the Apache License, Version 2.0 (the "License");
5+
~ you may not use this file except in compliance with the License.
6+
~ You may obtain a copy of the License at
7+
~
8+
~ http://www.apache.org/licenses/LICENSE-2.0
9+
~
10+
~ Unless required by applicable law or agreed to in writing, software
11+
~ distributed under the License is distributed on an "AS IS" BASIS,
12+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
~ See the License for the specific language governing permissions and
14+
~ limitations under the License.
15+
-->
216
<vector xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:width="25dp"
17+
android:width="24dp"
418
android:height="24dp"
5-
android:viewportWidth="25"
19+
android:viewportWidth="24"
620
android:viewportHeight="24">
7-
<path
8-
android:pathData="M21.492,8.473C21.906,8.473 22.242,8.808 22.242,9.223V13C22.242,15.761 20.004,18 17.242,18H11.242C8.481,18 6.242,15.761 6.242,13V7C6.242,4.239 8.481,2 11.242,2H15.02C15.434,2 15.77,2.336 15.77,2.75C15.77,3.164 15.434,3.5 15.02,3.5H11.242C9.309,3.5 7.742,5.067 7.742,7V13C7.742,14.933 9.309,16.5 11.242,16.5H17.242C19.175,16.5 20.742,14.933 20.742,13V9.223C20.742,8.808 21.078,8.473 21.492,8.473Z"
9-
android:fillColor="?daxColorPrimaryIcon" />
10-
<path
11-
android:pathData="M4.742,7.569C4.742,6.958 4.119,6.555 3.653,6.951C2.79,7.684 2.242,8.778 2.242,10V15C2.242,18.866 5.376,22 9.242,22H14.242C15.464,22 16.557,21.452 17.291,20.589C17.687,20.123 17.284,19.5 16.673,19.5C16.402,19.5 16.153,19.635 15.955,19.821C15.508,20.242 14.905,20.5 14.242,20.5H9.242C6.205,20.5 3.742,18.037 3.742,15V10C3.742,9.337 4,8.734 4.422,8.286C4.608,8.089 4.742,7.84 4.742,7.569Z"
12-
android:fillColor="?daxColorPrimaryIcon" />
13-
<path
14-
android:pathData="M23.242,4C23.242,5.657 21.899,7 20.242,7C18.585,7 17.242,5.657 17.242,4C17.242,2.343 18.585,1 20.242,1C21.899,1 23.242,2.343 23.242,4Z"
15-
android:fillColor="?daxColorAccentBlue" />
21+
22+
<path
23+
android:pathData="M14.408,3c0.414,0 0.705,0.413 0.643,0.822a5.22,5.22 0,0 0,-0.011 0.08c-0.044,0.328 -0.308,0.598 -0.64,0.598H8A3.5,3.5 0,0 0,4.5 8v8A3.5,3.5 0,0 0,8 19.5h8a3.5,3.5 0,0 0,3.5 -3.5V9.6c0,-0.331 0.27,-0.596 0.599,-0.64l0.08,-0.01c0.409,-0.063 0.821,0.228 0.821,0.642V16a5,5 0,0 1,-5 5H8a5,5 0,0 1,-5 -5V8a5,5 0,0 1,5 -5h6.408Z"
24+
android:fillColor="?attr/daxColorPrimaryIcon"/>
25+
26+
<path
27+
android:pathData="M22.5,4.5a3,3 0,1 1,-6 0,3 3,0 0,1 6,0Z"
28+
android:fillColor="?attr/daxColorAccentBlue"/>
29+
1630
</vector>

0 commit comments

Comments
 (0)