Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Increase click target size for buttons inside Library views (#1873)
Browse files Browse the repository at this point in the history
* Increase click target size for buttons inside Library views

* Rebase fixes
  • Loading branch information
keianhzo authored and bluemarvin committed Sep 27, 2019
1 parent 9e35425 commit 4bb48a8
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ public int getMenuHeight() {
case BOOKMARKS:
mBinding.bookmarkLayout.setVisibility(GONE);
mBinding.newWindowLayout.setBackgroundResource(R.drawable.library_context_menu_item_background_single);
return WidgetPlacement.dpDimension(getContext(), R.dimen.library_item_row_height);
return WidgetPlacement.dpDimension(getContext(), R.dimen.library_context_menu_height);
case HISTORY:
mBinding.bookmarkLayout.setVisibility(VISIBLE);
mBinding.newWindowLayout.setBackgroundResource(R.drawable.library_context_menu_item_background_top);
return WidgetPlacement.dpDimension(getContext(), R.dimen.library_item_row_height) * 2;
return WidgetPlacement.dpDimension(getContext(), R.dimen.library_context_menu_height) * 2;
}

return WidgetPlacement.dpDimension(getContext(), R.dimen.library_item_row_height) * 2;
return WidgetPlacement.dpDimension(getContext(), R.dimen.library_context_menu_height) * 2;
}

}
13 changes: 6 additions & 7 deletions app/src/main/res/layout/bookmark_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,12 @@

<ImageView
android:id="@+id/trash"
android:layout_width="22dp"
android:layout_height="22dp"
android:layout_width="@dimen/library_item_row_height"
android:layout_height="@dimen/library_item_row_height"
android:layout_gravity="center_vertical|end"
android:layout_marginEnd="10dp"
android:focusable="false"
android:focusableInTouchMode="false"
android:padding="@dimen/settings_icon_padding_max"
android:padding="@dimen/library_icon_padding_max"
android:soundEffectsEnabled="false"
android:src="@drawable/ic_icon_trash"
android:tint="@color/library_panel_icon_color"
Expand All @@ -110,12 +109,12 @@

<ImageView
android:id="@+id/more"
android:layout_width="22dp"
android:layout_height="22dp"
android:layout_width="@dimen/library_item_row_height"
android:layout_height="@dimen/library_item_row_height"
android:layout_gravity="center_vertical|end"
android:focusable="false"
android:focusableInTouchMode="false"
android:padding="@dimen/settings_icon_padding_max"
android:padding="@dimen/library_icon_padding_max"
android:soundEffectsEnabled="false"
android:src="@drawable/ic_icon_more_options"
android:tint="@color/library_panel_icon_color"
Expand Down
13 changes: 6 additions & 7 deletions app/src/main/res/layout/history_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,12 @@

<ImageView
android:id="@+id/trash"
android:layout_width="22dp"
android:layout_height="22dp"
android:layout_width="@dimen/library_item_row_height"
android:layout_height="@dimen/library_item_row_height"
android:layout_gravity="center_vertical|end"
android:layout_marginEnd="10dp"
android:focusable="false"
android:focusableInTouchMode="false"
android:padding="@dimen/settings_icon_padding_max"
android:padding="@dimen/library_icon_padding_max"
android:soundEffectsEnabled="false"
android:src="@drawable/ic_icon_trash"
android:tint="@color/library_panel_icon_color"
Expand All @@ -123,12 +122,12 @@

<ImageView
android:id="@+id/more"
android:layout_width="22dp"
android:layout_height="22dp"
android:layout_width="@dimen/library_item_row_height"
android:layout_height="@dimen/library_item_row_height"
android:layout_gravity="center_vertical|end"
android:focusable="false"
android:focusableInTouchMode="false"
android:padding="@dimen/settings_icon_padding_max"
android:padding="@dimen/library_icon_padding_max"
android:soundEffectsEnabled="false"
android:src="@drawable/ic_icon_more_options"
android:tint="@color/library_panel_icon_color"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/library_item_context_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<FrameLayout
android:id="@+id/new_window_layout"
android:layout_width="match_parent"
android:layout_height="@dimen/library_item_row_height"
android:layout_height="@dimen/library_context_menu_height"
android:padding="15dp"
android:background="@drawable/library_context_menu_item_background_top"
android:clickable="true"
Expand Down Expand Up @@ -58,7 +58,7 @@
<FrameLayout
android:id="@+id/bookmark_layout"
android:layout_width="match_parent"
android:layout_height="@dimen/library_item_row_height"
android:layout_height="@dimen/library_context_menu_height"
android:padding="15dp"
android:background="@drawable/library_context_menu_item_background_bottom"
android:clickable="true"
Expand Down
7 changes: 4 additions & 3 deletions app/src/main/res/values/dimen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,13 @@
<dimen name="settings_icon_padding_min">0dp</dimen>

<!-- Library -->
<dimen name="library_item_row_height">55dp</dimen>
<dimen name="library_item_row_height">38dp</dimen>
<dimen name="library_section_text_size">18sp</dimen>
<dimen name="library_item_title_text_size">20sp</dimen>
<dimen name="library_item_url_text_size">16sp</dimen>
<dimen name="library_item_date_text_size">16sp</dimen>
<dimen name="library_icon_padding_max">2dp</dimen>
<dimen name="library_icon_padding_min">0dp</dimen>
<dimen name="library_icon_padding_max">10dp</dimen>
<dimen name="library_icon_padding_min">8dp</dimen>
<dimen name="library_notification_font_size">13sp</dimen>

<!-- Language -->
Expand All @@ -219,6 +219,7 @@

<!-- Library Menu -->
<dimen name="library_context_menu_width">320dp</dimen>
<dimen name="library_context_menu_height">55dp</dimen>
<dimen name="library_context_menu_top_margin">4dp</dimen>
<item name="library_context_menu_z_distance" format="float" type="dimen">0.12</item>

Expand Down

0 comments on commit 4bb48a8

Please sign in to comment.