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

Side by Side Diff: chrome/browser/ui/constrained_window.h

Issue 11077006: Correct padding and focus ring for frameless constrained window dialog (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix mac build, part 2 Created 8 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
OLDNEW
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_CONSTRAINED_WINDOW_H_ 5 #ifndef CHROME_BROWSER_UI_CONSTRAINED_WINDOW_H_
6 #define CHROME_BROWSER_UI_CONSTRAINED_WINDOW_H_ 6 #define CHROME_BROWSER_UI_CONSTRAINED_WINDOW_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "third_party/skia/include/core/SkColor.h" 9 #include "third_party/skia/include/core/SkColor.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
11 #include "ui/gfx/native_widget_types.h" 11 #include "ui/gfx/native_widget_types.h"
12 12
13 /////////////////////////////////////////////////////////////////////////////// 13 ///////////////////////////////////////////////////////////////////////////////
14 // ConstrainedWindow 14 // ConstrainedWindow
15 // 15 //
16 // This interface represents a window that is constrained to a 16 // This interface represents a window that is constrained to a
17 // WebContentsView's bounds. 17 // WebContentsView's bounds.
18 // 18 //
19 class ConstrainedWindow { 19 class ConstrainedWindow {
20 public: 20 public:
21 static const int kVerticalPadding = 14; // top/bottom padding. 21 static const int kTitleTopPadding = 15; // Padding above the title.
22 static const int kHorizontalPadding = 17; // left/right padding. 22 static const int kHorizontalPadding = 20; // Left and right padding.
23 static const int kRowPadding = 20; // Vertical margin between dialog rows. 23 static const int kClientTopPadding = 18; // Padding above the client view.
24 static const int kBorderRadius = 2; // Border radius for dialog corners. 24 static const int kClientBottomPadding = 20; // Padding below the client view.
25 static const int kCloseButtonPadding = 7; // Padding around the close button.
26 static const int kBorderRadius = 2; // Border radius for dialog corners.
27
28 #if defined(OS_MACOSX)
29 static const int kRowPadding = 20; // Padding between rows of text.
30 #endif
25 31
26 // Font style for dialog text. 32 // Font style for dialog text.
27 static const ui::ResourceBundle::FontStyle kTextFontStyle = 33 static const ui::ResourceBundle::FontStyle kTextFontStyle =
28 ui::ResourceBundle::BaseFont; 34 ui::ResourceBundle::BaseFont;
29 // Font style for bold dialog text. 35 // Font style for bold dialog text.
30 static const ui::ResourceBundle::FontStyle kBoldTextFontStyle = 36 static const ui::ResourceBundle::FontStyle kBoldTextFontStyle =
31 ui::ResourceBundle::BoldFont; 37 ui::ResourceBundle::BoldFont;
32 // Font style for dialog title. 38 // Font style for dialog title.
33 static const ui::ResourceBundle::FontStyle kTitleFontStyle = 39 static const ui::ResourceBundle::FontStyle kTitleFontStyle =
34 ui::ResourceBundle::MediumFont; 40 ui::ResourceBundle::MediumFont;
(...skipping 21 matching lines...) Expand all
56 virtual bool CanShowConstrainedWindow(); 62 virtual bool CanShowConstrainedWindow();
57 63
58 // Returns the native window of the constrained window. 64 // Returns the native window of the constrained window.
59 virtual gfx::NativeWindow GetNativeWindow(); 65 virtual gfx::NativeWindow GetNativeWindow();
60 66
61 protected: 67 protected:
62 virtual ~ConstrainedWindow() {} 68 virtual ~ConstrainedWindow() {}
63 }; 69 };
64 70
65 #endif // CHROME_BROWSER_UI_CONSTRAINED_WINDOW_H_ 71 #endif // CHROME_BROWSER_UI_CONSTRAINED_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698