diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-19 22:02:24 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-19 22:02:24 +0000 |
commit | b1594d0f4e1b523e72c84b13ebe9bf7e2377648e (patch) | |
tree | 89b4ea435e92e5ee181f26f1a27963d24dc44e90 /chrome/views/widget/root_view_gtk.cc | |
parent | 5e1d37e5d4c6c573b4e9d0e3290fb3b2748981c3 (diff) | |
download | chromium_src-b1594d0f4e1b523e72c84b13ebe9bf7e2377648e.zip chromium_src-b1594d0f4e1b523e72c84b13ebe9bf7e2377648e.tar.gz chromium_src-b1594d0f4e1b523e72c84b13ebe9bf7e2377648e.tar.bz2 |
Now have a TextButton rendering (sort of; doesn't respond to mouse events so I don't know if it'll draw the border correctly).
Review URL: http://codereview.chromium.org/42414
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12162 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/widget/root_view_gtk.cc')
-rw-r--r-- | chrome/views/widget/root_view_gtk.cc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/chrome/views/widget/root_view_gtk.cc b/chrome/views/widget/root_view_gtk.cc index 1c7fe9c..115b37d 100644 --- a/chrome/views/widget/root_view_gtk.cc +++ b/chrome/views/widget/root_view_gtk.cc @@ -10,24 +10,22 @@ namespace views { -// TODO(port): Port GetScheduledPaintRectConstrainedToSize() to not use RECT. - void RootView::UpdateCursor(const MouseEvent& e) { NOTIMPLEMENTED(); } -// TODO(port): Port OnPaint() to not use HWNDs in its public interface. void RootView::OnPaint(GdkEventExpose* event) { ChromeCanvasPaint canvas(event); - canvas.FillRectInt(SK_ColorRED, 5, 5, 10, 10); - canvas.FillRectInt(SK_ColorGREEN, 25, 5, 10, 10); - canvas.FillRectInt(SK_ColorBLUE, 45, 5, 10, 10); if (!canvas.isEmpty()) { - // const PAINTSTRUCT& ps = canvas.paintStruct(); - // SchedulePaint(gfx::Rect(ps.rcPaint), false); - if (NeedsPainting(false)) + SchedulePaint(gfx::Rect(canvas.rectangle()), false); + if (NeedsPainting(false)) { ProcessPaint(&canvas); + + canvas.FillRectInt(SK_ColorRED, 5, 5, 10, 10); + canvas.FillRectInt(SK_ColorGREEN, 25, 5, 10, 10); + canvas.FillRectInt(SK_ColorBLUE, 45, 5, 10, 10); + } } } |