Skip to content

Commit

Permalink
HaikuDepot: Allow to force other size on BitmapView
Browse files Browse the repository at this point in the history
  • Loading branch information
stippi committed Aug 4, 2013
1 parent 9ecd9f0 commit 8c9cf99
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/apps/haiku-depot/PackageInfoView.cpp
Expand Up @@ -14,6 +14,7 @@
#include <Catalog.h>
#include <Font.h>
#include <LayoutBuilder.h>
#include <LayoutUtils.h>
#include <Message.h>
#include <TabView.h>
#include <SpaceLayoutItem.h>
Expand Down Expand Up @@ -74,12 +75,19 @@ class BitmapView : public BView {
size.height = bounds.Height();
}

return size;
return BLayoutUtils::ComposeSize(ExplicitMinSize(), size);
}

virtual BSize PreferredSize()
{
BSize size = MinSize();
return BLayoutUtils::ComposeSize(ExplicitPreferredSize(), size);
}

virtual BSize MaxSize()
{
return MinSize();
BSize size = MinSize();
return BLayoutUtils::ComposeSize(ExplicitMaxSize(), size);
}

void SetBitmap(const BBitmap* bitmap)
Expand Down

0 comments on commit 8c9cf99

Please sign in to comment.