| OLD | NEW | 
|---|
|  | (Empty) | 
| 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 |  | 
| 3 // found in the LICENSE file. |  | 
| 4 |  | 
| 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_CONSTANTS_H_ |  | 
| 6 #define CHROME_BROWSER_UI_PANELS_PANEL_CONSTANTS_H_ |  | 
| 7 |  | 
| 8 #include "build/build_config.h" |  | 
| 9 |  | 
| 10 namespace panel { |  | 
| 11 |  | 
| 12 // The height in pixels of the titlebar. |  | 
| 13 static const int kTitlebarHeight = 36; |  | 
| 14 |  | 
| 15 // Absolute minimum width and height for panels, including non-client area. |  | 
| 16 // Should only be big enough to accomodate a close button on the reasonably |  | 
| 17 // recognisable titlebar. |  | 
| 18 // These numbers are semi-arbitrary. |  | 
| 19 // Motivation for 'width' is to make main buttons on the titlebar functional. |  | 
| 20 // Motivation for height is to allow autosized tightly-wrapped panel with a |  | 
| 21 // single line of text - so the height is set to be likely less than a titlebar, |  | 
| 22 // to make sure even small content is tightly wrapped. |  | 
| 23 const int kPanelMinWidth = 80; |  | 
| 24 const int kPanelMinHeight = kTitlebarHeight + 10; |  | 
| 25 |  | 
| 26 // The panel can be minimized to 4-pixel lines. |  | 
| 27 static const int kMinimizedPanelHeight = 4; |  | 
| 28 |  | 
| 29 // The size (width or height) of the app icon (taskbar icon). |  | 
| 30 static const int kPanelAppIconSize = 32; |  | 
| 31 |  | 
| 32 // The size (width or height) of the button, which is also the size of the |  | 
| 33 // hit target area. |  | 
| 34 static const int kPanelButtonSize = 24; |  | 
| 35 |  | 
| 36 // The padding in pixeles between the icon and the left border. |  | 
| 37 const int kTitlebarLeftPadding = 10; |  | 
| 38 |  | 
| 39 // The padding in pixeles between the close button and the right border. |  | 
| 40 const int kTitlebarRightPadding = 6; |  | 
| 41 |  | 
| 42 // The padding in piexles between the icon and the title text. |  | 
| 43 const int kIconAndTitlePadding = 11; |  | 
| 44 |  | 
| 45 // The padding in piexles between the title text and the button. |  | 
| 46 const int kTitleAndButtonPadding = 11; |  | 
| 47 |  | 
| 48 // The padding in pixeles between buttons. |  | 
| 49 static const int kButtonPadding = 5; |  | 
| 50 |  | 
| 51 #if defined(OS_WIN) |  | 
| 52 // The number of times to flash the panel's taskbar icon in order to draw the |  | 
| 53 // user's attention (Windows only). |  | 
| 54 static const int kNumberOfTimesToFlashPanelForAttention = 30; |  | 
| 55 #endif |  | 
| 56 |  | 
| 57 // Different types of buttons that can be shown on panel's titlebar. |  | 
| 58 enum TitlebarButtonType { |  | 
| 59   CLOSE_BUTTON, |  | 
| 60   MINIMIZE_BUTTON, |  | 
| 61   RESTORE_BUTTON |  | 
| 62 }; |  | 
| 63 |  | 
| 64 // Different platforms use different modifier keys to change the behavior |  | 
| 65 // of a mouse click. This enum captures the meaning of the modifier rather |  | 
| 66 // than the actual modifier key to generalize across platforms. |  | 
| 67 enum ClickModifier { |  | 
| 68   NO_MODIFIER, |  | 
| 69   APPLY_TO_ALL,  // Apply the click behavior to all panels in the collection. |  | 
| 70 }; |  | 
| 71 |  | 
| 72 // Ways a panel can be resized. |  | 
| 73 enum Resizability { |  | 
| 74   NOT_RESIZABLE = 0, |  | 
| 75   RESIZABLE_TOP = 0x1, |  | 
| 76   RESIZABLE_BOTTOM = 0x2, |  | 
| 77   RESIZABLE_LEFT = 0x4, |  | 
| 78   RESIZABLE_RIGHT = 0x8, |  | 
| 79   RESIZABLE_TOP_LEFT = 0x10, |  | 
| 80   RESIZABLE_TOP_RIGHT = 0x20, |  | 
| 81   RESIZABLE_BOTTOM_LEFT = 0x40, |  | 
| 82   RESIZABLE_BOTTOM_RIGHT = 0x80, |  | 
| 83   RESIZABLE_EXCEPT_BOTTOM = RESIZABLE_TOP | RESIZABLE_LEFT | RESIZABLE_RIGHT | |  | 
| 84       RESIZABLE_TOP_LEFT | RESIZABLE_TOP_RIGHT, |  | 
| 85   RESIZABLE_ALL = RESIZABLE_TOP | RESIZABLE_BOTTOM | RESIZABLE_LEFT | |  | 
| 86       RESIZABLE_RIGHT | RESIZABLE_TOP_LEFT | RESIZABLE_TOP_RIGHT | |  | 
| 87       RESIZABLE_BOTTOM_LEFT | RESIZABLE_BOTTOM_RIGHT |  | 
| 88 }; |  | 
| 89 |  | 
| 90 // Describes how 4 corners of a panel should be painted. |  | 
| 91 enum CornerStyle { |  | 
| 92   NOT_ROUNDED = 0, |  | 
| 93   TOP_ROUNDED = 0x1, |  | 
| 94   BOTTOM_ROUNDED = 0x2, |  | 
| 95   ALL_ROUNDED = TOP_ROUNDED | BOTTOM_ROUNDED |  | 
| 96 }; |  | 
| 97 |  | 
| 98 }  // namespace panel |  | 
| 99 |  | 
| 100 #endif  // CHROME_BROWSER_UI_PANELS_PANEL_CONSTANTS_H_ |  | 
| OLD | NEW | 
|---|