tdf#163620 [API CHANGE] remove persona/appearance-toggle related code

- remove ui and source files related to app colors and personalization tabs
- remove persona entries from registry
- remove functions related to persona settings from StyleSettings, vcl..
- remove ui and code related to tools - options - view - appearance combo box

Change-Id: I98f0c38dc1facddd0e8dd03197c61a92287fdbc4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176836
Tested-by: Jenkins
Reviewed-by: Sahil Gautam <sahil.gautam.extern@allotropia.de>
This commit is contained in:
Sahil Gautam 2024-11-20 16:43:43 +05:30
parent 7e4b7be35c
commit c4962247e4
43 changed files with 28 additions and 5105 deletions

View File

@ -182,7 +182,6 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
$(call gb_Helper_optional,SCRIPTING, \
cui/source/options/optbasic) \
cui/source/options/optchart \
cui/source/options/optcolor \
cui/source/options/optctl \
cui/source/options/optdict \
cui/source/options/optfltr \
@ -200,8 +199,6 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
cui/source/options/optpath \
cui/source/options/optsave \
cui/source/options/optupdt \
$(call gb_Helper_optional,DESKTOP,\
cui/source/options/personalization) \
cui/source/options/sdbcdriverenum \
cui/source/options/securityoptions \
cui/source/options/treeopt \

View File

@ -51,7 +51,6 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/certdialog \
cui/uiconfig/ui/chapterfragment \
cui/uiconfig/ui/charnamepage \
cui/uiconfig/ui/colorconfigwin \
cui/uiconfig/ui/colorfragment \
cui/uiconfig/ui/colorpage \
cui/uiconfig/ui/colorpickerdialog \
@ -134,7 +133,6 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/objecttitledescdialog \
cui/uiconfig/ui/optaccessibilitypage \
cui/uiconfig/ui/optadvancedpage \
cui/uiconfig/ui/optappearancepage \
cui/uiconfig/ui/optasianpage \
cui/uiconfig/ui/optbasicidepage \
cui/uiconfig/ui/optctlpage \
@ -170,7 +168,6 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/pastespecial \
cui/uiconfig/ui/patterntabpage \
cui/uiconfig/ui/percentdialog \
cui/uiconfig/ui/personalization_tab \
cui/uiconfig/ui/pickbulletpage \
cui/uiconfig/ui/pickgraphicpage \
cui/uiconfig/ui/picknumberingpage \

View File

@ -39,8 +39,6 @@ const std::pair<TranslateId, sal_uInt16> SID_GENERAL_OPTIONS_RES[] =
{ NC_("SID_GENERAL_OPTIONS_RES", "Paths"), RID_SFXPAGE_PATH },
{ NC_("SID_GENERAL_OPTIONS_RES", "Fonts"), RID_SVX_FONT_SUBSTITUTION },
{ NC_("SID_GENERAL_OPTIONS_RES", "Security"), RID_SVXPAGE_INET_SECURITY },
{ NC_("SID_GENERAL_OPTIONS_RES", "Personalization"), RID_SVXPAGE_PERSONALIZATION },
{ NC_("SID_GENERAL_OPTIONS_RES", "Application Colors"), RID_SVXPAGE_COLORCONFIG },
{ NC_("SID_GENERAL_OPTIONS_RES", "Accessibility"), RID_SVXPAGE_ACCESSIBILITYCONFIG },
{ NC_("SID_GENERAL_OPTIONS_RES", "Advanced"), RID_SVXPAGE_OPTIONS_JAVA },
{ NC_("SID_GENERAL_OPTIONS_RES", "Basic IDE"), RID_SVXPAGE_BASICIDE_OPTIONS },

View File

@ -76,7 +76,6 @@ cui/ui/calloutpage.ui
cui/ui/cellalignment.ui
cui/ui/certdialog.ui
cui/ui/charnamepage.ui
cui/ui/colorconfigwin.ui
cui/ui/colorpage.ui
cui/ui/colorpickerdialog.ui
cui/ui/comment.ui

View File

@ -15,7 +15,6 @@ cui/ui/objectnamedialog.ui
cui/ui/objecttitledescdialog.ui
cui/ui/optaccessibilitypage.ui
cui/ui/optadvancedpage.ui
cui/ui/optappearancepage.ui
cui/ui/optasianpage.ui
cui/ui/optbasicidepage.ui
cui/ui/optchartcolorspage.ui

View File

@ -18,7 +18,6 @@ cui/ui/paratabspage.ui
cui/ui/password.ui
cui/ui/pastespecial.ui
cui/ui/percentdialog.ui
cui/ui/personalization_tab.ui
cui/ui/pickbulletpage.ui
cui/ui/pickgraphicpage.ui
cui/ui/picknumberingpage.ui

File diff suppressed because it is too large Load Diff

View File

