New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 756164 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug

Blocked on:
issue 758720



Sign in to add a comment

Add SetMaxLines support in views::Label

Project Member Reported by warx@chromium.org, Aug 16 2017

Issue description

This bug is aimed at a TODO in ui/views/controls/label.cc:
https://cs.chromium.org/chromium/src/ui/views/controls/label.cc?sq=package:chromium&l=871

The underlying gfx::RenderText supports elide tail multilines except OS_MACOSX (multiline is not supported).

Basically, we want:
(1) API in views::Label to provide elide tail multi lines support
(2) mentioned by msw@, fix multiline_example

+people from email threads 
 

Comment 1 by warx@chromium.org, Aug 25 2017

Blockedon: 758720
Summary: Add SetMaxLines support in views::Label (was: Support elide tail for multi line views::Label)
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2e83fdd042715a146e03e23c935de324e10c892f

commit 2e83fdd042715a146e03e23c935de324e10c892f
Author: Qiang Xu <warx@chromium.org>
Date: Fri Aug 25 03:58:23 2017

app_list: make app search result title two-line display for installed
apps

changes:
- Add SetMaxLines/max_lines api in views::Label.
- When app search result is installed result type, make its title
two-line display.
- Changing the padding between icon and title from 6 to 5, makes the
bottom line title not truncated.

screenshots:
before the change: https://screenshot.googleplex.com/phPK7h0iDKx
after the change: https://screenshot.googleplex.com/FCqVx5UJ4No

Test: tested with fullscreen app list flag
Bug: 754891,  756164 
Change-Id: I13cabc419a6070af607d49c5bd09e75c1e07dfff
Reviewed-on: https://chromium-review.googlesource.com/615801
Reviewed-by: Michael Wasserman <msw@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Qiang(Joe) Xu <warx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497316}
[modify] https://crrev.com/2e83fdd042715a146e03e23c935de324e10c892f/ui/app_list/views/search_result_tile_item_view.cc
[modify] https://crrev.com/2e83fdd042715a146e03e23c935de324e10c892f/ui/views/controls/label.cc
[modify] https://crrev.com/2e83fdd042715a146e03e23c935de324e10c892f/ui/views/controls/label.h
[modify] https://crrev.com/2e83fdd042715a146e03e23c935de324e10c892f/ui/views/controls/label_unittest.cc

Comment 3 by warx@chromium.org, Dec 20 2017

Status: Fixed (was: Assigned)

Sign in to add a comment