| 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 file, | 3 * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
| 4 * You can obtain one at http://mozilla.org/MPL/2.0/. */ | 4 * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 5 | 5 |
| 6 package org.mozilla.gecko.tabs; | 6 package org.mozilla.gecko.tabs; |
| 7 | 7 |
| 8 import android.content.Context; | 8 import android.content.Context; |
| 9 import android.content.res.Resources; | 9 import android.content.res.Resources; |
| 10 import android.graphics.Canvas; | 10 import android.graphics.Canvas; |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 | 381 |
| 382 final int childCount = getChildCount(); | 382 final int childCount = getChildCount(); |
| 383 final int checkedIndex = getCheckedIndex(childCount); | 383 final int checkedIndex = getCheckedIndex(childCount); |
| 384 | 384 |
| 385 for (int i = 1; i < childCount; i++) { | 385 for (int i = 1; i < childCount; i++) { |
| 386 final View child = getChildAt(i); | 386 final View child = getChildAt(i); |
| 387 | 387 |
| 388 final boolean pressed = (child.isPressed() || getChildAt(i - 1).isPr
essed()); | 388 final boolean pressed = (child.isPressed() || getChildAt(i - 1).isPr
essed()); |
| 389 final boolean checked = (i == checkedIndex || i == checkedIndex + 1)
; | 389 final boolean checked = (i == checkedIndex || i == checkedIndex + 1)
; |
| 390 | 390 |
| 391 // We don't show the tab curves in Adblock Browser, so we always |
| 392 // want to draw the dividers. |
| 393 // See https://issues.adblockplus.org/ticket/2932. |
| 394 /* |
| 391 // Don't draw dividers for around checked or pressed items | 395 // Don't draw dividers for around checked or pressed items |
| 392 // so that they are not drawn on top of the tab curves. | 396 // so that they are not drawn on top of the tab curves. |
| 393 if (pressed || checked) { | 397 if (pressed || checked) { |
| 394 continue; | 398 continue; |
| 395 } | 399 } |
| 400 */ |
| 396 | 401 |
| 397 final int left = child.getLeft() - (itemMargin / 2) - dividerWidth; | 402 final int left = child.getLeft() - (itemMargin / 2) - dividerWidth; |
| 398 final int right = left + dividerWidth; | 403 final int right = left + dividerWidth; |
| 399 | 404 |
| 400 divider.setBounds(left, top, right, bottom); | 405 divider.setBounds(left, top, right, bottom); |
| 401 divider.draw(canvas); | 406 divider.draw(canvas); |
| 402 } | 407 } |
| 403 } | 408 } |
| 404 | 409 |
| 405 private void drawFadingEdge(Canvas canvas) { | 410 private void drawFadingEdge(Canvas canvas) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 @Override | 452 @Override |
| 448 public void onAnimationRepeat(Animator animation) { | 453 public void onAnimationRepeat(Animator animation) { |
| 449 } | 454 } |
| 450 | 455 |
| 451 @Override | 456 @Override |
| 452 public void onAnimationCancel(Animator animation) { | 457 public void onAnimationCancel(Animator animation) { |
| 453 } | 458 } |
| 454 | 459 |
| 455 } | 460 } |
| 456 } | 461 } |
| OLD | NEW |