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

Unified Diff: views/examples/bubble_example.cc

Issue 8368006: Support Windows native textfield, combobox, etc. in new bubbles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« views/bubble/bubble_delegate.cc ('K') | « views/bubble/bubble_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/examples/bubble_example.cc
diff --git a/views/examples/bubble_example.cc b/views/examples/bubble_example.cc
index f99155b2da58b8dc8b65fb5812aefef1833e8e64..ed19595fd065ef416441273205fd525a364943cb 100644
--- a/views/examples/bubble_example.cc
+++ b/views/examples/bubble_example.cc
@@ -12,6 +12,9 @@
#include "views/layout/fill_layout.h"
#include "views/widget/widget.h"
+// TODO(msw): Remove textfield
+#include "views/controls/textfield/textfield.h"
+
namespace examples {
struct BubbleConfig {
@@ -42,10 +45,26 @@ class ExampleBubbleDelegateView : public views::BubbleDelegateView {
protected:
virtual void Init() OVERRIDE {
- SetLayoutManager(new views::FillLayout());
- views::Label* label = new views::Label(label_);
- label->set_border(views::Border::CreateSolidBorder(10, GetColor()));
- AddChildView(label);
+ //SetLayoutManager(new views::FillLayout());
+ //views::Label* label = new views::Label(label_);
+ //label->set_border(views::Border::CreateSolidBorder(10, GetColor()));
+ //label->set_background(
+ // views::Background::CreateSolidBackground(SK_ColorWHITE));
+ //AddChildView(label);
+
+ set_background(views::Background::CreateSolidBackground(SK_ColorBLUE));
+
+ // TODO(msw): Revert test textfield
+ SetLayoutManager(
+ new views::BoxLayout(views::BoxLayout::kVertical, 30, 30, 1));
+ views::Textfield* tf = new views::Textfield();
+ tf->SetText(label_);
+ tf->SetBackgroundColor(SK_ColorGREEN);
+ tf->set_default_width_in_chars(20);
+ tf->SizeToPreferredSize();
+ tf->set_border(views::Border::CreateSolidBorder(10, GetColor()));
+ set_border(views::Border::CreateSolidBorder(10, GetColor()));
+ AddChildView(tf);
}
private:
« views/bubble/bubble_delegate.cc ('K') | « views/bubble/bubble_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698