From 7bed483ae28bc06938ba851a20cbe2d7d2071c79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sundstr=C3=B6m?= Date: Sat, 8 Mar 2008 20:06:50 +0000 Subject: [PATCH] Show popup menu also when right-clicking the load meter. It was a blind spot. Added the virtual keyword to the other two load meter view hooks. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24313 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/pulse/ProgressBar.cpp | 8 ++++++++ src/apps/pulse/ProgressBar.h | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/apps/pulse/ProgressBar.cpp b/src/apps/pulse/ProgressBar.cpp index 7def749037..547e6d4d1c 100644 --- a/src/apps/pulse/ProgressBar.cpp +++ b/src/apps/pulse/ProgressBar.cpp @@ -68,6 +68,14 @@ ProgressBar::AttachedToWindow() } +void +ProgressBar::MouseDown(BPoint point) +{ + point = ConvertToParent(point); + Parent()->MouseDown(point); +} + + void ProgressBar::Set(int32 value) { diff --git a/src/apps/pulse/ProgressBar.h b/src/apps/pulse/ProgressBar.h index 24fc511e59..c6fe723501 100644 --- a/src/apps/pulse/ProgressBar.h +++ b/src/apps/pulse/ProgressBar.h @@ -24,10 +24,11 @@ typedef struct { class ProgressBar : public BView { public: ProgressBar(BRect r, char* name); - void Draw(BRect rect); + virtual void Draw(BRect rect); void Set(int32 value); void UpdateColors(int32 color, bool fade); - void AttachedToWindow(); + virtual void AttachedToWindow(); + virtual void MouseDown(BPoint point); enum { PROGRESS_WIDTH = 146,