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

Side by Side Diff: chrome/browser/ui/views/harmony/layout_delegate.h

Issue 2744463002: Add VectorIconButton functionality to ImageButton. (Closed)
Patch Set: WIP: use observer Created 3 years, 9 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_
6 #define CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_
7 7
8 #include "ui/views/layout/grid_layout.h" 8 #include "ui/views/layout/grid_layout.h"
9 9
10 class LayoutDelegate { 10 class LayoutDelegate {
11 public: 11 public:
12 enum class Metric { 12 enum class Metric {
13 // Padding on the left and right side of a button's label. 13 // Padding on the left and right side of a button's label.
14 BUTTON_HORIZONTAL_PADDING, 14 BUTTON_HORIZONTAL_PADDING,
15 // Extra margin added on all sides of a button's content. This is only
16 // used for certain button types.
17 // TODO(pkasting): This should probably be touch-specific and needs to be
18 // considered more holistically.
19 BUTTON_MARGIN,
15 // The maximum width a button can have and still influence the sizes of 20 // The maximum width a button can have and still influence the sizes of
16 // other linked buttons. This allows short buttons to have linked widths 21 // other linked buttons. This allows short buttons to have linked widths
17 // without long buttons making things overly wide. 22 // without long buttons making things overly wide.
18 BUTTON_MAX_LINKABLE_WIDTH, 23 BUTTON_MAX_LINKABLE_WIDTH,
19 // Default minimum width of a button. 24 // Default minimum width of a button.
20 BUTTON_MINIMUM_WIDTH, 25 BUTTON_MINIMUM_WIDTH,
21 // Margin between the edge of a dialog and the left, right, or bottom of a 26 // Margin between the edge of a dialog and the left, right, or bottom of a
22 // contained button. 27 // contained button.
23 DIALOG_BUTTON_MARGIN, 28 DIALOG_BUTTON_MARGIN,
24 // Minimum width of a dialog button. 29 // Minimum width of a dialog button.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 99
95 // Returns the preferred width in DIPs for a dialog of the specified |width|. 100 // Returns the preferred width in DIPs for a dialog of the specified |width|.
96 // May return 0 if the dialog has no preferred width. 101 // May return 0 if the dialog has no preferred width.
97 virtual int GetDialogPreferredWidth(DialogWidth width) const; 102 virtual int GetDialogPreferredWidth(DialogWidth width) const;
98 103
99 private: 104 private:
100 DISALLOW_COPY_AND_ASSIGN(LayoutDelegate); 105 DISALLOW_COPY_AND_ASSIGN(LayoutDelegate);
101 }; 106 };
102 107
103 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_ 108 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698