* fixes #4193 - made close button for tabs more accessible. set recommended minimum size for accessibility 48x48, while keeping image size the same removed margin from button and text as it was not needed anymore aligned close button in center of tab to be visual consistent with alignment of favicon and more visual accessible * Fix marginsmaster
parent
aef087aae0
commit
ed0b6bd5ef
|
@ -18,7 +18,6 @@ import mozilla.components.support.ktx.android.util.dpToFloat
|
|||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.components.metrics.Event
|
||||
import org.mozilla.fenix.ext.components
|
||||
import org.mozilla.fenix.ext.increaseTapArea
|
||||
import org.mozilla.fenix.ext.loadIntoView
|
||||
import org.mozilla.fenix.home.sessioncontrol.SessionControlAction
|
||||
import org.mozilla.fenix.home.sessioncontrol.Tab
|
||||
|
@ -43,7 +42,6 @@ class TabViewHolder(
|
|||
}
|
||||
}
|
||||
|
||||
close_tab_button.increaseTapArea(buttonIncreaseDps)
|
||||
item_tab.setOnClickListener {
|
||||
actionEmitter.onNext(TabAction.Select(it, tab?.sessionId!!))
|
||||
}
|
||||
|
@ -55,7 +53,6 @@ class TabViewHolder(
|
|||
}
|
||||
|
||||
close_tab_button?.run {
|
||||
increaseTapArea(buttonIncreaseDps)
|
||||
setOnClickListener {
|
||||
actionEmitter.onNext(TabAction.Close(tab?.sessionId!!))
|
||||
}
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:ellipsize="none"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/Header12TextStyle"
|
||||
|
@ -66,10 +65,8 @@
|
|||
|
||||
<ImageButton
|
||||
android:id="@+id/close_tab_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4.5dp"
|
||||
android:layout_marginEnd="4.5dp"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:alpha="0.8"
|
||||
android:contentDescription="@string/close_tab"
|
||||
android:src="@drawable/ic_close"
|
||||
|
|
Loading…
Reference in New Issue