Gave the uiWindow a background color. This will lead into children.

This commit is contained in:
Pietro Gagliardi 2015-11-18 15:47:15 -05:00
parent c329a721ca
commit 3bbd4bfeac
2 changed files with 8 additions and 0 deletions

View File

@ -2,6 +2,7 @@
// TODO versioning macros?
#include <AppKit.h>
#include <InterfaceKit.h>
#include <GroupLayout.h>
#include "../ui.h"
#include "../ui_haiku.hpp"
#include "../common/uipriv.h"

View File

@ -15,6 +15,8 @@ struct uiWindow {
libuiBWindow *window;
BGroupLayout *vbox;
struct child *child;
int margined;
@ -146,6 +148,11 @@ uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar)
B_ASYNCHRONOUS_CONTROLS);
w->window->w = w;
w->vbox = new BGroupLayout(B_VERTICAL, 0);
w->window->SetLayout(w->vbox);
// Haiku itself does this, with a TODO
w->vbox->Owner()->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
uiWindowOnClosing(w, defaultOnClosing, NULL);
uiHaikuFinishNewControl(w, uiWindow);