[Libreoffice-commits] core.git: include/svtools svtools/source svx/source svx/uiconfig svx/UIConfig_svx.mk
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Sep 29 16:14:05 UTC 2020
include/svtools/toolbarmenu.hxx | 2 +-
svtools/source/control/toolbarmenu.cxx | 7 +++++--
svx/UIConfig_svx.mk | 1 +
svx/source/tbxctrls/tbcontrl.cxx | 6 +++++-
svx/uiconfig/ui/interimtearableparent.ui | 29 +++++++++++++++++++++++++++++
5 files changed, 41 insertions(+), 4 deletions(-)
New commits:
commit 663ce5d0f89e9523183ed9ca4cbfcdacf9df4cc8
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Sep 29 15:07:50 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Sep 29 18:13:33 2020 +0200
tdf#136520 allow color popdowns to be tearable again
Change-Id: Ic92ef5235662e1680aadb5666e05dad1bf808e9d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103625
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/svtools/toolbarmenu.hxx b/include/svtools/toolbarmenu.hxx
index 95738fe93fa6..ced73974d7d4 100644
--- a/include/svtools/toolbarmenu.hxx
+++ b/include/svtools/toolbarmenu.hxx
@@ -93,7 +93,7 @@ private:
std::unique_ptr<WeldToolbarPopup> m_xPopup;
public:
InterimToolbarPopup(const css::uno::Reference<css::frame::XFrame>& rFrame, vcl::Window* pParent,
- std::unique_ptr<WeldToolbarPopup> xPopup);
+ std::unique_ptr<WeldToolbarPopup> xPopup, bool bTearable = false);
virtual void dispose() override;
virtual ~InterimToolbarPopup() override;
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index 04d782ec71fd..259115c90a98 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -174,8 +174,11 @@ IMPL_LINK_NOARG(ToolbarPopupContainer, FocusHdl, weld::Widget&, void)
}
InterimToolbarPopup::InterimToolbarPopup(const css::uno::Reference<css::frame::XFrame>& rFrame, vcl::Window* pParent,
- std::unique_ptr<WeldToolbarPopup> xPopup)
- : DockingWindow(pParent, "InterimDockParent", "svx/ui/interimdockparent.ui", rFrame)
+ std::unique_ptr<WeldToolbarPopup> xPopup, bool bTearable)
+ : DockingWindow(pParent,
+ !bTearable ? OString("InterimDockParent") : OString("InterimTearableParent"),
+ !bTearable ? OUString("svx/ui/interimdockparent.ui") : OUString("svx/ui/interimtearableparent.ui"),
+ rFrame)
, m_xBox(get("box"))
, m_xFrame(rFrame)
, m_xBuilder(Application::CreateInterimBuilder(m_xBox.get(), "svx/ui/interimparent.ui", false))
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index b04db125cb0e..a55e41358f00 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -86,6 +86,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/inspectortextpanel \
svx/uiconfig/ui/interimdockparent \
svx/uiconfig/ui/interimparent \
+ svx/uiconfig/ui/interimtearableparent \
svx/uiconfig/ui/labelbox \
svx/uiconfig/ui/lightingwindow \
svx/uiconfig/ui/linkwarndialog \
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index f64b0ba95435..6b0f393bf28a 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -3270,7 +3270,11 @@ VclPtr<vcl::Window> SvxColorToolBoxControl::createVclPopupWindow( vcl::Window* p
xPopover->SetSelectedHdl( LINK( this, SvxColorToolBoxControl, SelectedHdl ) );
mxInterimPopover = VclPtr<InterimToolbarPopup>::Create(getFrameInterface(), pParent,
- std::move(xPopover));
+ std::move(xPopover), true);
+
+ auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(m_aCommandURL, m_sModuleName);
+ OUString aWindowTitle = vcl::CommandInfoProvider::GetLabelForCommand(aProperties);
+ mxInterimPopover->SetText(aWindowTitle);
mxInterimPopover->Show();
diff --git a/svx/uiconfig/ui/interimtearableparent.ui b/svx/uiconfig/ui/interimtearableparent.ui
new file mode 100644
index 000000000000..910472c2c258
--- /dev/null
+++ b/svx/uiconfig/ui/interimtearableparent.ui
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.36.0 -->
+<interface domain="svx">
+ <requires lib="gtk+" version="3.18"/>
+ <object class="GtkWindow" id="InterimTearableParent">
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="border_width">4</property>
+ <property name="resizable">False</property>
+ <property name="destroy_with_parent">True</property>
+ <property name="type_hint">dock</property>
+ <property name="skip_pager_hint">True</property>
+ <child>
+ <object class="GtkBox" id="box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ <child type="titlebar">
+ <placeholder/>
+ </child>
+ </object>
+</interface>
More information about the Libreoffice-commits
mailing list