From c9ceeec23c6d9fa729d25da44f2020c80aa60988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Tue, 12 Apr 2005 13:16:58 +0000 Subject: [PATCH] Reverted some changes by Adi, because the way it works now is more helpful in finding bugs. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12348 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/tests/servers/app/windows/main.cpp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/tests/servers/app/windows/main.cpp b/src/tests/servers/app/windows/main.cpp index 30d266035a..cd34d99949 100644 --- a/src/tests/servers/app/windows/main.cpp +++ b/src/tests/servers/app/windows/main.cpp @@ -3,7 +3,7 @@ #include #include "Application.h" -#include "TextControl.h" +#include "Button.h" #include "View.h" #include "Window.h" @@ -19,9 +19,14 @@ class HelloView : public BView { // printf("HelloView::Draw()\n"); // updateRect.PrintToStream(); -// SetHighColor(ui_color(B_PANEL_BACKGROUND_COLOR)); -// FillRect(updateRect); + SetHighColor(ui_color(B_PANEL_BACKGROUND_COLOR)); + FillRect(updateRect); BRect r(Bounds()); +// this fixes the font redrawing (text getting thicker) +// and it proves my theory that the Drawing here +// should be clipped to the update region as it was +// when the invalidation was triggered +//FillRect(r); // r.PrintToStream(); const char* message = "Hello World!"; @@ -46,12 +51,13 @@ show_window(BRect frame, const char* name) BView* view = new HelloView(window->Bounds(), "test", B_FOLLOW_ALL, B_WILL_DRAW/* | B_FULL_UPDATE_ON_RESIZE*/); - view->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); +// view->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); window->AddChild(view); -/* BRect b(view->Bounds()); - b.InsetBy(10.0, 20.0); - BTextControl* control = new BTextControl(b, "tc", "Text", "Enter Text Here", NULL); - view->AddChild(control);*/ + BRect b(view->Bounds()); + b.InsetBy(20.0, 40.0); + b.OffsetTo(5.0, 5.0); + BButton* control = new BButton(b, "button", "Label", NULL); + view->AddChild(control); window->Show(); }