@ -1,75 +0,0 @@
/* -*- 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/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#pragma once
#include <sfx2/tabdlg.hxx>
namespace svtools {class EditableColorConfig;class EditableExtendedColorConfig;}
class ColorConfigCtrl_Impl;
class AbstractSvxNameDialog;
struct ImplSVEvent;
class SvxColorOptionsTabPage : public SfxTabPage
{
bool bFillItemSetCalled;
bool m_bShowRestartDialog;
ImplSVEvent* m_nSizeAllocEventId;
std::unique_ptr<weld::ComboBox> m_xAutoColorLB;
std::unique_ptr<weld::Widget> m_xAutoColorImg;
std::unique_ptr<weld::ComboBox> m_xColorSchemeLB;
std::unique_ptr<weld::Widget> m_xColorSchemeImg;
std::unique_ptr<weld::Button> m_xSaveSchemePB;
std::unique_ptr<weld::Button> m_xDeleteSchemePB;
std::unique_ptr<ColorConfigCtrl_Impl> m_xColorConfigCT;
std::unique_ptr<weld::Widget> m_xTable;
std::unique_ptr<weld::Label> m_xOnFT;
std::unique_ptr<weld::Label> m_xColorFT;
weld::Widget& m_rWidget1;
weld::Widget& m_rWidget2;
std::unique_ptr<svtools::EditableColorConfig> pColorConfig;
std::unique_ptr<svtools::EditableExtendedColorConfig> pExtColorConfig;
DECL_LINK(SchemeChangedHdl_Impl, weld::ComboBox&, void);
DECL_LINK(onAutoColorChanged, weld::ComboBox&, void);
DECL_LINK(SaveDeleteHdl_Impl, weld::Button&, void);
DECL_LINK(CheckNameHdl_Impl, AbstractSvxNameDialog&, bool);
DECL_LINK(AdjustHeaderBar, const Size&, void);
DECL_LINK(PostAdjustHeaderBar, void *, void);
void UpdateColorConfig();
public:
SvxColorOptionsTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
virtual ~SvxColorOptionsTabPage() override;
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet );
virtual OUString GetAllStrings() override;
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
virtual void FillUserData() override;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -225,7 +225,7 @@ OUString OfaMiscTabPage::GetAllStrings()
{
OUString sAllStrings;
OUString labels[] = { u"label1"_ustr, u"label2"_ustr, u"label4"_ustr, u"label5"_ustr, u"yearslabel"_ustr,
u"toyear"_ustr, u"label7"_ustr, u"label8"_ustr, u"label9"_ustr };
u"toyear"_ustr, u"label8"_ustr, u"label9"_ustr };
for (const auto& label : labels)
{
@ -587,10 +587,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p
, m_xNotebookbarIconSizeLabel(m_xBuilder->weld_label(u"label8"_ustr))
, m_xNotebookbarIconSizeLB(m_xBuilder->weld_combo_box(u"notebookbariconsize"_ustr))
, m_xNotebookbarIconSizeImg(m_xBuilder->weld_widget(u"locknotebookbariconsize"_ustr))
, m_xDarkModeFrame(m_xBuilder->weld_widget(u"darkmode"_ustr))
, m_xAppearanceStyleLabel(m_xBuilder->weld_label(u"label7"_ustr))
, m_xAppearanceStyleLB(m_xBuilder->weld_combo_box(u"appearance"_ustr))
, m_xAppearanceStyleImg(m_xBuilder->weld_widget(u"lockappearance"_ustr))
, m_xIconStyleLabel(m_xBuilder->weld_label(u"label6"_ustr))
, m_xIconStyleLB(m_xBuilder->weld_combo_box(u"iconstyle"_ustr))
, m_xIconStyleImg(m_xBuilder->weld_widget(u"lockiconstyle"_ustr))
@ -619,11 +615,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p
, m_xRunGPTests(m_xBuilder->weld_button(u"btn_rungptest"_ustr))
, m_sAutoStr(m_xIconStyleLB->get_text(0))
{
OUString sToolKitName(Application::GetToolkitName());
const bool bHasDarkMode = sToolKitName.startsWith("gtk") || sToolKitName == "osx" || sToolKitName == "win";
if (!bHasDarkMode)
m_xDarkModeFrame->hide();
m_xFontAntiAliasing->connect_toggled( LINK( this, OfaViewTabPage, OnAntialiasingToggled ) );
m_xUseSkia->connect_toggled(LINK(this, OfaViewTabPage, OnUseSkiaToggled));
@ -762,7 +753,7 @@ std::unique_ptr<SfxTabPage> OfaViewTabPage::Create( weld::Container* pPage, weld
OUString OfaViewTabPage::GetAllStrings()
{
OUString sAllStrings;
OUString labels[] = { u"label16"_ustr, u"label7"_ustr, u"label1"_ustr, u"label6"_ustr, u"label15"_ustr,
OUString labels[] = { u"label16"_ustr, u"label1"_ustr, u"label6"_ustr, u"label15"_ustr,
u"label14"_ustr, u"label8"_ustr, u"label9"_ustr, u"label4"_ustr, u"label12"_ustr,
u"label2"_ustr, u"skiaenabled"_ustr, u"skiadisabled"_ustr, u"label5"_ustr, u"aafrom"_ustr };
@ -789,7 +780,6 @@ OUString OfaViewTabPage::GetAllStrings()
bool OfaViewTabPage::FillItemSet( SfxItemSet* )
{
bool bModified = false;
bool bDarkModeOptModified = false;
bool bRepaintWindows(false);
std::shared_ptr<comphelper::ConfigurationChanges> xChanges(comphelper::ConfigurationChanges::create());
@ -885,12 +875,6 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
bModified = true;
}
if (m_xAppearanceStyleLB->get_value_changed_from_saved())
{
bDarkModeOptModified = true;
bModified = true;
}
// #i95644# if disabled, do not use value, see in ::Reset()
if (m_xUseHardwareAccell->get_sensitive())
{
@ -922,9 +906,6 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
xChanges->commit();
if (bDarkModeOptModified)
MiscSettings::SetDarkMode(m_xAppearanceStyleLB->get_active());
if ( bAppearanceChanged )
{
batch->commit();
@ -1027,13 +1008,6 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
m_xIconStyleImg->set_visible(!bEnable);
m_xIconStyleLB->save_value();
bEnable = !officecfg::Office::Common::Misc::Appearance::isReadOnly();
m_xAppearanceStyleLB->set_active(officecfg::Office::Common::Misc::Appearance::get());
m_xAppearanceStyleLabel->set_sensitive(bEnable);
m_xAppearanceStyleLB->set_sensitive(bEnable);
m_xAppearanceStyleImg->set_visible(!bEnable);
m_xAppearanceStyleLB->save_value();
// Middle Mouse Button
bEnable = !officecfg::Office::Common::View::Dialog::MiddleMouseButton::isReadOnly();
sal_Int16 nMiddleMouseButton = officecfg::Office::Common::View::Dialog::MiddleMouseButton::get();

View File

@ -104,10 +104,6 @@ private:
std::unique_ptr<weld::Label> m_xNotebookbarIconSizeLabel;
std::unique_ptr<weld::ComboBox> m_xNotebookbarIconSizeLB;
std::unique_ptr<weld::Widget> m_xNotebookbarIconSizeImg;
std::unique_ptr<weld::Widget> m_xDarkModeFrame;
std::unique_ptr<weld::Label> m_xAppearanceStyleLabel;
std::unique_ptr<weld::ComboBox> m_xAppearanceStyleLB;
std::unique_ptr<weld::Widget> m_xAppearanceStyleImg;
std::unique_ptr<weld::Label> m_xIconStyleLabel;
std::unique_ptr<weld::ComboBox> m_xIconStyleLB;
std::unique_ptr<weld::Widget> m_xIconStyleImg;

View File

@ -1,199 +0,0 @@
/* -*- 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 <config_folders.h>
#include "personalization.hxx"
#include <dialmgr.hxx>
#include <comphelper/processfactory.hxx>
#include <officecfg/Office/Common.hxx>
#include <rtl/bootstrap.hxx>
#include <tools/urlobj.hxx>
#include <tools/stream.hxx>
#include <vcl/event.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <vcl/graphicfilter.hxx>
#include <vcl/virdev.hxx>
#include <personas.hrc>
using namespace com::sun::star;
using namespace ::com::sun::star::beans;
// persona
SvxPersonalizationTabPage::SvxPersonalizationTabPage(weld::Container* pPage,
weld::DialogController* pController,
const SfxItemSet& rSet)
: SfxTabPage(pPage, pController, u"cui/ui/personalization_tab.ui"_ustr,
u"PersonalizationTabPage"_ustr, &rSet)
, m_xNoPersona(m_xBuilder->weld_radio_button(u"no_persona"_ustr))
, m_xPersonaImg(m_xBuilder->weld_widget(u"lockpersona"_ustr))
, m_xDefaultPersona(m_xBuilder->weld_radio_button(u"default_persona"_ustr))
, m_xContentGrid(m_xBuilder->weld_container(u"gridpersonasetting"_ustr))
{
for (sal_uInt32 i = 0; i < MAX_DEFAULT_PERSONAS; ++i)
{
OUString sDefaultId("default" + OUString::number(i));
m_vDefaultPersonaImages[i] = m_xBuilder->weld_toggle_button(sDefaultId);
m_vDefaultPersonaImages[i]->connect_clicked(
LINK(this, SvxPersonalizationTabPage, DefaultPersona));
}
LoadDefaultImages();
}
SvxPersonalizationTabPage::~SvxPersonalizationTabPage() {}
std::unique_ptr<SfxTabPage> SvxPersonalizationTabPage::Create(weld::Container* pPage,
weld::DialogController* pController,
const SfxItemSet* rSet)
{
return std::make_unique<SvxPersonalizationTabPage>(pPage, pController, *rSet);
}
OUString SvxPersonalizationTabPage::GetAllStrings()
{
OUString sAllStrings;
OUString radioButton[] = { u"no_persona"_ustr, u"default_persona"_ustr };
for (const auto& radio : radioButton)
{
if (const auto pString = m_xBuilder->weld_radio_button(radio))
sAllStrings += pString->get_label() + " ";
}
if (const auto pString = m_xBuilder->weld_label(u"personas_label"_ustr))
sAllStrings += pString->get_label() + " ";
return sAllStrings.replaceAll("_", "");
}
bool SvxPersonalizationTabPage::FillItemSet(SfxItemSet*)
{
// persona
OUString aPersona(u"default"_ustr);
if (m_xNoPersona->get_active())
aPersona = "no";
bool bModified = false;
if (aPersona != officecfg::Office::Common::Misc::Persona::get()
|| m_aPersonaSettings != officecfg::Office::Common::Misc::PersonaSettings::get())
{
bModified = true;
}
// write
std::shared_ptr<comphelper::ConfigurationChanges> batch(
comphelper::ConfigurationChanges::create());
if (aPersona == "no")
m_aPersonaSettings.clear();
officecfg::Office::Common::Misc::Persona::set(aPersona, batch);
officecfg::Office::Common::Misc::PersonaSettings::set(m_aPersonaSettings, batch);
batch->commit();
if (bModified)
{
// broadcast the change
DataChangedEvent aDataChanged(DataChangedEventType::SETTINGS, nullptr,
AllSettingsFlags::STYLE);
Application::NotifyAllWindows(aDataChanged);
}
return bModified;
}
void SvxPersonalizationTabPage::Reset(const SfxItemSet*)
{
// persona
OUString aPersona = officecfg::Office::Common::Misc::Persona::get();
m_aPersonaSettings = officecfg::Office::Common::Misc::PersonaSettings::get();
if (aPersona == "no")
m_xNoPersona->set_active(true);
else
m_xDefaultPersona->set_active(true);
if (officecfg::Office::Common::Misc::Persona::isReadOnly())
{
m_xNoPersona->set_sensitive(false);
m_xDefaultPersona->set_sensitive(false);
m_xPersonaImg->set_visible(true);
}
if (officecfg::Office::Common::Misc::PersonaSettings::isReadOnly())
m_xContentGrid->set_sensitive(false);
}
void SvxPersonalizationTabPage::LoadDefaultImages()
{
// Load the pre saved personas
OUString gallery = u"$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/gallery/personas/"_ustr;
rtl::Bootstrap::expandMacros(gallery);
OUString aPersonasList = gallery + "personas_list.txt";
SvFileStream aStream(aPersonasList, StreamMode::READ);
GraphicFilter aFilter;
Graphic aGraphic;
sal_Int32 nIndex = 0;
bool foundOne = false;
OStringBuffer aLine;
int nLineNumberFilePersona = 0;
while (aStream.IsOpen() && !aStream.eof() && nIndex < MAX_DEFAULT_PERSONAS)
{
OUString aPersonaSetting, aPreviewFile, aName;
sal_Int32 nParseIndex = 0;
aStream.ReadLine(aLine);
aPersonaSetting = OStringToOUString(aLine, RTL_TEXTENCODING_UTF8);
aName = CuiResId(RID_PERSONAS_COLOR[nLineNumberFilePersona].first);
aPreviewFile = aPersonaSetting.getToken(2, ';', nParseIndex);
if (aPreviewFile.isEmpty())
break;
m_vDefaultPersonaSettings.push_back(aPersonaSetting);
INetURLObject aURLObj(rtl::Concat2View(gallery + aPreviewFile));
aFilter.ImportGraphic(aGraphic, aURLObj);
Size aSize(aGraphic.GetSizePixel());
aSize.setWidth(aSize.Width() / 4);
aSize.setHeight(aSize.Height() / 1.5);
ScopedVclPtr<VirtualDevice> xVirDev
= m_vDefaultPersonaImages[nIndex]->create_virtual_device();
xVirDev->SetOutputSizePixel(aSize);
aGraphic.Draw(*xVirDev, Point(0, 0));
m_vDefaultPersonaImages[nIndex]->set_image(xVirDev.get());
xVirDev.disposeAndClear();
m_vDefaultPersonaImages[nIndex]->set_tooltip_text(aName);
m_vDefaultPersonaImages[nIndex++]->show();
foundOne = true;
++nLineNumberFilePersona;
}
m_xDefaultPersona->set_sensitive(foundOne);
}
IMPL_LINK(SvxPersonalizationTabPage, DefaultPersona, weld::Button&, rButton, void)
{
m_xDefaultPersona->set_active(true);
for (sal_Int32 nIndex = 0; nIndex < MAX_DEFAULT_PERSONAS; ++nIndex)
{
if (&rButton == m_vDefaultPersonaImages[nIndex].get())
m_aPersonaSettings = m_vDefaultPersonaSettings[nIndex];
else
m_vDefaultPersonaImages[nIndex]->set_active(false);
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -1,66 +0,0 @@
/* -*- 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/.
*/
#pragma once
#include <sfx2/tabdlg.hxx>
#include <vector>
#define MAX_DEFAULT_PERSONAS 6 // Maximum number of default personas
class SvxPersonalizationTabPage : public SfxTabPage
{
private:
std::unique_ptr<weld::RadioButton> m_xNoPersona; ///< Just the default look, without any bitmap
std::unique_ptr<weld::Widget> m_xPersonaImg;
std::unique_ptr<weld::RadioButton> m_xDefaultPersona; ///< Use the built-in bitmap
std::unique_ptr<weld::Container> m_xContentGrid;
std::unique_ptr<weld::ToggleButton> m_vDefaultPersonaImages
[MAX_DEFAULT_PERSONAS]; ///< Buttons to show the default persona images
OUString m_aPersonaSettings; ///< Header and footer images + color to be set in the settings.
std::vector<OUString> m_vDefaultPersonaSettings;
public:
SvxPersonalizationTabPage(weld::Container* pPage, weld::DialogController* pController,
const SfxItemSet& rSet);
virtual ~SvxPersonalizationTabPage() override;
static std::unique_ptr<SfxTabPage>
Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet);
virtual OUString GetAllStrings() override;
/// Apply the settings ([OK] button).
virtual bool FillItemSet(SfxItemSet* rSet) override;
/// Reset to default settings ([Revert] button).
virtual void Reset(const SfxItemSet* rSet) override;
/*
* Loads the default personas from the shared personas directory
* which resides in the shared gallery.
* There needs to be a separate subdirectory for each default persona,
* which includes the preview, header, and footer images.
* And there needs to be a personas_list.txt file in the personas directory
* which keeps the index/info of the default personas, one persona per line.
* A line should look like this:
* persona_slug;Persona Name;subdir/preview.jpg;subdir/header.jpg;subdir/footer.jpg;#textcolor
* (It is recommended to keep the subdir name the same as the slug)
* Example line:
* abstract;Abstract;abstract/preview.jpg;abstract/Header2.jpg;abstract/Footer2.jpg;#ffffff
*/
void LoadDefaultImages();
private:
/// Handle the default Persona selection
DECL_LINK(DefaultPersona, weld::Button&, void);
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -45,7 +45,6 @@
#include "optaccessibility.hxx"
#include <optasian.hxx>
#include "optchart.hxx"
#include "optcolor.hxx"
#include "optctl.hxx"
#include "optfltr.hxx"
#include "optgdlg.hxx"
@ -60,7 +59,6 @@
#include <optpath.hxx>
#include "optsave.hxx"
#include "optupdt.hxx"
#include "personalization.hxx"
#include <treeopt.hxx>
#include "optbasic.hxx"
#include "optlanguagetool.hxx"
@ -261,10 +259,6 @@ static std::unique_ptr<SfxTabPage> CreateGeneralTabPage(sal_uInt16 nId, weld::Co
case RID_SVXPAGE_INET_PROXY: fnCreate = &SvxProxyTabPage::Create; break;
case RID_SVXPAGE_INET_SECURITY: fnCreate = &SvxSecurityTabPage::Create; break;
case RID_SVXPAGE_INET_MAIL: fnCreate = &SvxEMailTabPage::Create; break;
#if HAVE_FEATURE_DESKTOP
case RID_SVXPAGE_PERSONALIZATION: fnCreate = &SvxPersonalizationTabPage::Create; break;
#endif
case RID_SVXPAGE_COLORCONFIG: fnCreate = &SvxColorOptionsTabPage::Create; break;
case RID_OFAPAGE_HTMLOPT: fnCreate = &OfaHtmlTabPage::Create; break;
case SID_OPTFILTER_MSOFFICE: fnCreate = &OfaMSFilterTabPage::Create; break;
case RID_OFAPAGE_MSFILTEROPT2: fnCreate = &OfaMSFilterTabPage2::Create; break;
@ -311,8 +305,6 @@ constexpr OptionsMapping_Impl OptionsMap_Impl[]
{ u"ProductName"_ustr, u"Paths"_ustr, RID_SFXPAGE_PATH },
{ u"ProductName"_ustr, u"Fonts"_ustr, RID_SVX_FONT_SUBSTITUTION },
{ u"ProductName"_ustr, u"Security"_ustr, RID_SVXPAGE_INET_SECURITY },
{ u"ProductName"_ustr, u"Personalization"_ustr, RID_SVXPAGE_PERSONALIZATION },
{ u"ProductName"_ustr, u"Appearance"_ustr, RID_SVXPAGE_COLORCONFIG },
{ u"ProductName"_ustr, u"Accessibility"_ustr, RID_SVXPAGE_ACCESSIBILITYCONFIG },
{ u"ProductName"_ustr, u"Java"_ustr, RID_SVXPAGE_OPTIONS_JAVA },
{ u"ProductName"_ustr, u"BasicIDEOptions"_ustr, RID_SVXPAGE_BASICIDE_OPTIONS },

View File

@ -53,8 +53,6 @@ static PageIdToFileNameMap_Impl FileMap_Impl[] = {
{ RID_SVXPAGE_INET_SECURITY, u""_ustr }, // Security
{ RID_SVXPAGE_PERSONALIZATION, u""_ustr }, // Personalization
{ RID_SVXPAGE_COLORCONFIG, u""_ustr }, // ApplicationColors
{ RID_SVXPAGE_ACCESSIBILITYCONFIG, u""_ustr }, // Accessibility
{ RID_SVXPAGE_OPTIONS_JAVA, u""_ustr }, // Java
{ RID_SVXPAGE_BASICIDE_OPTIONS, u""_ustr }, // BasicIDEOptions

File diff suppressed because it is too large Load Diff

View File

@ -1,298 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface domain="cui">
<requires lib="gtk+" version="3.20"/>
<object class="GtkBox" id="OptAppearancePage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="border-width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="label-xalign">0</property>
<property name="shadow-type">none</property>
<child>
<!-- n-columns=1 n-rows=3 -->
<object class="GtkGrid" id="table">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-top">6</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkScrolledWindow" id="scroll">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="hscrollbar-policy">never</property>
<property name="vscrollbar-policy">always</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
<!-- n-columns=1 n-rows=1 -->
<object class="GtkGrid" id="colorconfig">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
<child internal-child="accessible">
<object class="AtkObject" id="colorconfig-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|colorconfig">Select the colors for the user interface elements.</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<!-- n-columns=3 n-rows=1 -->
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">6</property>
<property name="hexpand">True</property>
<property name="column-spacing">6</property>
<child>
<object class="GtkLabel" id="uielements">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="no-show-all">True</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes" context="optappearancepage|uielements">User interface elements</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="colorsetting">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="no-show-all">True</property>
<property name="label" translatable="yes" context="optappearancepage|colorsetting">Color setting</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="on">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="no-show-all">True</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<!-- n-columns=8 n-rows=1 -->
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-top">6</property>
<property name="hexpand">True</property>
<property name="column-spacing">6</property>
<child>
<object class="GtkButton" id="save">
<property name="label" translatable="yes" context="optappearancepage|save">_Save</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="use-underline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="save-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|save">Saves the current settings as a color scheme that you can reload later.</property>
</object>
</child>
</object>
<packing>
<property name="left-attach">3</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="delete">
<property name="label" translatable="yes" context="stock">_Delete</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="use-underline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="delete-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|delete">Deletes the color scheme shown in the Scheme box. You cannot delete the Default scheme.</property>
</object>
</child>
</object>
<packing>
<property name="left-attach">4</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="colorschemelb">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="colorschemelb-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|colorschemelb">Selects the color scheme you want to use.</property>
</object>
</child>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="autocolor">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="label" translatable="yes" context="optappearancepage|autocolor">_Automatic:</property>
<property name="use-underline">True</property>
<property name="mnemonic-widget">autocolorlb</property>
</object>
<packing>
<property name="left-attach">6</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="autocolorlb">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="active">1</property>
<items>
<item id="0" translatable="yes" context="optappearancepage|cbSchemeEntry1">System Theme</item>
<item id="1" translatable="yes" context="optappearancepage|cbSchemeEntry2">Light</item>
<item id="2" translatable="yes" context="optappearancepage|cbSchemeEntry3">Dark</item>
</items>
</object>
<packing>
<property name="left-attach">7</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkImage" id="lockautocolorlb">
<property name="can-focus">False</property>
<property name="no-show-all">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="icon-name">res/lock.png</property>
</object>
<packing>
<property name="left-attach">5</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes" context="optappearancepage|label3">_Scheme:</property>
<property name="use-underline">True</property>
<property name="mnemonic-widget">colorschemelb</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkImage" id="lockcolorschemelb">
<property name="can-focus">False</property>
<property name="no-show-all">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="icon-name">res/lock.png</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes" context="optappearancepage|label2">Custom Colors</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child internal-child="accessible">
<object class="AtkObject" id="OptAppearancePage-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|OptAppearancePage">Sets the colors for the user interface.</property>
</object>
</child>
</object>
</interface>

View File

@ -23,7 +23,7 @@
<property name="border-width">6</property>
<property name="column-spacing">24</property>
<child>
<!-- n-columns=1 n-rows=4 -->
<!-- n-columns=1 n-rows=3 -->
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can-focus">False</property>
@ -108,7 +108,7 @@
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
@ -288,7 +288,7 @@
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
@ -382,89 +382,6 @@
</object>
</child>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="darkmode">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="label-xalign">0</property>
<property name="shadow-type">none</property>
<child>
<!-- n-columns=3 n-rows=1 -->
<object class="GtkGrid" id="refgrid2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-top">6</property>
<property name="hexpand">True</property>
<property name="column-spacing">6</property>
<child>
<object class="GtkComboBoxText" id="appearance">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="active">0</property>
<items>
<item translatable="yes" context="optviewpage|appearance">System</item>
<item translatable="yes" context="optviewpage|appearance">Light</item>
<item translatable="yes" context="optviewpage|appearance">Dark</item>
</items>
<child internal-child="accessible">
<object class="AtkObject" id="appearance-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip | appearance">Specifies whether to follow the system appearance mode or override Dark or Light.</property>
</object>
</child>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes" context="optviewpage|label7">Mode:</property>
<property name="use-underline">True</property>
<property name="mnemonic-widget">appearance</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkImage" id="lockappearance">
<property name="can-focus">False</property>
<property name="no-show-all">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="icon-name">res/lock.png</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label16">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes" context="optviewpage|label16">Appearance</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
@ -878,24 +795,4 @@
</packing>
</child>
</object>
<object class="GtkSizeGroup" id="sizegroupLabel">
<widgets>
<widget name="label12"/>
<widget name="label8"/>
<widget name="label9"/>
<widget name="label14"/>
<widget name="label6"/>
<widget name="label7"/>
</widgets>
</object>
<object class="GtkSizeGroup" id="sizegroupWidget">
<widgets>
<widget name="mousemiddle"/>
<widget name="notebookbariconsize"/>
<widget name="sidebariconsize"/>
<widget name="iconsize"/>
<widget name="iconstyle"/>
<widget name="appearance"/>
</widgets>
</object>
</interface>

View File

@ -1,237 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface domain="cui">
<requires lib="gtk+" version="3.20"/>
<object class="GtkBox" id="PersonalizationTabPage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="border-width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label-xalign">0</property>
<property name="shadow-type">none</property>
<child>
<object class="GtkBox" id="vbox2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-end">6</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<!-- n-columns=2 n-rows=1 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<child>
<!-- n-columns=1 n-rows=2 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="row-spacing">12</property>
<child>
<object class="GtkRadioButton" id="no_persona">
<property name="label" translatable="yes" context="personalization_tab|no_persona">Default look, do not use Themes</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="use-underline">True</property>
<property name="active">True</property>
<property name="draw-indicator">True</property>
<property name="group">default_persona</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="default_persona">
<property name="label" translatable="yes" context="personalization_tab|default_persona">Preinstalled Theme</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="use-underline">True</property>
<property name="active">True</property>
<property name="draw-indicator">True</property>
<property name="group">no_persona</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkImage" id="lockpersona">
<property name="can-focus">False</property>
<property name="no-show-all">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="icon-name">res/lock.png</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="gridpersonasetting">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">center</property>
<property name="margin-start">24</property>
<property name="margin-end">6</property>
<property name="row-spacing">6</property>
<property name="column-spacing">6</property>
<child>
<object class="GtkToggleButton" id="default1">
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="default0">
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="default2">
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="default3">
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="default4">
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="default5">
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="default6">
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="default7">
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="default8">
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="personas_label">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes" context="personalization_tab|personas_label">LibreOffice Themes</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</interface>

View File

@ -53,8 +53,6 @@
#define RID_SVXPAGE_ACCESSIBILITYCONFIG (RID_SVX_START + 250)
#define RID_SVXPAGE_ASIAN_LAYOUT (RID_SVX_START + 246)
#define RID_OPTPAGE_CHART_DEFCOLORS (RID_SVX_START + 299)
#define RID_SVXPAGE_PERSONALIZATION (RID_SVX_START + 247)
#define RID_SVXPAGE_COLORCONFIG (RID_SVX_START + 249)
#define RID_SVXPAGE_BASICIDE_OPTIONS (RID_SVX_START + 209)
#define RID_SVXPAGE_LANGTOOL_OPTIONS (RID_SVX_START + 210)
#define RID_SVXPAGE_DEEPL_OPTIONS (RID_SVX_START + 211)

View File

@ -68,7 +68,6 @@ private:
void UpdateBackground();
void UpdateDefaultSettings();
void UpdatePersonaSettings();
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -607,12 +607,6 @@ public:
const DialogStyle& GetDialogStyle() const;
BitmapEx const & GetPersonaHeader() const;
SAL_DLLPRIVATE BitmapEx const & GetPersonaFooter() const;
const std::optional<Color>& GetPersonaMenuBarTextColor() const;
// global switch to allow EdgeBlenging; currently possible for ValueSet and ListBox
// when activated there using Get/SetEdgeBlending; default is true
void SetEdgeBlending(sal_uInt16 nCount);

View File

@ -5529,40 +5529,6 @@
</info>
<value>auto</value>
</prop>
<prop oor:name="Persona" oor:type="xs:string" oor:nillable="false">
<!-- UIHints: Tools Options General Personalization -->
<info>
<desc>Specifies whether we should use a Firefox Persona, ie. a
picture under the menu, toolbar, and status bar.</desc>
</info>
<constraints>
<enumeration oor:value="no">
<info>
<desc>No - the user wants just the themed look, no Persona.</desc>
</info>
</enumeration>
<enumeration oor:value="default">
<info>
<desc>Default - the LibreOffice default Persona.</desc>
</info>
</enumeration>
<enumeration oor:value="own">
<info>
<desc>The user installed an own Persona, and wants to use that.</desc>
</info>
</enumeration>
</constraints>
<value>default</value>
</prop>
<prop oor:name="PersonaSettings" oor:type="xs:string" oor:nillable="false">
<!-- UIHints: Tools Options General Personalization -->
<info>
<desc>Names of the header and footer images, and colors for text and
accent. When set, the value has form
"header.jpg;footer.jpg;#RGBTXT;#RGBACC".</desc>
</info>
<value/>
</prop>
<prop oor:name="FormControlPilotsEnabled" oor:type="xs:boolean" oor:nillable="false">
<info>
<desc>Enables/Disables the usage of AutoPilots for form

View File

@ -18,7 +18,7 @@ class tdf116996(UITestCase):
xPages = xDialogOpt.getChild("pages")
xLOEntry = xPages.getChild('0') # Libreoffice
xLOEntry.executeAction("EXPAND", tuple())
xAdvancedEntry = xLOEntry.getChild('10')
xAdvancedEntry = xLOEntry.getChild('8')
xAdvancedEntry.executeAction("SELECT", tuple()) #Libreoffice / Advanced
xexperimental = xDialogOpt.getChild("experimental")
if get_state_as_dict(xexperimental)['Selected'] != enabled:

View File

@ -94,9 +94,6 @@ cui/uiconfig/ui/numberingformatpage.ui://GtkLabel[@id='commentft'] orphan-label
cui/uiconfig/ui/numberingoptionspage.ui://GtkLabel[@id='separator'] orphan-label
cui/uiconfig/ui/optadvancedpage.ui://GtkLabel[@id='selectruntime'] orphan-label
cui/uiconfig/ui/optadvancedpage.ui://GtkLabel[@id='javapath'] orphan-label
cui/uiconfig/ui/optappearancepage.ui://GtkLabel[@id='uielements'] orphan-label
cui/uiconfig/ui/optappearancepage.ui://GtkLabel[@id='colorsetting'] orphan-label
cui/uiconfig/ui/optappearancepage.ui://GtkLabel[@id='on'] orphan-label
cui/uiconfig/ui/optasianpage.ui://GtkLabel[@id='hintft'] orphan-label
cui/uiconfig/ui/optctlpage.ui://GtkLabel[@id='label3'] orphan-label
cui/uiconfig/ui/optemailpage.ui://GtkImage[@id='lockemail'] no-labelled-by
@ -148,15 +145,6 @@ cui/uiconfig/ui/paratabspage.ui://GtkSpinButton[@id='SP_TABPOS'] no-labelled-by
cui/uiconfig/ui/paratabspage.ui://GtkEntry[@id='ED_TABPOS'] no-labelled-by
cui/uiconfig/ui/patterntabpage.ui://GtkLabel[@id='label4'] orphan-label
cui/uiconfig/ui/percentdialog.ui://GtkSpinButton[@id='margin'] no-labelled-by
cui/uiconfig/ui/personalization_tab.ui://GtkToggleButton[@id='default0'] button-no-label
cui/uiconfig/ui/personalization_tab.ui://GtkToggleButton[@id='default1'] button-no-label
cui/uiconfig/ui/personalization_tab.ui://GtkToggleButton[@id='default2'] button-no-label
cui/uiconfig/ui/personalization_tab.ui://GtkToggleButton[@id='default3'] button-no-label
cui/uiconfig/ui/personalization_tab.ui://GtkToggleButton[@id='default4'] button-no-label
cui/uiconfig/ui/personalization_tab.ui://GtkToggleButton[@id='default5'] button-no-label
cui/uiconfig/ui/personalization_tab.ui://GtkToggleButton[@id='default6'] button-no-label
cui/uiconfig/ui/personalization_tab.ui://GtkToggleButton[@id='default7'] button-no-label
cui/uiconfig/ui/personalization_tab.ui://GtkToggleButton[@id='default8'] button-no-label
cui/uiconfig/ui/pickgraphicpage.ui://GtkLabel[@id='errorft'] orphan-label
cui/uiconfig/ui/positionpage.ui://GtkLabel[@id='rotateandscale'] orphan-label
cui/uiconfig/ui/positionpage.ui://GtkLabel[@id='scale'] orphan-label

View File

@ -70,7 +70,6 @@ gb_emscripten_fs_image_files := \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/cui/ui/certdialog.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/cui/ui/chapterfragment.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/cui/ui/charnamepage.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/cui/ui/colorconfigwin.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/cui/ui/colorfragment.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/cui/ui/colorpage.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/cui/ui/colorpickerdialog.ui \
@ -152,7 +151,6 @@ gb_emscripten_fs_image_files := \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/cui/ui/objecttitledescdialog.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/cui/ui/optaccessibilitypage.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/cui/ui/optadvancedpage.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/cui/ui/optappearancepage.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/cui/ui/optasianpage.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/cui/ui/optbasicidepage.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/cui/ui/optchartcolorspage.ui \
@ -183,7 +181,6 @@ gb_emscripten_fs_image_files := \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/cui/ui/pastespecial.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/cui/ui/patterntabpage.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/cui/ui/percentdialog.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/cui/ui/personalization_tab.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/cui/ui/pickbulletpage.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/cui/ui/pickgraphicpage.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/cui/ui/picknumberingpage.ui \

View File

@ -21,7 +21,7 @@ class tdf131581(UITestCase):
xPages = xDialogOpt.getChild("pages")
xLOEntry = xPages.getChild('0')
xLOEntry.executeAction("EXPAND", tuple())
xAdvancedEntry = xLOEntry.getChild('10')
xAdvancedEntry = xLOEntry.getChild('8')
xAdvancedEntry.executeAction("SELECT", tuple())
xExpertBtn = xDialogOpt.getChild("expertconfig")

View File

@ -1,44 +0,0 @@
# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-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/.
#
from uitest.framework import UITestCase
from uitest.uihelper.common import get_state_as_dict
#Bug 78133 - LibO crashes when in options dialog
#when i was going through the options dialog, if i click on the 'Colors' entry, LibO will crash.
class tdf78133(UITestCase):
def test_tdf78133_options_app_colors(self):
with self.ui_test.create_doc_in_start_center("writer"):
#New text document
#open option, go to App colors
with self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") as xDialog:
xPages = xDialog.getChild("pages")
xLOEntry = xPages.getChild('0') # Lo Dev
xLOEntry.executeAction("EXPAND", tuple())
xLoAppColorsEntry = xLOEntry.getChild('8')
xLoAppColorsEntry.executeAction("SELECT", tuple()) #Applications Colors
#change text boundaries checkbox, save
shadows = xDialog.getChild("shadows")
shadows.executeAction("CLICK", tuple())
#verify - reopen dialog and check if "text boundaries" is still unchecked
with self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") as xDialog:
xPages = xDialog.getChild("pages")
xLOEntry = xPages.getChild('0') # Lo Dev
xLOEntry.executeAction("EXPAND", tuple())
xLoAppColorsEntry = xLOEntry.getChild('8')
xLoAppColorsEntry.executeAction("SELECT", tuple()) #Applications Colors
#change text boundaries checkbox, save
shadows = xDialog.getChild("shadows")
self.assertEqual(get_state_as_dict(shadows)["Selected"], "false")
# vim: set shiftwidth=4 softtabstop=4 expandtab:

View File

@ -92,8 +92,6 @@ public:
virtual tools::Rectangle GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame* i_pReferenceFrame );
virtual int GetMenuBarHeight() const;
virtual void ApplyPersona();
};
#endif // INCLUDED_VCL_INC_SALMENU_HXX

