| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PANELS_PANEL_CONSTANTS_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_CONSTANTS_H_ |
| 6 #define CHROME_BROWSER_UI_PANELS_PANEL_CONSTANTS_H_ | 6 #define CHROME_BROWSER_UI_PANELS_PANEL_CONSTANTS_H_ |
| 7 | 7 |
| 8 namespace panel { | 8 namespace panel { |
| 9 | 9 |
| 10 // Absolute minimum width and height for panels, including non-client area. | 10 // Absolute minimum width and height for panels, including non-client area. |
| 11 // Should only be big enough to accomodate a close button on the reasonably | 11 // Should only be big enough to accomodate a close button on the reasonably |
| 12 // recognisable titlebar. | 12 // recognisable titlebar. |
| 13 // These numbers are semi-arbitrary. | 13 // These numbers are semi-arbitrary. |
| 14 // Motivation for 'width' is to make main buttons on the titlebar functional. | 14 // Motivation for 'width' is to make main buttons on the titlebar functional. |
| 15 // Motivation for height is to allow autosized tightly-wrapped panel with a | 15 // Motivation for height is to allow autosized tightly-wrapped panel with a |
| 16 // single line of text - so the height is set to be likely less then a titlebar, | 16 // single line of text - so the height is set to be likely less then a titlebar, |
| 17 // to make sure even small content is tightly wrapped. | 17 // to make sure even small content is tightly wrapped. |
| 18 const int kPanelMinWidth = 80; | 18 const int kPanelMinWidth = 80; |
| 19 const int kPanelMinHeight = 20; | 19 const int kPanelMinHeight = 20; |
| 20 | 20 |
| 21 // The panel can be minimized to 4-pixel lines. | 21 // The panel can be minimized to 4-pixel lines. |
| 22 static const int kMinimizedPanelHeight = 4; | 22 static const int kMinimizedPanelHeight = 4; |
| 23 | 23 |
| 24 // The height in pixels of the titlebar. | 24 // The height in pixels of the titlebar. |
| 25 static const int kTitlebarHeight = 32; | 25 static const int kTitlebarHeight = 32; |
| 26 | 26 |
| 27 // The size (width or height) of the app icon (taskbar icon). |
| 28 static const int kPanelAppIconSize = 32; |
| 29 |
| 27 // Different types of buttons that can be shown on panel's titlebar. | 30 // Different types of buttons that can be shown on panel's titlebar. |
| 28 enum TitlebarButtonType { | 31 enum TitlebarButtonType { |
| 29 CLOSE_BUTTON, | 32 CLOSE_BUTTON, |
| 30 MINIMIZE_BUTTON, | 33 MINIMIZE_BUTTON, |
| 31 RESTORE_BUTTON | 34 RESTORE_BUTTON |
| 32 }; | 35 }; |
| 33 | 36 |
| 34 // Different platforms use different modifier keys to change the behavior | 37 // Different platforms use different modifier keys to change the behavior |
| 35 // of a mouse click. This enum captures the meaning of the modifier rather | 38 // of a mouse click. This enum captures the meaning of the modifier rather |
| 36 // than the actual modifier key to generalize across platforms. | 39 // than the actual modifier key to generalize across platforms. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 55 // Ways a panel can be resized. | 58 // Ways a panel can be resized. |
| 56 enum Resizability { | 59 enum Resizability { |
| 57 NOT_RESIZABLE, | 60 NOT_RESIZABLE, |
| 58 RESIZABLE_ALL_SIDES, | 61 RESIZABLE_ALL_SIDES, |
| 59 RESIZABLE_ALL_SIDES_EXCEPT_BOTTOM | 62 RESIZABLE_ALL_SIDES_EXCEPT_BOTTOM |
| 60 }; | 63 }; |
| 61 | 64 |
| 62 } // namespace panel | 65 } // namespace panel |
| 63 | 66 |
| 64 #endif // CHROME_BROWSER_UI_PANELS_PANEL_CONSTANTS_H_ | 67 #endif // CHROME_BROWSER_UI_PANELS_PANEL_CONSTANTS_H_ |
| OLD | NEW |