| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 UI_VIEWS_STYLE_PLATFORM_STYLE_H_ | 5 #ifndef UI_VIEWS_STYLE_PLATFORM_STYLE_H_ |
| 6 #define UI_VIEWS_STYLE_PLATFORM_STYLE_H_ | 6 #define UI_VIEWS_STYLE_PLATFORM_STYLE_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ui/views/controls/button/button.h" | 10 #include "ui/views/controls/button/button.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 // Type used by LabelButton to map button states to text colors. | 26 // Type used by LabelButton to map button states to text colors. |
| 27 using ButtonColorByState = SkColor[Button::STATE_COUNT]; | 27 using ButtonColorByState = SkColor[Button::STATE_COUNT]; |
| 28 | 28 |
| 29 // Minimum size for platform-styled buttons (Button::STYLE_BUTTON). | 29 // Minimum size for platform-styled buttons (Button::STYLE_BUTTON). |
| 30 static const int kMinLabelButtonWidth; | 30 static const int kMinLabelButtonWidth; |
| 31 static const int kMinLabelButtonHeight; | 31 static const int kMinLabelButtonHeight; |
| 32 | 32 |
| 33 // Whether dialog-default buttons are given a bold font style. | 33 // Whether dialog-default buttons are given a bold font style. |
| 34 static const bool kDefaultLabelButtonHasBoldFont; | 34 static const bool kDefaultLabelButtonHasBoldFont; |
| 35 | 35 |
| 36 // True if dragging vertically above or below a textfield's bounds selects to |
| 37 // the beginning or end of the text from the cursor, respectively. |
| 38 static const bool kTextfieldDragVerticallyDragsToEnd; |
| 39 |
| 36 // Creates an ImageSkia containing the image to use for the combobox arrow. | 40 // Creates an ImageSkia containing the image to use for the combobox arrow. |
| 37 // The |is_enabled| argument is true if the control the arrow is for is | 41 // The |is_enabled| argument is true if the control the arrow is for is |
| 38 // enabled, and false if the control is disabled. The |style| argument is the | 42 // enabled, and false if the control is disabled. The |style| argument is the |
| 39 // style of the combobox the arrow is being drawn for. | 43 // style of the combobox the arrow is being drawn for. |
| 40 static gfx::ImageSkia CreateComboboxArrow(bool is_enabled, | 44 static gfx::ImageSkia CreateComboboxArrow(bool is_enabled, |
| 41 Combobox::Style style); | 45 Combobox::Style style); |
| 42 | 46 |
| 43 // Creates the appropriate border for a focusable Combobox. | 47 // Creates the appropriate border for a focusable Combobox. |
| 44 static scoped_ptr<FocusableBorder> CreateComboboxBorder(); | 48 static scoped_ptr<FocusableBorder> CreateComboboxBorder(); |
| 45 | 49 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 67 // Applies the current system theme to the default border created by |button|. | 71 // Applies the current system theme to the default border created by |button|. |
| 68 static scoped_ptr<Border> CreateThemedLabelButtonBorder(LabelButton* button); | 72 static scoped_ptr<Border> CreateThemedLabelButtonBorder(LabelButton* button); |
| 69 | 73 |
| 70 private: | 74 private: |
| 71 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformStyle); | 75 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformStyle); |
| 72 }; | 76 }; |
| 73 | 77 |
| 74 } // namespace views | 78 } // namespace views |
| 75 | 79 |
| 76 #endif // UI_VIEWS_STYLE_PLATFORM_STYLE_H_ | 80 #endif // UI_VIEWS_STYLE_PLATFORM_STYLE_H_ |
| OLD | NEW |