View File

@ -43,13 +43,9 @@ private:
/// Even setting null icon on a menuitem can be expensive, so cache state to avoid that call
bool mbHasNullItemIcon = true;
GtkWidget* mpMenuBarContainerWidget;
std::unique_ptr<utl::TempFileNamed> mxPersonaImage;
BitmapEx maPersonaBitmap;
GtkWidget* mpMenuAllowShrinkWidget;
GtkWidget* mpMenuBarWidget;
GtkWidget* mpMenuWidget;
GtkCssProvider* mpMenuBarContainerProvider;
GtkCssProvider* mpMenuBarProvider;
GtkWidget* mpCloseButton;
VclPtr<Menu> mpVCLMenu;
GtkSalMenu* mpParentSalMenu;
@ -138,7 +134,6 @@ public:
virtual bool CanGetFocus() const override;
virtual bool TakeFocus() override;
virtual int GetMenuBarHeight() const override;
virtual void ApplyPersona() override;
};
class GtkSalMenuItem final : public SalMenuItem

View File

@ -1165,7 +1165,7 @@ void QtFrame::UpdateSettings(AllSettings& rSettings)
Color aMenuBack = toColor(qMenuCG.color(QPalette::Window));
style.SetMenuTextColor(aMenuFore);
style.SetMenuBarTextColor(style.GetPersonaMenuBarTextColor().value_or(aMenuFore));
style.SetMenuBarTextColor(aMenuFore);
style.SetMenuColor(aMenuBack);
style.SetMenuBarColor(aMenuBack);
style.SetMenuHighlightColor(toColor(qMenuCG.color(QPalette::Highlight)));

