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

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: 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 kVerticalPadding = 20; // top/bottom padding.
22 static const int kHorizontalPadding = 17; // left/right padding. 22 static const int kHorizontalPadding = 20; // left/right padding.
23 static const int kRowPadding = 20; // Vertical margin between dialog rows. 23 static const int kRowPadding = 11; // Vertical margin between dialog rows.
24 static const int kBorderRadius = 2; // Border radius for dialog corners. 24 static const int kBorderRadius = 2; // Border radius for dialog corners.
25 static const int kCloseButtonPadding = 4; // Padding around the close button.
sail 2012/10/08 17:19:12 Could you reword this comment. Currently it doesn'
Mike Wittman 2012/10/08 21:34:19 I think it would be helpful to create an ASCII art
please use gerrit instead 2012/10/09 18:38:09 Done.
please use gerrit instead 2012/10/09 18:38:09 I admit that kCloseButtonPadding comment is confus
25 26
26 // Font style for dialog text. 27 // Font style for dialog text.
27 static const ui::ResourceBundle::FontStyle kTextFontStyle = 28 static const ui::ResourceBundle::FontStyle kTextFontStyle =
28 ui::ResourceBundle::BaseFont; 29 ui::ResourceBundle::BaseFont;
29 // Font style for bold dialog text. 30 // Font style for bold dialog text.
30 static const ui::ResourceBundle::FontStyle kBoldTextFontStyle = 31 static const ui::ResourceBundle::FontStyle kBoldTextFontStyle =
31 ui::ResourceBundle::BoldFont; 32 ui::ResourceBundle::BoldFont;
32 // Font style for dialog title. 33 // Font style for dialog title.
33 static const ui::ResourceBundle::FontStyle kTitleFontStyle = 34 static const ui::ResourceBundle::FontStyle kTitleFontStyle =
34 ui::ResourceBundle::MediumFont; 35 ui::ResourceBundle::MediumFont;
(...skipping 18 matching lines...) Expand all
53 virtual bool CanShowConstrainedWindow(); 54 virtual bool CanShowConstrainedWindow();
54 55
55 // Returns the native window of the constrained window. 56 // Returns the native window of the constrained window.
56 virtual gfx::NativeWindow GetNativeWindow(); 57 virtual gfx::NativeWindow GetNativeWindow();
57 58
58 protected: 59 protected:
59 virtual ~ConstrainedWindow() {} 60 virtual ~ConstrainedWindow() {}
60 }; 61 };
61 62
62 #endif // CHROME_BROWSER_UI_CONSTRAINED_WINDOW_H_ 63 #endif // CHROME_BROWSER_UI_CONSTRAINED_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698