| OLD | NEW |
| 1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- | 1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- |
| 2 * This Source Code Form is subject to the terms of the Mozilla Public | 2 * This Source Code Form is subject to the terms of the Mozilla Public |
| 3 * License, v. 2.0. If a copy of the MPL was not distributed with this | 3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 5 | 5 |
| 6 package org.mozilla.gecko.toolbar; | 6 package org.mozilla.gecko.toolbar; |
| 7 | 7 |
| 8 import java.util.Arrays; | 8 import java.util.Arrays; |
| 9 | 9 |
| 10 import android.support.v4.content.ContextCompat; | 10 import android.support.v4.content.ContextCompat; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 focusOrder.add(this); | 57 focusOrder.add(this); |
| 58 focusOrder.addAll(urlDisplayLayout.getFocusOrder()); | 58 focusOrder.addAll(urlDisplayLayout.getFocusOrder()); |
| 59 focusOrder.addAll(Arrays.asList(tabsButton, menuButton)); | 59 focusOrder.addAll(Arrays.asList(tabsButton, menuButton)); |
| 60 | 60 |
| 61 roundCornerShape = new Path(); | 61 roundCornerShape = new Path(); |
| 62 updateRoundCornerShape(); | 62 updateRoundCornerShape(); |
| 63 | 63 |
| 64 roundCornerPaint = new Paint(); | 64 roundCornerPaint = new Paint(); |
| 65 roundCornerPaint.setAntiAlias(true); | 65 roundCornerPaint.setAntiAlias(true); |
| 66 // Using ABB color palette. See https://issues.adblockplus.org/ticket/37
69 | 66 roundCornerPaint.setColor(ContextCompat.getColor(context, R.color.text_a
nd_tabs_tray_grey)); |
| 67 roundCornerPaint.setColor(ContextCompat.getColor(context, R.color.abb_ba
ckground_light_grey)); | |
| 68 roundCornerPaint.setStrokeWidth(0.0f); | 67 roundCornerPaint.setStrokeWidth(0.0f); |
| 69 } | 68 } |
| 70 | 69 |
| 71 private void updateRoundCornerShape() { | 70 private void updateRoundCornerShape() { |
| 72 roundCornerShape.reset(); | 71 roundCornerShape.reset(); |
| 73 if (ViewCompat.getLayoutDirection(this) == ViewCompat.LAYOUT_DIRECTION_R
TL) { | 72 if (ViewCompat.getLayoutDirection(this) == ViewCompat.LAYOUT_DIRECTION_R
TL) { |
| 74 int right = getRight(); | 73 int right = getRight(); |
| 75 roundCornerShape.moveTo(right, 0); | 74 roundCornerShape.moveTo(right, 0); |
| 76 roundCornerShape.lineTo(right - 30, 0); | 75 roundCornerShape.lineTo(right - 30, 0); |
| 77 roundCornerShape.cubicTo(right, 0, right, 0, right, 30); | 76 roundCornerShape.cubicTo(right, 0, right, 0, right, 30); |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 ((ThemedImageButton) editCancel).onLightweightThemeChanged(); | 235 ((ThemedImageButton) editCancel).onLightweightThemeChanged(); |
| 237 } | 236 } |
| 238 | 237 |
| 239 @Override | 238 @Override |
| 240 public void onLightweightThemeReset() { | 239 public void onLightweightThemeReset() { |
| 241 super.onLightweightThemeReset(); | 240 super.onLightweightThemeReset(); |
| 242 | 241 |
| 243 ((ThemedImageButton) editCancel).onLightweightThemeReset(); | 242 ((ThemedImageButton) editCancel).onLightweightThemeReset(); |
| 244 } | 243 } |
| 245 } | 244 } |
| OLD | NEW |