• Elly Fong-Jones's avatar
    views: fade buttons in inactive widgets · 821bb5d7
    Elly Fong-Jones authored
    This change:
    1) Adds an inner WidgetObserver subclass to Button to allow Button to observe
       its Widget's activation state changing;
    2) Introduces a notion of "visual state" to buttons, as distinct from their
       existing state; the visual state governs how a button is drawn.
    3) Has LabelButton use the visual state to decide which image to use instead
       of the raw state.
    
    The end result is that when a LabelButton's Widget deactivates, that LabelButton
    will take on a disabled appearance.
    
    Bug: 848593
    Change-Id: If5bd135c254fd36669e76fd39338dc24387602aa
    Reviewed-on: https://chromium-review.googlesource.com/c/1251330
    Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
    Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#600471}
    821bb5d7
platform_style.cc 3.9 KB