View File

@ -234,8 +234,6 @@ tools::Rectangle SalMenu::GetMenuBarButtonRectPixel(sal_uInt16, SalFrame*)
int SalMenu::GetMenuBarHeight() const { return 0; }
void SalMenu::ApplyPersona() {}
SalMenuItem::~SalMenuItem() {}
class SalFlashAttention

View File

@ -251,12 +251,6 @@ struct ImplStyleData
// on-demand calculated in GetListBoxPreviewDefaultPixelSize()
Size mutable maListBoxPreviewDefaultPixelSize;
OUString mutable maPersonaHeaderFooter; ///< Cache the settings to detect changes.
BitmapEx mutable maPersonaHeaderBitmap; ///< Cache the header bitmap.
BitmapEx mutable maPersonaFooterBitmap; ///< Cache the footer bitmap.
std::optional<Color> mutable maPersonaMenuBarTextColor; ///< Cache the menubar color.
bool operator==(const ImplStyleData& rSet) const;
};
@ -2124,120 +2118,6 @@ bool StyleSettings::GetUseImagesInMenus() const
}
}
static BitmapEx readBitmapEx( const OUString& rPath )
{
OUString aPath( rPath );
rtl::Bootstrap::expandMacros( aPath );
// import the image
Graphic aGraphic;
if ( GraphicFilter::LoadGraphic( aPath, OUString(), aGraphic ) != ERRCODE_NONE )
return BitmapEx();
return aGraphic.GetBitmapEx();
}
namespace {
enum WhichPersona { PERSONA_HEADER, PERSONA_FOOTER };
}
/** Update the setting of the Persona header / footer in ImplStyleData */
static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFooter, BitmapEx& rHeaderFooterBitmap, std::optional<Color>& rMenuBarTextColor )
{
// don't burn time loading images we don't need.
if ( Application::IsHeadlessModeEnabled() )
return;
// read from the configuration
OUString aPersona( officecfg::Office::Common::Misc::Persona::get() );
OUString aPersonaSettings( officecfg::Office::Common::Misc::PersonaSettings::get() );
// have the settings changed? marks if header /footer prepared before
//should maybe extended to a flag that marks if header /footer /both are loaded
OUString aOldValue= eWhich==PERSONA_HEADER?OUString(aPersona + ";" + aPersonaSettings+";h" ):OUString(aPersona + ";" + aPersonaSettings+";f" );
if ( rHeaderFooter == aOldValue )
return;
rHeaderFooter = aOldValue;
rHeaderFooterBitmap = BitmapEx();
rMenuBarTextColor.reset();
// now read the new values and setup bitmaps
OUString aHeader, aFooter;
if ( aPersona == "own" || aPersona == "default" )
{
sal_Int32 nIndex = 0;
// Skip the persona slug, name, and preview
aHeader = aPersonaSettings.getToken( 3, ';', nIndex );
if ( nIndex > 0 )
aFooter = aPersonaSettings.getToken( 0, ';', nIndex );
// change menu text color, advance nIndex to skip the '#'
if ( nIndex > 0 )
{
OUString aColor = aPersonaSettings.getToken( 0, ';', ++nIndex );
rMenuBarTextColor = Color( ColorTransparency, aColor.toUInt32( 16 ) );
}
}
OUString aName;
switch ( eWhich ) {
case PERSONA_HEADER: aName = aHeader; break;
case PERSONA_FOOTER: aName = aFooter; break;
}
if ( !aName.isEmpty() )
{
OUString gallery(u""_ustr);
// try the gallery first, then the program path:
if ( aPersona == "own" && !aPersonaSettings.startsWith( "vnd.sun.star.expand" ) )
{
gallery = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}";
rtl::Bootstrap::expandMacros( gallery );
gallery += "/user/gallery/personas/";
}
else if ( aPersona == "default" )
{
gallery = "$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/gallery/personas/";
}
rHeaderFooterBitmap = readBitmapEx( gallery + aName );
if ( rHeaderFooterBitmap.IsEmpty() )
rHeaderFooterBitmap = readBitmapEx( "$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" + aName );
}
// Something went wrong. Probably, the images are missing. Clear the persona properties in the registry.
if( rHeaderFooterBitmap.IsEmpty() )
{
std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
officecfg::Office::Common::Misc::Persona::set( u"no"_ustr, batch );
officecfg::Office::Common::Misc::PersonaSettings::set( u""_ustr, batch );
batch->commit();
}
}
BitmapEx const & StyleSettings::GetPersonaHeader() const
{
setupPersonaHeaderFooter( PERSONA_HEADER, mxData->maPersonaHeaderFooter, mxData->maPersonaHeaderBitmap, mxData->maPersonaMenuBarTextColor );
return mxData->maPersonaHeaderBitmap;
}
BitmapEx const & StyleSettings::GetPersonaFooter() const
{
setupPersonaHeaderFooter( PERSONA_FOOTER, mxData->maPersonaHeaderFooter, mxData->maPersonaFooterBitmap, mxData->maPersonaMenuBarTextColor );
return mxData->maPersonaFooterBitmap;
}
const std::optional<Color>& StyleSettings::GetPersonaMenuBarTextColor() const
{
GetPersonaHeader();
return mxData->maPersonaMenuBarTextColor;
}
void StyleSettings::SetStandardStyles()
{
mxData->SetStandardStyles();

View File

@ -19,13 +19,7 @@ NotebookbarPopup::NotebookbarPopup(const VclPtr<VclHBox>& pParent)
{
m_pBox = m_pUIBuilder->get<VclHBox>(u"box");
m_pBox->SetSizePixel(Size(100, 75));
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
const BitmapEx& aPersona = rStyleSettings.GetPersonaHeader();
if (!aPersona.IsEmpty())
m_pBox->SetBackground(Wallpaper(aPersona));
else
m_pBox->SetBackground(rStyleSettings.GetDialogColor());
m_pBox->SetBackground(GetSettings().GetStyleSettings().GetDialogColor());
}
NotebookbarPopup::~NotebookbarPopup() { disposeOnce(); }
@ -121,13 +115,7 @@ void NotebookbarPopup::dispose()
void NotebookbarPopup::ApplyBackground(vcl::Window* pWindow)
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
const BitmapEx& aPersona = rStyleSettings.GetPersonaHeader();
if (!aPersona.IsEmpty())
pWindow->SetBackground(Wallpaper(aPersona));
else
pWindow->SetBackground(rStyleSettings.GetDialogColor());
pWindow->SetBackground(GetSettings().GetStyleSettings().GetDialogColor());
sal_Int32 nNext = 0;
VclPtr<vcl::Window> pChild = pWindow->GetChild(nNext);

View File

@ -315,21 +315,9 @@ void NotebookBar::StateChanged(const StateChangedType nStateChange )
void NotebookBar::UpdateBackground()
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
const BitmapEx& aPersona = rStyleSettings.GetPersonaHeader();
Wallpaper aWallpaper(aPersona);
aWallpaper.SetStyle(WallpaperStyle::TopRight);
if (!aPersona.IsEmpty())
{
SetBackground(aWallpaper);
UpdatePersonaSettings();
GetOutDev()->SetSettings( PersonaSettings );
}
else
{
SetBackground(rStyleSettings.GetDialogColor());
UpdateDefaultSettings();
GetOutDev()->SetSettings( DefaultSettings );
}
SetBackground(rStyleSettings.GetDialogColor());
UpdateDefaultSettings();
GetOutDev()->SetSettings( DefaultSettings );
Invalidate(tools::Rectangle(Point(0,0), GetSizePixel()));
}
@ -353,23 +341,4 @@ void NotebookBar::UpdateDefaultSettings()
DefaultSettings = std::move(aAllSettings);
}
void NotebookBar::UpdatePersonaSettings()
{
AllSettings aAllSettings( GetSettings() );
StyleSettings aStyleSet( aAllSettings.GetStyleSettings() );
::Color aTextColor = aStyleSet.GetPersonaMenuBarTextColor().value_or(COL_BLACK );
aStyleSet.SetDialogTextColor( aTextColor );
aStyleSet.SetButtonTextColor( aTextColor );
aStyleSet.SetRadioCheckTextColor( aTextColor );
aStyleSet.SetGroupTextColor( aTextColor );
aStyleSet.SetLabelTextColor( aTextColor );
aStyleSet.SetWindowTextColor( aTextColor );
aStyleSet.SetTabTextColor(aTextColor);
aStyleSet.SetToolTextColor(aTextColor);
aAllSettings.SetStyleSettings(aStyleSet);
PersonaSettings = std::move(aAllSettings);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -1721,21 +1721,6 @@ void ImplBorderWindow::Resize()
if (mpNotebookBar)
{
tools::Long nNotebookBarHeight = mpNotebookBar->GetSizePixel().Height();
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
const BitmapEx& aPersona = rStyleSettings.GetPersonaHeader();
// since size of notebookbar changes, to make common persona for menubar
// and notebookbar persona should be set again with changed coordinates
if (!aPersona.IsEmpty())
{
Wallpaper aWallpaper(aPersona);
aWallpaper.SetStyle(WallpaperStyle::TopRight);
aWallpaper.SetRect(tools::Rectangle(Point(0, -nTopBorder),
Size(aSize.Width() - nLeftBorder - nRightBorder,
nNotebookBarHeight + nTopBorder)));
mpNotebookBar->SetBackground(aWallpaper);
}
mpNotebookBar->setPosSizePixel(
nLeftBorder, nTopBorder,
aSize.Width() - nLeftBorder - nRightBorder,

View File

@ -119,29 +119,8 @@ WindowAlign DockingAreaWindow::GetAlign() const
void DockingAreaWindow::ApplySettings(vcl::RenderContext& rRenderContext)
{
const StyleSettings rSetting = rRenderContext.GetSettings().GetStyleSettings();
const BitmapEx& rPersonaBitmap = (GetAlign() == WindowAlign::Top) ? rSetting.GetPersonaHeader() : rSetting.GetPersonaFooter();
if (!rPersonaBitmap.IsEmpty() && (GetAlign() == WindowAlign::Top || GetAlign()==WindowAlign::Bottom))
{
Wallpaper aWallpaper(rPersonaBitmap);
if (GetAlign() == WindowAlign::Top)
aWallpaper.SetStyle(WallpaperStyle::TopRight);
else
aWallpaper.SetStyle(WallpaperStyle::BottomRight);
aWallpaper.SetColor(rSetting.GetWorkspaceColor());
// we need to shift the bitmap vertically so that it spans over the
// menubar conveniently
SystemWindow* pSysWin = GetSystemWindow();
MenuBar* pMenuBar = pSysWin ? pSysWin->GetMenuBar() : nullptr;
int nMenubarHeight = pMenuBar ? pMenuBar->GetMenuBarHeight() : 0;
aWallpaper.SetRect(tools::Rectangle(Point(0, -nMenubarHeight),
Size(rRenderContext.GetOutputWidthPixel(),
rRenderContext.GetOutputHeightPixel() + nMenubarHeight)));
rRenderContext.SetBackground(aWallpaper);
}
else if (!rRenderContext.IsNativeControlSupported(ControlType::Toolbar, ControlPart::Entire))
if (!rRenderContext.IsNativeControlSupported(ControlType::Toolbar, ControlPart::Entire))
{
Wallpaper aWallpaper;
aWallpaper.SetStyle(WallpaperStyle::ApplicationGradient);
@ -170,11 +149,7 @@ void DockingAreaWindow::Paint(vcl::RenderContext& rRenderContext, const tools::R
}
ControlState nState = ControlState::ENABLED;
const bool isFooter = GetAlign() == WindowAlign::Bottom && !rSetting.GetPersonaFooter().IsEmpty();
if ((GetAlign() == WindowAlign::Top && !rSetting.GetPersonaHeader().IsEmpty() ) || isFooter)
Erase(rRenderContext);
else if (!ImplGetSVData()->maNWFData.mbDockingAreaSeparateTB)
if (!ImplGetSVData()->maNWFData.mbDockingAreaSeparateTB)
{
// draw a single toolbar background covering the whole docking area
tools::Rectangle aCtrlRegion(Point(), GetOutputSizePixel());

View File

@ -649,14 +649,9 @@ void MenuBarWindow::HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16
MenubarValue aControlValue;
aControlValue.maTopDockingAreaHeight = ImplGetTopDockingAreaHeight( this );
if (!Application::GetSettings().GetStyleSettings().GetPersonaHeader().IsEmpty() )
Erase(rRenderContext);
else
{
tools::Rectangle aBgRegion(Point(), aOutputSize);
rRenderContext.DrawNativeControl(ControlType::Menubar, ControlPart::Entire, aBgRegion,
ControlState::ENABLED, aControlValue, OUString());
}
tools::Rectangle aBgRegion(Point(), aOutputSize);
rRenderContext.DrawNativeControl(ControlType::Menubar, ControlPart::Entire, aBgRegion,
ControlState::ENABLED, aControlValue, OUString());
ImplAddNWFSeparator(rRenderContext, aOutputSize, aControlValue);
@ -897,15 +892,10 @@ void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Recta
MenubarValue aMenubarValue;
aMenubarValue.maTopDockingAreaHeight = ImplGetTopDockingAreaHeight(this);
if (!rStyleSettings.GetPersonaHeader().IsEmpty())
Erase(*pBuffer);
else
{
tools::Rectangle aCtrlRegion( Point(), aOutputSize );
tools::Rectangle aCtrlRegion( Point(), aOutputSize );
pBuffer->DrawNativeControl(ControlType::Menubar, ControlPart::Entire, aCtrlRegion,
ControlState::ENABLED, aMenubarValue, OUString());
}
pBuffer->DrawNativeControl(ControlType::Menubar, ControlPart::Entire, aCtrlRegion,
ControlState::ENABLED, aMenubarValue, OUString());
ImplAddNWFSeparator(*pBuffer, aOutputSize, aMenubarValue);
}
@ -1053,21 +1043,7 @@ void MenuBarWindow::ApplySettings(vcl::RenderContext& rRenderContext)
SetPointFont(rRenderContext, rStyleSettings.GetMenuFont());
const BitmapEx& rPersonaBitmap = Application::GetSettings().GetStyleSettings().GetPersonaHeader();
SalMenu *pNativeMenu = m_pMenu ? m_pMenu->ImplGetSalMenu() : nullptr;
if (pNativeMenu)
pNativeMenu->ApplyPersona();
if (!rPersonaBitmap.IsEmpty())
{
Wallpaper aWallpaper(rPersonaBitmap);
aWallpaper.SetStyle(WallpaperStyle::TopRight);
aWallpaper.SetColor(Application::GetSettings().GetStyleSettings().GetWorkspaceColor());
rRenderContext.SetBackground(aWallpaper);
SetPaintTransparent(false);
SetParentClipMode();
}
else if (rRenderContext.IsNativeControlSupported(ControlType::Menubar, ControlPart::Entire))
if (rRenderContext.IsNativeControlSupported(ControlType::Menubar, ControlPart::Entire))
{
rRenderContext.SetBackground(); // background will be drawn by NWF
}

View File

@ -506,9 +506,7 @@ void ToolBox::ImplDrawBackground(vcl::RenderContext& rRenderContext, const tools
if (!bNativeOk)
{
const StyleSettings rSetting = Application::GetSettings().GetStyleSettings();
const bool isHeader = GetAlign() == WindowAlign::Top && !rSetting.GetPersonaHeader().IsEmpty();
const bool isFooter = GetAlign() == WindowAlign::Bottom && !rSetting.GetPersonaFooter().IsEmpty();
if (!IsBackground() || isHeader || isFooter)
if (!IsBackground())
{
if (!IsInPaint())
ImplDrawTransparentBackground(aPaintRegion);
@ -1200,9 +1198,7 @@ void ToolBox::ApplyBackgroundSettings(vcl::RenderContext& rRenderContext, const
}
else
{
if (rRenderContext.IsNativeControlSupported(ControlType::Toolbar, ControlPart::Entire)
|| (GetAlign() == WindowAlign::Top && !Application::GetSettings().GetStyleSettings().GetPersonaHeader().IsEmpty())
|| (GetAlign() == WindowAlign::Bottom && !Application::GetSettings().GetStyleSettings().GetPersonaFooter().IsEmpty()))
if (rRenderContext.IsNativeControlSupported(ControlType::Toolbar, ControlPart::Entire))
{
rRenderContext.SetBackground();
rRenderContext.SetTextColor(rStyleSettings.GetToolTextColor());

View File

@ -2127,7 +2127,7 @@ void X11SalFrame::UpdateSettings( AllSettings& rSettings )
{
StyleSettings aStyleSettings = rSettings.GetStyleSettings();
aStyleSettings.SetCursorBlinkTime( 500 );
aStyleSettings.SetMenuBarTextColor( aStyleSettings.GetPersonaMenuBarTextColor().value_or( COL_BLACK ) );
aStyleSettings.SetMenuBarTextColor( COL_BLACK );
rSettings.SetStyleSettings( aStyleSettings );
}

View File

@ -592,8 +592,6 @@ GtkSalMenu::GtkSalMenu( bool bMenuBar ) :
mpMenuAllowShrinkWidget( nullptr ),
mpMenuBarWidget( nullptr ),
mpMenuWidget( nullptr ),
mpMenuBarContainerProvider( nullptr ),
mpMenuBarProvider( nullptr ),
mpCloseButton( nullptr ),
mpVCLMenu( nullptr ),
mpParentSalMenu( nullptr ),
@ -1047,65 +1045,6 @@ void GtkSalMenu::CreateMenuBarWidget()
gtk_widget_show(mpMenuBarContainerWidget);
ShowCloseButton( static_cast<MenuBar*>(mpVCLMenu.get())->HasCloseButton() );
ApplyPersona();
}
void GtkSalMenu::ApplyPersona()
{
if (!mpMenuBarContainerWidget)
return;
assert(mbMenuBar);
// I'm dubious about the persona theming feature, but as it exists, let's try and support
// it, apply the image to the mpMenuBarContainerWidget
const BitmapEx& rPersonaBitmap = Application::GetSettings().GetStyleSettings().GetPersonaHeader();
GtkStyleContext *pMenuBarContainerContext = gtk_widget_get_style_context(GTK_WIDGET(mpMenuBarContainerWidget));
if (mpMenuBarContainerProvider)
{
gtk_style_context_remove_provider(pMenuBarContainerContext, GTK_STYLE_PROVIDER(mpMenuBarContainerProvider));
mpMenuBarContainerProvider = nullptr;
}
GtkStyleContext *pMenuBarContext = gtk_widget_get_style_context(GTK_WIDGET(mpMenuBarWidget));
if (mpMenuBarProvider)
{
gtk_style_context_remove_provider(pMenuBarContext, GTK_STYLE_PROVIDER(mpMenuBarProvider));
mpMenuBarProvider = nullptr;
}
if (!rPersonaBitmap.IsEmpty())
{
if (maPersonaBitmap != rPersonaBitmap)
{
mxPersonaImage.reset(new utl::TempFileNamed);
mxPersonaImage->EnableKillingFile(true);
SvStream* pStream = mxPersonaImage->GetStream(StreamMode::WRITE);
vcl::PngImageWriter aPNGWriter(*pStream);
aPNGWriter.write(rPersonaBitmap);
mxPersonaImage->CloseStream();
}
mpMenuBarContainerProvider = gtk_css_provider_new();
OUString aBuffer = "* { background-image: url(\"" + mxPersonaImage->GetURL() + "\"); background-position: top right; }";
OString aResult = OUStringToOString(aBuffer, RTL_TEXTENCODING_UTF8);
css_provider_load_from_data(mpMenuBarContainerProvider, aResult.getStr(), aResult.getLength());
gtk_style_context_add_provider(pMenuBarContainerContext, GTK_STYLE_PROVIDER(mpMenuBarContainerProvider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
// force the menubar to be transparent when persona is active otherwise for
// me the menubar becomes gray when its in the backdrop
mpMenuBarProvider = gtk_css_provider_new();
static const gchar data[] = "* { "
"background-image: none;"
"background-color: transparent;"
"}";
css_provider_load_from_data(mpMenuBarProvider, data, -1);
gtk_style_context_add_provider(pMenuBarContext,
GTK_STYLE_PROVIDER(mpMenuBarProvider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
}
maPersonaBitmap = rPersonaBitmap;
}
void GtkSalMenu::DestroyMenuBarWidget()

View File

@ -2508,13 +2508,13 @@ bool GtkSalGraphics::updateSettings(AllSettings& rSettings)
style_context_set_state(mpMenuBarItemStyle, GTK_STATE_FLAG_NORMAL);
style_context_get_color(mpMenuBarItemStyle, &text_color);
aTextColor = aStyleSet.GetPersonaMenuBarTextColor().value_or( getColor( text_color ) );
aTextColor = getColor( text_color );
aStyleSet.SetMenuBarTextColor( aTextColor );
aStyleSet.SetMenuBarRolloverTextColor( aTextColor );
style_context_set_state(mpMenuBarItemStyle, GTK_STATE_FLAG_PRELIGHT);
style_context_get_color(mpMenuBarItemStyle, &text_color);
aTextColor = aStyleSet.GetPersonaMenuBarTextColor().value_or( getColor( text_color ) );
aTextColor = getColor( text_color );
aStyleSet.SetMenuBarHighlightTextColor( aTextColor );
// menu items

View File

@ -1893,7 +1893,7 @@ void WinSalGraphics::updateSettingsNative( AllSettings& rSettings )
pSVData->maNWFData.mbDockingAreaAvoidTBFrames = true;
// FIXME get the color directly from the theme, not from the settings
Color aMenuBarTextColor = aStyleSettings.GetPersonaMenuBarTextColor().value_or( aStyleSettings.GetMenuTextColor() );
Color aMenuBarTextColor = aStyleSettings.GetMenuTextColor();
// in aero menuitem highlight text is drawn in the same color as normal
// high contrast highlight color is not related to persona and not apply blur or transparency
bool bThemeLoaded = ThemeColors::IsThemeLoaded();

View File

@ -2852,13 +2852,6 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
aStyleSettings.SetInactiveTabColor( aStyleSettings.GetFaceColor() );
}
if ( std::optional<Color> aColor = aStyleSettings.GetPersonaMenuBarTextColor() )
{
aMenuBarTextColor = *aColor;
if (!aStyleSettings.GetHighContrastMode())
aMenuBarRolloverTextColor = *aColor;
}
aStyleSettings.SetMenuBarTextColor( aMenuBarTextColor );
aStyleSettings.SetMenuBarRolloverTextColor( aMenuBarRolloverTextColor );