summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog
diff options
context:
space:
mode:
authorHeiko Tietze <tietze.heiko@gmail.com>2021-01-08 15:10:42 +0100
committerMiklos Vajna <vmiklos@collabora.com>2021-01-14 09:25:07 +0100
commit2d69acfde50cb0e06a9a057939078fd102d371a3 (patch)
treefa6e06401d482d225b2e9f14a37a0a943de2ba45 /sfx2/source/dialog
parent06322b0922972fec4b9e5f57e8dbab18ca9bd676 (diff)
Resolves tdf#139343 and tdf#139335 - Community/Enterprise flavor
* Switch CE/EE per --disable-community-flavor internally use HAVE_FEATURE_COMMUNITY_FLAVOR * Version info in about dialog shows text depending on this flavor * Start center also shows the brand image now * TDF builds use a brand image with TDF tagline in the about dialog * Brand images with just "Community" (no Edition) Change-Id: I363dd2b39df9aad951c9d79addf9bdedfc4a3495 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108980 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r--sfx2/source/dialog/backingwindow.cxx17
-rw-r--r--sfx2/source/dialog/backingwindow.hxx1
2 files changed, 17 insertions, 1 deletions
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index 1386ad3a641b..3adcea79599b 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -18,7 +18,6 @@
*/
#include "backingwindow.hxx"
-
#include <vcl/accel.hxx>
#include <vcl/event.hxx>
#include <vcl/help.hxx>
@@ -26,6 +25,7 @@
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
#include <vcl/syswin.hxx>
+#include <vcl/virdev.hxx>
#include <unotools/historyoptions.hxx>
#include <unotools/moduleoptions.hxx>
@@ -36,6 +36,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/propertysequence.hxx>
+#include <sfx2/app.hxx>
#include <tools/diagnose_ex.h>
@@ -76,6 +77,7 @@ BackingWindow::BackingWindow(vcl::Window* i_pParent)
, mxDrawAllButton(m_xBuilder->weld_button("draw_all"))
, mxDBAllButton(m_xBuilder->weld_button("database_all"))
, mxMathAllButton(m_xBuilder->weld_button("math_all"))
+ , mxBrandImage(m_xBuilder->weld_image("imBrand"))
, mxHelpButton(m_xBuilder->weld_button("help"))
, mxExtensionsButton(m_xBuilder->weld_button("extensions"))
, mxAllButtonsBox(m_xBuilder->weld_container("all_buttons_box"))
@@ -94,6 +96,19 @@ BackingWindow::BackingWindow(vcl::Window* i_pParent)
SetPaintTransparent(false);
SetBackground(svtools::ColorConfig().GetColorValue(::svtools::APPBACKGROUND).nColor);
+ //brand image
+ BitmapEx aBackgroundBitmap;
+ bool bIsDark = Application::GetSettings().GetStyleSettings().GetDialogColor().IsDark();
+ if (SfxApplication::loadBrandSvg(bIsDark ? "shell/logo-sc_inverted" : "shell/logo-sc",
+ aBackgroundBitmap, mxButtonsBox->get_preferred_size().Width()))
+ {
+ ScopedVclPtr<VirtualDevice> m_pVirDev = mxBrandImage->create_virtual_device();
+ m_pVirDev->SetOutputSizePixel(aBackgroundBitmap.GetSizePixel());
+ m_pVirDev->DrawBitmapEx(Point(0, 0), aBackgroundBitmap);
+ mxBrandImage->set_image(m_pVirDev.get());
+ m_pVirDev.disposeAndClear();
+ }
+
//set an alternative help label that doesn't hotkey the H of the Help menu
mxHelpButton->set_label(mxAltHelpLabel->get_label());
mxHelpButton->connect_clicked(LINK(this, BackingWindow, ClickHelpHdl));
diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx
index e722999eab19..a1f6860c60dc 100644
--- a/sfx2/source/dialog/backingwindow.hxx
+++ b/sfx2/source/dialog/backingwindow.hxx
@@ -59,6 +59,7 @@ class BackingWindow : public InterimItemWindow
std::unique_ptr<weld::Button> mxDrawAllButton;
std::unique_ptr<weld::Button> mxDBAllButton;
std::unique_ptr<weld::Button> mxMathAllButton;
+ std::unique_ptr<weld::Image> mxBrandImage;
std::unique_ptr<weld::Button> mxHelpButton;
std::unique_ptr<weld::Button> mxExtensionsButton;