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

Unified Diff: ui/views/examples/widget_example.cc

Issue 15861012: Polish new dialog style layout and sizing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove long title example debugging code. Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/bubble/bubble_frame_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/widget_example.cc
diff --git a/ui/views/examples/widget_example.cc b/ui/views/examples/widget_example.cc
index 97c321bbd759707334eeccf36ddf6b744ff79d2b..523151417e3a5090fcdf9a4d51d21a69c8050b1e 100644
--- a/ui/views/examples/widget_example.cc
+++ b/ui/views/examples/widget_example.cc
@@ -23,6 +23,7 @@ class DialogExample : public DialogDelegateView {
virtual ~DialogExample();
virtual string16 GetWindowTitle() const OVERRIDE;
virtual View* CreateExtraView() OVERRIDE;
+ virtual View* CreateTitlebarExtraView() OVERRIDE;
virtual View* CreateFootnoteView() OVERRIDE;
};
@@ -32,8 +33,7 @@ DialogExample::DialogExample() {
AddChildView(new Label(ASCIIToUTF16("Dialog contents label!")));
}
-DialogExample::~DialogExample() {
-}
+DialogExample::~DialogExample() {}
string16 DialogExample::GetWindowTitle() const {
return ASCIIToUTF16("Dialog Widget Example");
@@ -45,6 +45,12 @@ View* DialogExample::CreateExtraView() {
return button;
}
+View* DialogExample::CreateTitlebarExtraView() {
+ Label* label = new Label(ASCIIToUTF16("Extra view!"));
+ label->SetEnabledColor(SK_ColorBLUE);
+ return label;
+}
+
View* DialogExample::CreateFootnoteView() {
return new Label(ASCIIToUTF16("Footnote label!"));
}
« no previous file with comments | « ui/views/bubble/bubble_frame_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698