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

Side by Side Diff: ui/views/fill_attribute.cc

Issue 2230913003: Experimental alignment layout manager using a property on the views Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renamed AlignAttribute and associated types to FillAttribute Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/fill_attribute.h ('k') | ui/views/layout/align_layout.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/views/fill_attribute.h"
6 #include "ui/views/anchor_attribute.h"
7
8 namespace views {
9
10 AttributeId FillAttribute::Identity() const {
11 return GetAttributeId<FillAttribute>();
12 }
13
14 void FillAttribute::SetFill(Fill fill) {
15 if (this->fill() != fill) {
16 this->GetContent() = fill;
17 View *view = this->view();
18 if (view) {
19 AnchorAttribute *anchors = nullptr;
20 if (view->attributes().Find(anchors))
21 anchors->Notification(Attribute::NotifyType::AttributeAdded, this);
22 }
23 }
24 }
25
26 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/fill_attribute.h ('k') | ui/views/layout/align_layout.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698