Use layout-friendly view constructors. Fixes drawing glitch.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33488 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -12,10 +12,9 @@
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
Activity::Activity(BRect frame, const char* name, uint32 resizingMode,
|
||||
uint32 flags)
|
||||
Activity::Activity(const char* name)
|
||||
:
|
||||
BView(frame, name, resizingMode, flags),
|
||||
BView(name, B_WILL_DRAW | B_FRAME_EVENTS),
|
||||
fIsRunning(false),
|
||||
fBitmap(NULL)
|
||||
{
|
||||
@@ -27,6 +26,9 @@ Activity::Activity(BRect frame, const char* name, uint32 resizingMode,
|
||||
fPattern.data[5] = 0xe1;
|
||||
fPattern.data[6] = 0xc3;
|
||||
fPattern.data[7] = 0x87;
|
||||
|
||||
SetExplicitMinSize(BSize(17, 17));
|
||||
SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, 17));
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
class Activity : public BView
|
||||
{
|
||||
public:
|
||||
Activity(BRect frame, const char* name,
|
||||
uint32 resizing_mode, uint32 flags);
|
||||
Activity(const char* name);
|
||||
~Activity();
|
||||
|
||||
void Start();
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
|
||||
ZippoWindow::ZippoWindow(BRect frame, BMessage* refs)
|
||||
:
|
||||
BWindow(frame, "Zip-O-Matic", B_TITLED_WINDOW, B_NOT_RESIZABLE
|
||||
| B_AUTO_UPDATE_SIZE_LIMITS | B_NOT_ZOOMABLE),
|
||||
BWindow(frame, "Zip-O-Matic", B_TITLED_WINDOW,
|
||||
B_NOT_RESIZABLE | B_AUTO_UPDATE_SIZE_LIMITS | B_NOT_ZOOMABLE),
|
||||
fThread(NULL),
|
||||
fWindowGotRefs(false),
|
||||
fZippingWasStopped(false),
|
||||
@@ -41,9 +41,7 @@ ZippoWindow::ZippoWindow(BRect frame, BMessage* refs)
|
||||
fWindowInvoker(new BInvoker(new BMessage(ZIPPO_QUIT_OR_CONTINUE), NULL,
|
||||
this))
|
||||
{
|
||||
fActivityView = new Activity(BRect(0, 0, 171, 17), "activity",
|
||||
B_FOLLOW_LEFT_RIGHT, B_WILL_DRAW | B_FRAME_EVENTS);
|
||||
fActivityView->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, 17));
|
||||
fActivityView = new Activity("activity");
|
||||
fActivityView->SetExplicitMinSize(BSize(171, 17));
|
||||
|
||||
fArchiveNameView = new BStringView("archive_text", "");
|
||||
|
||||
Reference in New Issue
Block a user