Fixes tab sizing (#1906)
This commit is contained in:
parent
b80b90c07d
commit
ba690fde8e
|
@ -56,7 +56,7 @@ class TabViewHolder(
|
||||||
}
|
}
|
||||||
|
|
||||||
close_tab_button?.run {
|
close_tab_button?.run {
|
||||||
increaseTapArea(closeButtonIncreaseDps)
|
increaseTapArea(buttonIncreaseDps)
|
||||||
setOnClickListener {
|
setOnClickListener {
|
||||||
actionEmitter.onNext(TabAction.Close(tab?.sessionId!!))
|
actionEmitter.onNext(TabAction.Close(tab?.sessionId!!))
|
||||||
}
|
}
|
||||||
|
@ -75,10 +75,13 @@ class TabViewHolder(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tab_overflow_button.setOnClickListener {
|
tab_overflow_button.run {
|
||||||
tabMenu.menuBuilder
|
increaseTapArea(buttonIncreaseDps)
|
||||||
.build(view.context)
|
setOnClickListener {
|
||||||
.show(anchor = it, orientation = BrowserMenu.Orientation.DOWN)
|
tabMenu.menuBuilder
|
||||||
|
.build(view.context)
|
||||||
|
.show(anchor = it, orientation = BrowserMenu.Orientation.DOWN)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +109,7 @@ class TabViewHolder(
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val LAYOUT_ID = R.layout.tab_list_row
|
const val LAYOUT_ID = R.layout.tab_list_row
|
||||||
const val closeButtonIncreaseDps = 12
|
const val buttonIncreaseDps = 12
|
||||||
const val favIconBorderRadiusInPx = 8
|
const val favIconBorderRadiusInPx = 8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,15 +77,15 @@
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/tab_overflow_button"
|
android:id="@+id/tab_overflow_button"
|
||||||
android:layout_width="@dimen/glyph_button_width"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="@dimen/glyph_button_height"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
android:contentDescription="@string/tab_menu"
|
android:contentDescription="@string/tab_menu"
|
||||||
android:src="@drawable/ic_menu"
|
android:src="@drawable/ic_menu"
|
||||||
android:translationX="4dp"
|
android:layout_margin="8dp"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/tab_title"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/close_tab_button" />
|
app:layout_constraintTop_toBottomOf="@id/close_tab_button"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/selected_border"
|
android:id="@+id/selected_border"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user