From e6d2c1f3108e913889769101cdcdb9cecf660556 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sat, 12 May 2007 17:01:41 +0000 Subject: [PATCH] BButton needs B_FULL_UPDATE_ON_RESIZE despite the fact that it isn't resizable by default. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21121 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/os/interface/Button.h | 6 ++++-- src/kits/interface/Button.cpp | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/headers/os/interface/Button.h b/headers/os/interface/Button.h index ac69e03dbc..0f0a395881 100644 --- a/headers/os/interface/Button.h +++ b/headers/os/interface/Button.h @@ -51,10 +51,12 @@ public: const char *label, BMessage *message, uint32 resizingMode = B_FOLLOW_LEFT | B_FOLLOW_TOP, - uint32 flags = B_WILL_DRAW | B_NAVIGABLE); + uint32 flags = B_WILL_DRAW | B_NAVIGABLE + | B_FULL_UPDATE_ON_RESIZE); BButton(const char* name, const char* label, BMessage *message, - uint32 flags = B_WILL_DRAW | B_NAVIGABLE); + uint32 flags = B_WILL_DRAW | B_NAVIGABLE + | B_FULL_UPDATE_ON_RESIZE); BButton(const char* label, BMessage *message); virtual ~BButton(); diff --git a/src/kits/interface/Button.cpp b/src/kits/interface/Button.cpp index d6a8ae8504..26ac79c0ec 100644 --- a/src/kits/interface/Button.cpp +++ b/src/kits/interface/Button.cpp @@ -21,7 +21,8 @@ BButton::BButton(BRect frame, const char *name, const char *label, BMessage *message, uint32 resizingMode, uint32 flags) - : BControl(frame, name, label, message, resizingMode, flags | B_WILL_DRAW), + : BControl(frame, name, label, message, resizingMode, + flags | B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE), fDrawAsDefault(false) { // Resize to minimum height if needed @@ -36,7 +37,7 @@ BButton::BButton(BRect frame, const char *name, const char *label, BMessage *mes BButton::BButton(const char* name, const char* label, BMessage *message, uint32 flags) : BControl(BRect(0, 0, -1, -1), name, label, message, B_FOLLOW_NONE, - flags | B_WILL_DRAW | B_SUPPORTS_LAYOUT), + flags | B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE | B_SUPPORTS_LAYOUT), fDrawAsDefault(false) { // Resize to minimum height if needed @@ -50,7 +51,8 @@ BButton::BButton(const char* name, const char* label, BMessage *message, BButton::BButton(const char* label, BMessage *message) : BControl(BRect(0, 0, -1, -1), NULL, label, message, B_FOLLOW_NONE, - B_WILL_DRAW | B_NAVIGABLE | B_SUPPORTS_LAYOUT), + B_WILL_DRAW | B_NAVIGABLE | B_FULL_UPDATE_ON_RESIZE + | B_SUPPORTS_LAYOUT), fDrawAsDefault(false) { // Resize to minimum height if needed