Kaydet (Commit) 537d4e67 authored tarafından Tamás Zolnai's avatar Tamás Zolnai

tdf#113725: Sidebar: Controls are crammed in Slide content panel

Need to trigger a layouting to get the right panel size after we
show / hode context related items.

Change-Id: I791921ecb491bb65c53a4fe9562207d47f66a88a
Reviewed-on: https://gerrit.libreoffice.org/44565Reviewed-by: 's avatarTamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: 's avatarTamás Zolnai <tamas.zolnai@collabora.com>
üst a11e0d42
......@@ -20,6 +20,7 @@
#define INCLUDED_SFX2_SOURCE_SIDEBAR_PANEL_HXX
#include <sfx2/sidebar/Context.hxx>
#include <sfx2/dllapi.h>
#include <vcl/window.hxx>
......@@ -35,7 +36,7 @@ class PanelDescriptor;
class TitleBar;
class PanelTitleBar;
class Panel : public vcl::Window
class SFX2_DLLPUBLIC Panel : public vcl::Window
{
public:
Panel(const PanelDescriptor& rPanelDescriptor, vcl::Window* pParentWindow,
......@@ -55,6 +56,7 @@ public:
bool IsExpanded() const { return mbIsExpanded;}
bool HasIdPredicate (const OUString& rsId) const;
const OUString& GetId() const { return msPanelId;}
void TriggerDeckLayouting() { maDeckLayoutTrigger(); }
virtual void Resize() override;
virtual void DataChanged (const DataChangedEvent& rEvent) override;
......
......@@ -60,6 +60,7 @@
#include <sfx2/objface.hxx>
#include <svx/dlgutil.hxx>
#include <sfx2/tabdlg.hxx>
#include <sfx2/sidebar/Panel.hxx>
#include <algorithm>
#include <EventMultiplexer.hxx>
#include <vcl/salbtype.hxx>
......@@ -265,6 +266,10 @@ void SlideBackground::HandleContextChange(
mpBackgroundLabel->Show();
mpInsertImage->Show();
}
// Need to do a relayouting, otherwise the panel size is not updated after show / hide controls
sfx2::sidebar::Panel* pPanel = dynamic_cast<sfx2::sidebar::Panel*>(GetParent());
if(pPanel)
pPanel->TriggerDeckLayouting();
}
// else Draw or something else, do nothing
}
......
......@@ -210,7 +210,7 @@
<child>
<object class="GtkButton" id="masterslidebutton">
<property name="label" translatable="yes" context="sidebarslidebackground|masterslidebutton">Master Slide</property>
<property name="visible">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="action_name">.uno:SlideMasterPage</property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment