Skip to content

Commit 64af87e

Browse files
authored
Merge pull request #9 from owenca/master
Fix background bitmap image. See #1
2 parents 1ff24a3 + bbad81d commit 64af87e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

MainWindow.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
#include <Application.h>
1212
#include <Bitmap.h>
13+
#include <Entry.h>
14+
#include <Path.h>
15+
#include <Roster.h>
1316
#include <Screen.h>
1417
#include <Window.h>
1518
#include <MenuBar.h>
@@ -29,7 +32,13 @@ class BackView : public BView
2932
BackView(BRect r, const char* t, uint32 fl, uint32 fl2)
3033
: BView(r, t, fl, fl2) {
3134
fBackgroundColor = BScreen().DesktopColor();
32-
bitmap = BTranslationUtils::GetBitmap("/boot/home/hexvexed/background.png");
35+
app_info info;
36+
be_roster->GetActiveAppInfo(&info);
37+
BEntry entry(&info.ref);
38+
BPath path;
39+
entry.GetPath(&path);
40+
path.Append("backgrounds/background.png");
41+
bitmap = BTranslationUtils::GetBitmap(path.Path());
3342
}
3443

3544

0 commit comments

Comments
 (0)