Kaydet (Commit) e93169a9 authored tarafından Rafael Dominguez's avatar Rafael Dominguez

Make local overlay fill all the window.

- Since we dont need to support drag and drop its better to just display
the full content of the folder as possible.
- Resize overlay when view gets resized.

Change-Id: I12909ae14b13dbaf5ec844f94268f8d86a84d91a
üst 8d35d24f
......@@ -94,6 +94,8 @@ public:
protected:
virtual void Resize();
virtual void OnSelectionMode (bool bMode);
DECL_LINK(OverlayItemStateHdl, const ThumbnailViewItem*);
......
......@@ -55,8 +55,6 @@ public:
private:
virtual void Resize ();
virtual void OnItemDblClicked (ThumbnailViewItem *pRegionItem);
DECL_LINK(ChangeNameHdl, TemplateView*);
......
......@@ -38,10 +38,6 @@ public:
void setItemDimensions (long ItemWidth, long ThumbnailHeight, long DisplayHeight, int itemPadding);
private:
virtual void Resize ();
private:
std::vector<TemplateOnlineViewItem*> maRepositories;
......
......@@ -228,6 +228,11 @@ BitmapEx TemplateAbstractView::fetchThumbnail (const rtl::OUString &msURL, long
return TemplateAbstractView::scaleImg(aThumbnail,width,height);
}
void TemplateAbstractView::Resize()
{
mpItemView->SetSizePixel(GetSizePixel());
}
void TemplateAbstractView::OnSelectionMode (bool bMode)
{
if (mpItemView->IsVisible())
......
......@@ -29,13 +29,9 @@
#define ITEM_MAX_WIDTH 192
#define ITEM_MAX_HEIGHT 192
#define ITEM_PADDING 5
#define ITEM_SPACE 20
#define THUMBNAIL_MAX_HEIGHT 128 - 2*ITEM_PADDING
#define THUMBNAIL_MAX_WIDTH ITEM_MAX_WIDTH - 2*ITEM_PADDING
#define INIT_VIEW_COLS 3
#define INIT_VIEW_LINES 1
void lcl_updateThumbnails (TemplateLocalViewItem *pItem);
class FolderFilter_Application
......@@ -111,11 +107,7 @@ TemplateLocalView::TemplateLocalView ( Window* pParent, const ResId& rResId, boo
meFilterOption(FILTER_APP_NONE),
mpDocTemplates(new SfxDocumentTemplates)
{
Size aViewSize = mpItemView->CalcWindowSizePixel(INIT_VIEW_COLS,INIT_VIEW_LINES,
ITEM_MAX_WIDTH,ITEM_MAX_HEIGHT,ITEM_SPACE);
mpItemView->SetColor(Color(COL_WHITE));
mpItemView->SetSizePixel(aViewSize);
mpItemView->setItemDimensions(ITEM_MAX_WIDTH,THUMBNAIL_MAX_HEIGHT,
ITEM_MAX_HEIGHT-THUMBNAIL_MAX_HEIGHT,
ITEM_PADDING);
......@@ -575,17 +567,6 @@ void TemplateLocalView::copyFrom (TemplateLocalViewItem *pItem, const rtl::OUStr
}
}
void TemplateLocalView::Resize()
{
Size aWinSize = GetOutputSize();
Size aViewSize = mpItemView->GetSizePixel();
Point aPos;
aPos.setX((aWinSize.getWidth() - aViewSize.getWidth())/2);
mpItemView->SetPosPixel(aPos);
}
void TemplateLocalView::OnItemDblClicked (ThumbnailViewItem *pRegionItem)
{
// Fill templates
......
......@@ -29,7 +29,6 @@
#define ITEM_MAX_WIDTH 192
#define ITEM_MAX_HEIGHT 192
#define ITEM_PADDING 5
#define ITEM_SPACE 20
#define THUMBNAIL_MAX_HEIGHT 128 - 2*ITEM_PADDING
#define THUMBNAIL_MAX_WIDTH ITEM_MAX_WIDTH - 2*ITEM_PADDING
......@@ -251,9 +250,4 @@ void TemplateOnlineView::setItemDimensions(long ItemWidth, long ThumbnailHeight,
mpItemView->setItemDimensions(ItemWidth,ThumbnailHeight,DisplayHeight,itemPadding);
}
void TemplateOnlineView::Resize()
{
mpItemView->SetSizePixel(GetSizePixel());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment