From 6a2a85f49813a3761dd157d1669eea20c8790091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 18 Feb 2004 12:11:20 +0000 Subject: [PATCH] The PositionSlider can now use the original slider bar when DRAW_SLIDER_BAR is not defined. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6630 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/diskprobe/ProbeView.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/apps/diskprobe/ProbeView.cpp b/src/apps/diskprobe/ProbeView.cpp index 274c63db70..ad16688b92 100644 --- a/src/apps/diskprobe/ProbeView.cpp +++ b/src/apps/diskprobe/ProbeView.cpp @@ -29,6 +29,11 @@ #include +#define DRAW_SLIDER_BAR + // if this is defined, the standard slider bar is replaced with + // one that looks exactly like the one in the original DiskProbe + // (even in Dano/Zeta) + static const uint32 kMsgSliderUpdate = 'slup'; static const uint32 kMsgPositionUpdate = 'poup'; @@ -56,7 +61,9 @@ class PositionSlider : public BSlider { off_t size, uint32 blockSize); virtual ~PositionSlider(); +#ifdef DRAW_SLIDER_BAR virtual void DrawBar(); +#endif off_t Position() const; off_t Size() const { return fSize; } @@ -190,6 +197,11 @@ PositionSlider::PositionSlider(BRect rect, const char *name, BMessage *message, fBlockSize(blockSize) { Reset(); + +#ifndef DRAW_SLIDER_BAR + rgb_color color = ui_color(B_CONTROL_HIGHLIGHT_COLOR); + UseFillColor(true, &color); +#endif } @@ -198,6 +210,7 @@ PositionSlider::~PositionSlider() } +#ifdef DRAW_SLIDER_BAR void PositionSlider::DrawBar() { @@ -246,6 +259,7 @@ PositionSlider::DrawBar() view->EndLineArray(); } +#endif // DRAW_SLIDER_BAR void