1. Save Mode removed from Template Manager 2. Context Menu for TemplateViewItems (Handled from LocalView for Local Repos) 3. 'showAllTemplates()' replacing 'showRootRegion()' 4. Filter Combobox for templates (Remembers filters also) 5. Search Filter (Synchronized with Filter ComboBoxes) 6. Removed Tabs from Template Manager 7. Removed Buttons from TemplateAbstractView 8. Unused GtkToolButtons removed 9. PushButtons in UI 10. Modal dialog for Import and Move (Works from "All Categories" now too) 11. ContextMenu for TemplateSearchView 12. Delete Categories(Folder) in Settings Menu 13. Save As Template Dialog Change-Id: I88f6568c35271c17dbd7e6877d50119a8cfe4d60 Reviewed-on: https://gerrit.libreoffice.org/24545 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
45 lines
1.8 KiB
C++
45 lines
1.8 KiB
C++
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
/*
|
|
* This file is part of the LibreOffice project.
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*/
|
|
|
|
#include <sfx2/templatedefaultview.hxx>
|
|
#include <sfx2/thumbnailview.hxx>
|
|
#include <vcl/builderfactory.hxx>
|
|
#include <sfx2/app.hxx>
|
|
|
|
#include <officecfg/Office/Common.hxx>
|
|
|
|
VCL_BUILDER_FACTORY(TemplateDefaultView)
|
|
|
|
TemplateDefaultView::TemplateDefaultView( Window* pParent)
|
|
: TemplateLocalView(pParent)
|
|
, mnTextHeight(30)
|
|
, mnItemPadding(5)//TODO:: Change padding to 10. It looks really crowded and occupied.
|
|
{
|
|
Rectangle aScreen = Application::GetScreenPosSizePixel(Application::GetDisplayBuiltInScreen());
|
|
mnItemMaxSize = std::min(aScreen.GetWidth(),aScreen.GetHeight()) > 800 ? 256 : 192;
|
|
ThumbnailView::setItemDimensions( mnItemMaxSize, mnItemMaxSize, mnTextHeight, mnItemPadding );
|
|
updateThumbnailDimensions(mnItemMaxSize);
|
|
|
|
// startcenter specific settings
|
|
maFillColor = Color(officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsBackgroundColor::get());
|
|
maTextColor = Color(officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsTextColor::get());
|
|
maHighlightColor = Color(officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsHighlightColor::get());
|
|
maHighlightTextColor = Color(officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsHighlightTextColor::get());
|
|
mfHighlightTransparence = 0.25;
|
|
}
|
|
|
|
void TemplateDefaultView::reload()
|
|
{
|
|
TemplateLocalView::reload();
|
|
// Set preferred width
|
|
set_width_request(mnTextHeight + mnItemMaxSize + 2*mnItemPadding);
|
|
|
|
}
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|