Commit 12903281 authored by Jan Krcal's avatar Jan Krcal Committed by Commit Bot

[ToolbarButton] Fix a trivial bug in SetLabelSideSpacing()

This CL fixes a trivial bug in ToolbarButton, introduced by
crrev.com/696762.

Bug: 1002160
Change-Id: Ifaafe299203292bd80b7f9f25497604e59900c4f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1807473
Commit-Queue: Jan Krcal <jkrcal@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Auto-Submit: Jan Krcal <jkrcal@chromium.org>
Reviewed-by: default avatarPeter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#696864}
parent b723f2a3
......@@ -141,7 +141,7 @@ void ToolbarButton::UpdateHighlightBackgroundAndInsets() {
void ToolbarButton::SetLabelSideSpacing(int spacing) {
gfx::Insets label_insets;
// Add the spacing only if text is non-empty.
if (GetText().empty()) {
if (!GetText().empty()) {
// Add spacing to the opposing side.
if (GetHorizontalAlignment() == gfx::ALIGN_RIGHT) {
label_insets = gfx::Insets(0, spacing, 0, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment