Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Issue 928303003: [Mac] Use NSTitlebarAccessoryViewController to implement colored app window frames. (Closed)

Created:
5 years, 10 months ago by jackhou1
Modified:
5 years, 10 months ago
Reviewers:
CC:
chromium-reviews, erikwright+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@nawc
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Mac] Use NSTitlebarAccessoryViewController to implement colored app window frames. DO NOT COMMIT This explores how colored app windows might be implemented using NSTitlebarAccessoryViewController. By default, the view controller's layoutAttribute is NSLayoutAttributeBottom, which puts the accessory view under the titlebar without overlapping the content view. I.e. it extends the titlebar height. Here, the layoutAttribute is set to 2 (NSLayoutAttributeRight), which draws it over the titlebar, and aligns it to the right of the window. Unfortunately, the accessory view is always drawn above the title bar, so it covers the window control buttons. We can add them to the accessory view, but we'd need to some of their behavior, e.g. mouse hover.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -3 lines) Patch
M base/mac/sdk_forward_declarations.h View 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h View 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm View 5 chunks +89 lines, -3 lines 0 comments Download

Powered by Google App Engine
This is Rietveld 408576698