From 3bbd4bfeac5271eb069a9bbd5b5bc5a4417b11a3 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Wed, 18 Nov 2015 15:47:15 -0500 Subject: [PATCH] Gave the uiWindow a background color. This will lead into children. --- haiku/uipriv_haiku.hpp | 1 + haiku/window.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/haiku/uipriv_haiku.hpp b/haiku/uipriv_haiku.hpp index 1bcbd237..57e0f60a 100644 --- a/haiku/uipriv_haiku.hpp +++ b/haiku/uipriv_haiku.hpp @@ -2,6 +2,7 @@ // TODO versioning macros? #include #include +#include #include "../ui.h" #include "../ui_haiku.hpp" #include "../common/uipriv.h" diff --git a/haiku/window.cpp b/haiku/window.cpp index fa7543b3..ef49bd45 100644 --- a/haiku/window.cpp +++ b/haiku/window.cpp @@ -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);