Refine sizes and positions of icons in Dock search bar
This commit is contained in:
@@ -1,23 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32.0dip"
|
||||
android:height="32.0dip"
|
||||
android:theme="@style/QsbIconTint"
|
||||
android:viewportWidth="192.0"
|
||||
android:viewportHeight="192.0">
|
||||
<path
|
||||
android:fillColor="?qsbIconTintTertiary"
|
||||
android:pathData="M128,40c13.28,0 24,10.72 24,24v16h16V64c0,-22.08 -17.92,-40 -40,-40h-16v16H128z" />
|
||||
<path
|
||||
android:fillColor="?qsbIconTintPrimary"
|
||||
android:pathData="M64,152c-13.28,0 -24,-10.72 -24,-24v-16H24v16c0,22.08 17.92,40 40,40h16v-16H64z" />
|
||||
<path
|
||||
android:fillColor="?qsbIconTintPrimary"
|
||||
android:pathData="M96,96m-28,0a28,28 0,1 1,56 0a28,28 0,1 1,-56 0" />
|
||||
<path
|
||||
android:fillColor="?qsbIconTintSecondary"
|
||||
android:pathData="M144,144m-16,0a16,16 0,1 1,32 0a16,16 0,1 1,-32 0" />
|
||||
<path
|
||||
android:fillColor="?qsbIconTintQuaternary"
|
||||
android:pathData="M64,40c-13.28,0 -24,10.72 -24,24v16H24V64c0,-22.08 17.92,-40 40,-40h16v16H64z" />
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M16,5C17.66,5 19,6.34 19,8V10H21V8C21,5.24 18.76,3 16,3H14V5H16Z"
|
||||
android:fillColor="#FBBC05"/>
|
||||
<path
|
||||
android:pathData="M8,19C6.34,19 5,17.66 5,16V14H3V16C3,18.76 5.24,21 8,21H10V19H8Z"
|
||||
android:fillColor="#4285F4"/>
|
||||
<path
|
||||
android:pathData="M8.5,12C8.4976,11.2595 8.7304,10.537 9.1645,9.937C9.5986,9.3371 10.2123,8.8901 10.9164,8.6609C11.6205,8.4316 12.3795,8.4316 13.0836,8.6609C13.7878,8.8901 14.4014,9.3371 14.8355,9.937C15.2696,10.537 15.5024,11.2595 15.5,12C15.5024,12.7405 15.2696,13.463 14.8355,14.063C14.4014,14.6629 13.7878,15.1099 13.0836,15.3391C12.3795,15.5684 11.6205,15.5684 10.9164,15.3391C10.2123,15.1099 9.5986,14.6629 9.1645,14.063C8.7304,13.463 8.4976,12.7405 8.5,12Z"
|
||||
android:fillColor="#4285F4"/>
|
||||
<path
|
||||
android:pathData="M16,18C16,17.4697 16.2109,16.9608 16.5858,16.5858C16.9608,16.2109 17.4697,16 18,16C18.5303,16 19.0392,16.2109 19.4142,16.5858C19.7891,16.9608 20,17.4697 20,18C20,18.5303 19.7891,19.0392 19.4142,19.4142C19.0392,19.7891 18.5303,20 18,20C17.4697,20 16.9608,19.7891 16.5858,19.4142C16.2109,19.0392 16,18.5303 16,18Z"
|
||||
android:fillColor="#34A853"/>
|
||||
<path
|
||||
android:pathData="M8,5C6.34,5 5,6.34 5,8V10H3V8C3,5.24 5.24,3 8,3H10V5H8Z"
|
||||
android:fillColor="#EA4335"/>
|
||||
</vector>
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="30.0dip"
|
||||
android:height="30.0dip"
|
||||
android:theme="@style/QsbIconTint"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="?qsbIconTintPrimary"
|
||||
android:pathData="M12,15c1.66,0 2.99,-1.34 2.99,-3L15,5c0,-1.66 -1.34,-3 -3,-3S9,3.34 9,5v7c0,1.66 1.34,3 3,3z" />
|
||||
<path
|
||||
android:fillColor="?qsbIconTintSecondary"
|
||||
android:pathData="M11,18.92h2V22h-2z" />
|
||||
<path
|
||||
android:fillColor="?qsbIconTintTertiary"
|
||||
android:pathData="M7,12H5c0,1.93 0.78,3.68 2.05,4.95l1.41,-1.41C7.56,14.63 7,13.38 7,12z" />
|
||||
<path
|
||||
android:fillColor="?qsbIconTintQuaternary"
|
||||
android:pathData="M12,17c-1.38,0 -2.63,-0.56 -3.54,-1.47l-1.41,1.41C8.32,18.21 10.07,19 12.01,19c3.87,0 6.98,-3.14 6.98,-7h-2c0,2.76 -2.23,5 -4.99,5z" />
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M12,15C13.66,15 14.99,13.66 14.99,12L15,5C15,3.34 13.66,2 12,2C10.34,2 9,3.34 9,5V12C9,13.66 10.34,15 12,15Z"
|
||||
android:fillColor="#4285F4"/>
|
||||
<path
|
||||
android:pathData="M11,18.92H13V22H11V18.92Z"
|
||||
android:fillColor="#34A853"/>
|
||||
<path
|
||||
android:pathData="M7,12H5C5,13.93 5.78,15.68 7.05,16.95L8.46,15.54C7.56,14.63 7,13.38 7,12Z"
|
||||
android:fillColor="#FBBC05"/>
|
||||
<path
|
||||
android:pathData="M11.9998,17C10.6198,17 9.3698,16.44 8.4598,15.53L7.0498,16.94C8.3198,18.21 10.0698,19 12.0098,19C15.8798,19 18.9898,15.86 18.9898,12H16.9898C16.9898,14.76 14.7598,17 11.9998,17Z"
|
||||
android:fillColor="#EA4335"/>
|
||||
</vector>
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24.0dip"
|
||||
android:height="24.0dip"
|
||||
android:theme="@style/QsbIconTint"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="?qsbIconTintPrimary"
|
||||
android:pathData="M23.49,12.27c0,-0.79 -0.07,-1.54 -0.19,-2.27H12v4.51h6.47c-0.29,1.48 -1.14,2.73 -2.4,3.58v3h3.86c2.26,-2.09 3.56,-5.17 3.56,-8.82z" />
|
||||
<path
|
||||
android:fillColor="?qsbIconTintSecondary"
|
||||
android:pathData="M12,24c3.24,0 5.95,-1.08 7.93,-2.91l-3.86,-3c-1.08,0.72 -2.45,1.16 -4.07,1.16 -3.13,0 -5.78,-2.11 -6.73,-4.96H1.29v3.09C3.26,21.3 7.31,24 12,24z" />
|
||||
<path
|
||||
android:fillColor="?qsbIconTintTertiary"
|
||||
android:pathData="M5.27,14.29c-0.25,-0.72 -0.38,-1.49 -0.38,-2.29s0.14,-1.57 0.38,-2.29V6.62H1.29C0.47,8.24 0,10.06 0,12s0.47,3.76 1.29,5.38l3.98,-3.09z" />
|
||||
<path
|
||||
android:fillColor="?qsbIconTintQuaternary"
|
||||
android:pathData="M12,4.75c1.77,0 3.35,0.61 4.6,1.8l3.42,-3.42C17.95,1.19 15.24,0 12,0 7.31,0 3.26,2.7 1.29,6.62l3.98,3.09c0.95,-2.85 3.6,-4.96 6.73,-4.96z" />
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M23.49,12.27C23.49,11.48 23.42,10.73 23.3,10H12V14.51H18.47C18.18,15.99 17.33,17.24 16.07,18.09V21.09H19.93C22.19,19 23.49,15.92 23.49,12.27Z"
|
||||
android:fillColor="#4285F4"/>
|
||||
<path
|
||||
android:pathData="M12,24C15.24,24 17.95,22.92 19.93,21.09L16.07,18.09C14.99,18.81 13.62,19.25 12,19.25C8.87,19.25 6.22,17.14 5.27,14.29H1.29V17.38C3.26,21.3 7.31,24 12,24Z"
|
||||
android:fillColor="#34A853"/>
|
||||
<path
|
||||
android:pathData="M5.27,14.29C5.02,13.57 4.89,12.8 4.89,12C4.89,11.2 5.03,10.43 5.27,9.71V6.62H1.29C0.47,8.24 0,10.06 0,12C0,13.94 0.47,15.76 1.29,17.38L5.27,14.29Z"
|
||||
android:fillColor="#FBBC05"/>
|
||||
<path
|
||||
android:pathData="M12,4.75C13.77,4.75 15.35,5.36 16.6,6.55L20.02,3.13C17.95,1.19 15.24,0 12,0C7.31,0 3.26,2.7 1.29,6.62L5.27,9.71C6.22,6.86 8.87,4.75 12,4.75Z"
|
||||
android:fillColor="#EA4335"/>
|
||||
</vector>
|
||||
|
||||
@@ -33,19 +33,23 @@
|
||||
android:background="@drawable/pill_ripple"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/label_voice_search"
|
||||
android:focusable="false" />
|
||||
android:focusable="false"
|
||||
android:padding="@dimen/qsb_icon_padding"
|
||||
tools:src="@drawable/ic_mic_color" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/lens_icon"
|
||||
android:layout_width="@dimen/qsb_content_height"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginLeft="-8dp"
|
||||
android:background="@drawable/pill_ripple"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/label_lens"
|
||||
android:focusable="false"
|
||||
android:padding="@dimen/qsb_lens_padding"
|
||||
android:padding="@dimen/qsb_icon_padding"
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="gone"
|
||||
tools:src="@drawable/ic_lens_color"
|
||||
tools:visibility="visible" />
|
||||
</LinearLayout>
|
||||
</app.lawnchair.qsb.QsbLayout>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
<dimen name="all_apps_search_vertical_offset">30dp</dimen>
|
||||
<dimen name="qsb_g_icon_marginStart">16dp</dimen>
|
||||
<dimen name="qsb_lens_padding">8dp</dimen>
|
||||
<dimen name="qsb_icon_padding">10dp</dimen>
|
||||
<dimen name="qsb_margin_top_adjusting">20dp</dimen>
|
||||
<dimen name="qsb_min_width_with_mic">124dp</dimen>
|
||||
<dimen name="qsb_shadow_margin">6dp</dimen>
|
||||
|
||||
@@ -4,15 +4,15 @@ import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.util.AttributeSet
|
||||
import android.widget.ImageView
|
||||
import android.widget.ImageButton
|
||||
import com.android.launcher3.R
|
||||
import com.android.launcher3.qsb.QsbContainerView
|
||||
|
||||
@SuppressLint("AppCompatCustomView")
|
||||
class AssistantIconView(context: Context, attrs: AttributeSet?) : ImageView(context, attrs) {
|
||||
class AssistantIconView(context: Context, attrs: AttributeSet?) : ImageButton(context, attrs) {
|
||||
|
||||
init {
|
||||
scaleType = ScaleType.CENTER
|
||||
scaleType = ScaleType.FIT_CENTER
|
||||
setOnClickListener {
|
||||
val intent = Intent(Intent.ACTION_VOICE_COMMAND)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK)
|
||||
|
||||
Reference in New Issue
Block a user