git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20354 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -51,12 +51,15 @@ APRView::APRView(const BRect &frame, const char *name, int32 resize, int32 flags
|
|||||||
BRect rect(Bounds().InsetByCopy(10,10));
|
BRect rect(Bounds().InsetByCopy(10,10));
|
||||||
|
|
||||||
#ifdef HAIKU_TARGET_PLATFORM_HAIKU
|
#ifdef HAIKU_TARGET_PLATFORM_HAIKU
|
||||||
|
|
||||||
fDecorMenu = new BMenu("Window Style");
|
fDecorMenu = new BMenu("Window Style");
|
||||||
int32 decorCount = BPrivate::count_decorators();
|
int32 decorCount = BPrivate::count_decorators();
|
||||||
if (decorCount > 1) {
|
if (decorCount > 1) {
|
||||||
for (int32 i = 0; i < decorCount; i++) {
|
for (int32 i = 0; i < decorCount; i++) {
|
||||||
BString name;
|
BString name;
|
||||||
BPrivate::get_decorator_name(i, name);
|
BPrivate::get_decorator_name(i, name);
|
||||||
|
if (name.CountChars() < 1)
|
||||||
|
continue;
|
||||||
fDecorMenu->AddItem(new BMenuItem(name.String(),
|
fDecorMenu->AddItem(new BMenuItem(name.String(),
|
||||||
new BMessage(DECORATOR_CHANGED)));
|
new BMessage(DECORATOR_CHANGED)));
|
||||||
}
|
}
|
||||||
@@ -71,7 +74,16 @@ APRView::APRView(const BRect &frame, const char *name, int32 resize, int32 flags
|
|||||||
rect = Bounds().InsetByCopy(10,10);
|
rect = Bounds().InsetByCopy(10,10);
|
||||||
rect.OffsetTo(10, field->Frame().bottom + 10);
|
rect.OffsetTo(10, field->Frame().bottom + 10);
|
||||||
}
|
}
|
||||||
fDecorMenu->ItemAt(BPrivate::get_decorator())->SetMarked(true);
|
BMenuItem *marked = fDecorMenu->ItemAt(BPrivate::get_decorator());
|
||||||
|
if (marked)
|
||||||
|
marked->SetMarked(true);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
marked = fDecorMenu->FindItem("Default");
|
||||||
|
if (marked)
|
||||||
|
marked->SetMarked(true);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Set up list of color fAttributes
|
// Set up list of color fAttributes
|
||||||
@@ -166,6 +178,7 @@ APRView::AttachedToWindow(void)
|
|||||||
|
|
||||||
fPicker->SetValue(fCurrentSet.StringToColor(fAttrString.String()));
|
fPicker->SetValue(fCurrentSet.StringToColor(fAttrString.String()));
|
||||||
|
|
||||||
|
if (fDecorMenu)
|
||||||
fDecorMenu->SetTargetForItems(BMessenger(this));
|
fDecorMenu->SetTargetForItems(BMessenger(this));
|
||||||
|
|
||||||
Window()->ResizeTo(MAX(fPicker->Frame().right,fPicker->Frame().right) + 10,
|
Window()->ResizeTo(MAX(fPicker->Frame().right,fPicker->Frame().right) + 10,
|
||||||
|
|||||||
Reference in New Issue
Block a user