mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1148550 - Update 3-dot menu icon to Material on toolbar. r=mhaigh
Other 3-dot menu button locations to follow. I tested that the colors are correct in the various states (e.g. private browsing). This patch additionally: * Restructured the menu button (which allowed the removal of a setVisibility call * Removed the now unused tablet assets.
This commit is contained in:
parent
ccdbc90470
commit
bed19a1882
Binary file not shown.
Before Width: | Height: | Size: 104 B |
Binary file not shown.
Before Width: | Height: | Size: 110 B |
Binary file not shown.
Before Width: | Height: | Size: 122 B |
@ -109,22 +109,25 @@
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"/>
|
||||
|
||||
<org.mozilla.gecko.widget.themed.ThemedImageButton
|
||||
<org.mozilla.gecko.widget.themed.ThemedFrameLayout
|
||||
android:id="@+id/menu"
|
||||
style="@style/UrlBar.ImageButton"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="6dp"
|
||||
android:contentDescription="@string/menu"
|
||||
android:background="@drawable/browser_toolbar_action_bar_button"
|
||||
android:visibility="gone"/>
|
||||
android:visibility="gone">
|
||||
|
||||
<org.mozilla.gecko.widget.themed.ThemedImageView
|
||||
android:id="@+id/menu_icon"
|
||||
style="@style/UrlBar.ImageButton.BrowserToolbarColors"
|
||||
android:layout_alignLeft="@id/menu"
|
||||
android:layout_alignRight="@id/menu"
|
||||
android:src="@drawable/tablet_menu"
|
||||
android:visibility="gone"/>
|
||||
<org.mozilla.gecko.widget.themed.ThemedImageView
|
||||
android:id="@+id/menu_icon"
|
||||
style="@style/UrlBar.ImageButton.BrowserToolbarColors"
|
||||
android:layout_height="18dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/menu"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
</org.mozilla.gecko.widget.themed.ThemedFrameLayout>
|
||||
|
||||
<!-- We draw after the menu items so when they are hidden, the cancel button,
|
||||
which is thus drawn on top, may be pressed. -->
|
||||
|
@ -36,20 +36,25 @@
|
||||
android:src="@drawable/url_bar_translating_edge"
|
||||
android:scaleType="fitXY"/>
|
||||
|
||||
<org.mozilla.gecko.toolbar.ShapedButton android:id="@+id/menu"
|
||||
style="@style/UrlBar.ImageButton"
|
||||
android:layout_alignParentRight="true"
|
||||
android:contentDescription="@string/menu"
|
||||
android:background="@drawable/shaped_button"
|
||||
android:visibility="gone"/>
|
||||
<org.mozilla.gecko.widget.themed.ThemedFrameLayout
|
||||
android:id="@+id/menu"
|
||||
style="@style/UrlBar.ImageButton"
|
||||
android:layout_alignParentRight="true"
|
||||
android:contentDescription="@string/menu"
|
||||
android:background="@drawable/shaped_button"
|
||||
android:visibility="gone">
|
||||
|
||||
<org.mozilla.gecko.widget.themed.ThemedImageView android:id="@+id/menu_icon"
|
||||
style="@style/UrlBar.ImageButton"
|
||||
android:layout_alignLeft="@id/menu"
|
||||
android:layout_alignRight="@id/menu"
|
||||
android:gravity="center_vertical"
|
||||
android:src="@drawable/menu"
|
||||
android:visibility="gone"/>
|
||||
<org.mozilla.gecko.widget.themed.ThemedImageView
|
||||
android:id="@+id/menu_icon"
|
||||
style="@style/UrlBar.ImageButton"
|
||||
android:layout_height="16dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:scaleType="centerInside"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/menu"
|
||||
android:tint="@color/tabs_tray_icon_grey"/>
|
||||
|
||||
</org.mozilla.gecko.widget.themed.ThemedFrameLayout>
|
||||
|
||||
<org.mozilla.gecko.toolbar.PhoneTabsButton android:id="@+id/tabs"
|
||||
style="@style/UrlBar.ImageButton"
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@+id/restore_defaults"
|
||||
android:drawable="@drawable/tablet_menu"
|
||||
android:drawable="@drawable/menu"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/pref_search_restore_defaults" />
|
||||
</menu>
|
||||
|
@ -32,6 +32,7 @@ import org.mozilla.gecko.util.Clipboard;
|
||||
import org.mozilla.gecko.util.ColorUtils;
|
||||
import org.mozilla.gecko.util.HardwareUtils;
|
||||
import org.mozilla.gecko.util.MenuUtils;
|
||||
import org.mozilla.gecko.widget.themed.ThemedFrameLayout;
|
||||
import org.mozilla.gecko.widget.themed.ThemedImageButton;
|
||||
import org.mozilla.gecko.widget.themed.ThemedImageView;
|
||||
import org.mozilla.gecko.widget.themed.ThemedRelativeLayout;
|
||||
@ -117,7 +118,7 @@ public abstract class BrowserToolbar extends ThemedRelativeLayout
|
||||
|
||||
private ToolbarProgressView progressBar;
|
||||
protected final TabCounter tabsCounter;
|
||||
protected final ThemedImageButton menuButton;
|
||||
protected final ThemedFrameLayout menuButton;
|
||||
protected final ThemedImageView menuIcon;
|
||||
private MenuPopup menuPopup;
|
||||
protected final List<View> focusOrder;
|
||||
@ -192,7 +193,7 @@ public abstract class BrowserToolbar extends ThemedRelativeLayout
|
||||
tabsCounter.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
|
||||
}
|
||||
|
||||
menuButton = (ThemedImageButton) findViewById(R.id.menu);
|
||||
menuButton = (ThemedFrameLayout) findViewById(R.id.menu);
|
||||
menuIcon = (ThemedImageView) findViewById(R.id.menu_icon);
|
||||
hasSoftMenuButton = !HardwareUtils.hasMenuButton();
|
||||
|
||||
@ -324,8 +325,6 @@ public abstract class BrowserToolbar extends ThemedRelativeLayout
|
||||
|
||||
if (hasSoftMenuButton) {
|
||||
menuButton.setVisibility(View.VISIBLE);
|
||||
menuIcon.setVisibility(View.VISIBLE);
|
||||
|
||||
menuButton.setOnClickListener(new Button.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
Loading…
Reference in New Issue
Block a user