HaikuDepot: Allow to force other size on BitmapView

This commit is contained in:
Stephan Aßmus
2013-08-04 18:29:21 +02:00
parent 9ecd9f0294
commit 8c9cf99133
+10 -2
View File
@@ -14,6 +14,7 @@
#include <Catalog.h> #include <Catalog.h>
#include <Font.h> #include <Font.h>
#include <LayoutBuilder.h> #include <LayoutBuilder.h>
#include <LayoutUtils.h>
#include <Message.h> #include <Message.h>
#include <TabView.h> #include <TabView.h>
#include <SpaceLayoutItem.h> #include <SpaceLayoutItem.h>
@@ -74,12 +75,19 @@ public:
size.height = bounds.Height(); 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() virtual BSize MaxSize()
{ {
return MinSize(); BSize size = MinSize();
return BLayoutUtils::ComposeSize(ExplicitMaxSize(), size);
} }
void SetBitmap(const BBitmap* bitmap) void SetBitmap(const BBitmap* bitmap)