[Libreoffice-commits] core.git: officecfg/registry sfx2/source sfx2/uiconfig

2021-01-26 Thread Heiko Tietze (via logerrit)
 officecfg/registry/data/org/openoffice/Office/Common.xcu   |3 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |5 
 sfx2/source/dialog/backingwindow.cxx   |   94 +++--
 sfx2/source/dialog/backingwindow.hxx   |5 
 sfx2/uiconfig/ui/startcenter.ui|   10 -
 5 files changed, 97 insertions(+), 20 deletions(-)

New commits:
commit 35713de9d0b4981a019edd25591285d0bc6107db
Author: Heiko Tietze 
AuthorDate: Tue Jan 19 14:37:19 2021 +0100
Commit: Heiko Tietze 
CommitDate: Tue Jan 26 14:43:06 2021 +0100

Make brand image clickable

and link to LibreOffice volunteer page

Change-Id: Ie422983d0e23faa16c2e2364b25798b938712a43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109637
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu 
b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index 83335726c843..237348be96cb 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -363,6 +363,9 @@
 
   https://hub.libreoffice.org/InstallJava/
 
+
+  https://hub.libreoffice.org/volunteersupport/
+
   
   
 
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index de96a9477b37..be60d3d19ec3 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -2111,6 +2111,11 @@
   Specifies the URL used with the UNO command SendFeedback 
(SID_SEND_FEEDBACK).
 
   
+  
+
+  Specifies the URL opened per click on the brand image at the 
start center.
+
+  
   
 
   Specifies the URL used with the UNO command QuestionAnswers 
(SID_Q_AND_A).
diff --git a/sfx2/source/dialog/backingwindow.cxx 
b/sfx2/source/dialog/backingwindow.cxx
index 45aec2821c4d..01b29e4dc197 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -37,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -60,6 +62,73 @@ using namespace ::com::sun::star::document;
 
 constexpr OUStringLiteral SERVICENAME_CFGREADACCESS = 
u"com.sun.star.configuration.ConfigurationAccess";
 
+class BrandImage final : public weld::CustomWidgetController
+{
+private:
+BitmapEx maBrandImage;
+bool mbIsDark = false;
+
+public:
+virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override
+{
+weld::CustomWidgetController::SetDrawingArea(pDrawingArea);
+SetPointer(PointerStyle::RefHand);
+}
+
+virtual void Resize() override
+{
+auto nWidth = GetOutputSizePixel().Width();
+if (maBrandImage.GetSizePixel().Width() != nWidth)
+LoadImageForWidth(nWidth);
+weld::CustomWidgetController::Resize();
+}
+
+void LoadImageForWidth(int nWidth)
+{
+mbIsDark = 
Application::GetSettings().GetStyleSettings().GetDialogColor().IsDark();
+SfxApplication::loadBrandSvg(mbIsDark ? "shell/logo-sc_inverted" : 
"shell/logo-sc",
+maBrandImage, nWidth);
+}
+
+void ConfigureForWidth(int nWidth)
+{
+if (maBrandImage.GetSizePixel().Width() == nWidth)
+return;
+LoadImageForWidth(nWidth);
+const Size aBmpSize(maBrandImage.GetSizePixel());
+set_size_request(aBmpSize.Width(), aBmpSize.Height());
+}
+
+virtual void StyleUpdated() override
+{
+const bool bIsDark = 
Application::GetSettings().GetStyleSettings().GetDialogColor().IsDark();
+if (bIsDark != mbIsDark)
+LoadImageForWidth(GetOutputSizePixel().Width());
+weld::CustomWidgetController::StyleUpdated();
+}
+
+virtual bool MouseButtonUp(const MouseEvent& rMEvt) override
+{
+if (rMEvt.IsLeft())
+{
+OUString sURL = 
officecfg::Office::Common::Menus::VolunteerURL::get();
+localizeWebserviceURI(sURL);
+
+Reference const 
xSystemShellExecute(
+css::system::SystemShellExecute::create(
+::comphelper::getProcessComponentContext()));
+xSystemShellExecute->execute(sURL, OUString(),
+ 
css::system::SystemShellExecuteFlags::URIS_ONLY);
+}
+return true;
+}
+
+virtual void Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle&) override
+{
+rRenderContext.DrawBitmapEx(Point(0, 0), maBrandImage);
+}
+};
+
 // increase size of the text in the buttons on the left fMultiplier-times
 float const g_fMultiplier = 1.4f;
 
@@ -77,7 +146,8 @@ BackingWindow::

[Libreoffice-commits] core.git: officecfg/registry sfx2/source sfx2/uiconfig

2016-04-29 Thread Samuel Mehrbrodt
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |2 +-
 officecfg/registry/schema/org/openoffice/Office/Common.xcs   |4 
++--
 sfx2/source/doc/templatedlg.cxx  |4 
++--
 sfx2/uiconfig/ui/templatedlg.ui  |2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit a308454241487971a773a8c4d55106b1907ac793
Author: Samuel Mehrbrodt 
Date:   Fri Apr 29 13:05:08 2016 +

Template Manager -> Templates

As agreed in the design team.
Most places already use "Templates".

Change-Id: I6186546883059bf0308fabd61b162eb649647ec9
Reviewed-on: https://gerrit.libreoffice.org/24493
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index 1c848eb..52fc8f1 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -6016,7 +6016,7 @@
   
   
 
-  Template Manager
+  Templates
 
   
   
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index caaa20a..10461b5f 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -5769,12 +5769,12 @@
   
   
 
-  List of template repositories URLs bookmarked in the template 
manager dialog.
+  List of template repositories URLs bookmarked in the Templates 
dialog.
 
   
   
 
-  List of template repositories names bookmarked in the template 
manager dialog.
+  List of template repositories names bookmarked in the 
Templates dialog.
 
   
   
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 2b4f9b3..d1a5268 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -290,7 +290,7 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(vcl::Window 
*parent)
 createRepositoryMenu();
 createDefaultTemplateMenu();
 
-//setSaveMode(); //Uncomment this line to put template manager into Save 
As mode
+//setSaveMode(); //Uncomment this line to put templates dialog into Save 
As mode
 
 mpLocalView->Populate();
 mpCurView->filterItems(ViewFilter_Application(FILTER_APPLICATION::WRITER));
@@ -352,7 +352,7 @@ void SfxTemplateManagerDlg::setSaveMode()
 // only with .src dialogs, as the tab pages could have existed even
 // without TabControl containing them.  This is not possible with .ui
 // definitions any more (and rightly so!), so leave just one tab here for
-// now, until we do a bigger Template manager rework.
+// now, until we do a bigger rework of the templates dialog.
 while (mpTabControl->GetPageCount() > 1)
 mpTabControl->RemovePage(mpTabControl->GetPageId(1));
 
diff --git a/sfx2/uiconfig/ui/templatedlg.ui b/sfx2/uiconfig/ui/templatedlg.ui
index 0517ea3..858a546 100644
--- a/sfx2/uiconfig/ui/templatedlg.ui
+++ b/sfx2/uiconfig/ui/templatedlg.ui
@@ -8,7 +8,7 @@
 600
 False
 6
-Template Manager
+Templates
 True
 normal
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits