summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-09-16 10:14:06 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-09-16 11:33:20 +0100
commit363446eb61de141deb1364805e0d7cd0e1f6d7fe (patch)
treeee1d0e11a8c3b99fe3ebf3b9ec2e85c6be1a6d6e
parent6eb840cc540bb6f2efcebc0349a8e6e7ba074cd8 (diff)
Resolves: fdo#69236 route size request to layout widget, not hard-coded value
a) For the sidebar the sidebars automatically handle scrolling, but for the older panel the widgets has to do the scrolling so add scrolling parents to the .ui b) Fold the DialogListBox scrolling widget implementation into VclScrolledWindow and remove the duplication. Change-Id: Ife9ccd8c501e5dee7bf3102a92c8261d979cd834
-rw-r--r--include/vcl/layout.hxx27
-rw-r--r--sc/source/ui/dbgui/sortkeydlg.cxx2
-rw-r--r--sd/Library_sd.mk1
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx22
-rw-r--r--sd/source/ui/animations/DialogListBox.cxx332
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx25
-rw-r--r--sd/source/ui/inc/DialogListBox.hxx69
-rw-r--r--sd/source/ui/sidebar/CustomAnimationPanel.cxx4
-rw-r--r--sd/source/ui/sidebar/SlideTransitionPanel.cxx4
-rw-r--r--sd/uiconfig/simpress/ui/customanimationspanel.ui687
-rw-r--r--sd/uiconfig/simpress/ui/slidetransitionspanel.ui577
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx1
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx4
-rw-r--r--svx/source/dialog/rubydialog.cxx1
-rw-r--r--svx/source/sidebar/PanelLayout.cxx25
-rw-r--r--vcl/source/control/scrbar.cxx3
-rw-r--r--vcl/source/window/builder.cxx24
-rw-r--r--vcl/source/window/layout.cxx129
18 files changed, 841 insertions, 1096 deletions
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index 1d817dd70288..47b9593f3fbc 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -23,7 +23,7 @@
class VCL_DLLPUBLIC VclContainer : public Window
{
public:
- VclContainer(Window *pParent, WinBits nStyle = WB_HIDE);
+ VclContainer(Window *pParent, WinBits nStyle = WB_HIDE | WB_CLIPCHILDREN);
//These take into account the external margins of the rWindow widget
//while GetOptimalSize/get_preferred_size and SetPosSizePixel are
@@ -439,7 +439,7 @@ VCL_DLLPUBLIC void setGridAttach(Window &rWidget, sal_Int32 nLeft, sal_Int32 nTo
class VCL_DLLPUBLIC VclBin : public VclContainer
{
public:
- VclBin(Window *pParent, WinBits nStyle = WB_HIDE)
+ VclBin(Window *pParent, WinBits nStyle = WB_HIDE | WB_CLIPCHILDREN)
: VclContainer(pParent, nStyle)
{
}
@@ -547,31 +547,30 @@ private:
DECL_DLLPRIVATE_LINK(ClickHdl, DisclosureButton* pBtn);
};
-//This is a work in progress, so if you want to put something inside a
-//scrolled window that doesn't handle its own scrolling, then you may need to
-//implement this fully
class VCL_DLLPUBLIC VclScrolledWindow : public VclBin
{
public:
- VclScrolledWindow(Window *pParent, WinBits nStyle = WB_HIDE | WB_AUTOHSCROLL | WB_AUTOVSCROLL)
- : VclBin(pParent, nStyle)
- , m_aVScroll(this, WB_HIDE | WB_VERT)
- , m_aHScroll(this, WB_HIDE | WB_HORZ)
- {
- SetType(WINDOW_SCROLLWINDOW);
- }
+ VclScrolledWindow(Window *pParent, WinBits nStyle = WB_HIDE | WB_CLIPCHILDREN | WB_AUTOHSCROLL | WB_AUTOVSCROLL);
virtual Window *get_child();
virtual const Window *get_child() const;
virtual bool set_property(const OString &rKey, const OString &rValue);
ScrollBar& getVertScrollBar() { return m_aVScroll; }
ScrollBar& getHorzScrollBar() { return m_aHScroll; }
Size getVisibleChildSize() const;
+ //set to true to disable the built-in scrolling callbacks to allow the user
+ //to override it
+ void setUserManagedScrolling(bool bUserManagedScrolling) { m_bUserManagedScrolling = bUserManagedScrolling;}
protected:
virtual Size calculateRequisition() const;
virtual void setAllocation(const Size &rAllocation);
+ DECL_LINK(ScrollBarHdl, void *);
+ void InitScrollBars(const Size &rRequest);
+ virtual long Notify(NotifyEvent& rNEvt);
private:
+ bool m_bUserManagedScrolling;
ScrollBar m_aVScroll;
ScrollBar m_aHScroll;
+ ScrollBarBox m_aScrollBarBox;
};
//Enforces that its children are always the same size as itself.
@@ -709,8 +708,8 @@ public:
const OUString &rMessage,
VclMessageType eMessageType = VCL_MESSAGE_ERROR,
VclButtonsType eButtonsType = VCL_BUTTONS_OK,
- WinBits nStyle = WB_MOVEABLE|WB_3DLOOK|WB_CLOSEABLE);
- MessageDialog(Window* pParent, WinBits nStyle);
+ WinBits nStyle = WB_CLIPCHILDREN | WB_MOVEABLE | WB_3DLOOK | WB_CLOSEABLE);
+ MessageDialog(Window* pParent, WinBits nStyle = WB_CLIPCHILDREN);
MessageDialog(Window* pParent, const OString& rID, const OUString& rUIXMLDescription);
virtual bool set_property(const OString &rKey, const OString &rValue);
virtual short Execute();
diff --git a/sc/source/ui/dbgui/sortkeydlg.cxx b/sc/source/ui/dbgui/sortkeydlg.cxx
index ab883075a2f8..b235b213894c 100644
--- a/sc/source/ui/dbgui/sortkeydlg.cxx
+++ b/sc/source/ui/dbgui/sortkeydlg.cxx
@@ -92,6 +92,8 @@ ScSortKeyCtrl::ScSortKeyCtrl(SfxTabPage* pParent, ScSortKeyItems& rItems)
, m_rScrolledWindow(*pParent->get<VclScrolledWindow>("SortCriteriaPage"))
, m_rVertScroll(m_rScrolledWindow.getVertScrollBar())
{
+ m_rScrolledWindow.setUserManagedScrolling(true);
+
m_rVertScroll.EnableDrag();
m_rVertScroll.Show(m_rScrolledWindow.GetStyle() & WB_VSCROLL);
diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index 955253b298c7..5514e17cbea8 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -182,7 +182,6 @@ $(eval $(call gb_Library_add_exception_objects,sd,\
sd/source/ui/animations/CustomAnimationDialog \
sd/source/ui/animations/CustomAnimationList \
sd/source/ui/animations/CustomAnimationPane \
- sd/source/ui/animations/DialogListBox \
sd/source/ui/animations/STLPropertySet \
sd/source/ui/animations/SlideTransitionPane \
sd/source/ui/animations/motionpathtag \
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index f0b73138de5f..e1e24ce48ccf 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -71,7 +71,6 @@
#include "framework/FrameworkHelper.hxx"
#include "EventMultiplexer.hxx"
-#include "DialogListBox.hxx"
#include "glob.hrc"
#include "sdpage.hxx"
@@ -2298,34 +2297,19 @@ void CustomAnimationPane::updatePathFromMotionPathTag( const rtl::Reference< Mot
::Window * createCustomAnimationPanel( ::Window* pParent, ViewShellBase& rBase, const cssu::Reference<css::frame::XFrame>& rxFrame )
{
- DialogListBox* pWindow = 0;
+ ::Window* pWindow = 0;
DrawDocShell* pDocSh = rBase.GetDocShell();
if( pDocSh )
{
- pWindow = new DialogListBox( pParent, WB_CLIPCHILDREN|WB_TABSTOP|WB_AUTOHSCROLL );
- const Size aMinSize( pWindow->LogicToPixel( Size( 80, 256 ), MAP_APPFONT ) );
- pWindow->SetSizePixel(aMinSize);
- pWindow->SetBackground(Wallpaper(Color(COL_BLUE)));
-
- ::Window* pPaneWindow = new CustomAnimationPane( pWindow, rBase, rxFrame, aMinSize );
- pWindow->SetChildWindow( pPaneWindow, aMinSize );
- pWindow->SetText( pPaneWindow->GetText() );
+ const Size aMinSize( pParent->LogicToPixel( Size( 80, 256 ), MAP_APPFONT ) );
+ pWindow = new CustomAnimationPane( pParent, rBase, rxFrame, aMinSize );
}
return pWindow;
}
-
-sal_Int32 getCustomAnimationPanelMinimumHeight (::Window* pDialog)
-{
- if (pDialog != NULL)
- return pDialog->LogicToPixel(Size( 80, 256 ), MAP_APPFONT).Height();
- else
- return 0;
-}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/animations/DialogListBox.cxx b/sd/source/ui/animations/DialogListBox.cxx
deleted file mode 100644
index 78e791848d3f..000000000000
--- a/sd/source/ui/animations/DialogListBox.cxx
+++ /dev/null
@@ -1,332 +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 .
- */
-
-#include "DialogListBox.hxx"
-
-namespace sd
-{
-
-DialogListBox::DialogListBox( Window* pParent, WinBits nWinStyle ) :
- Control( pParent, nWinStyle ),
- mpChild( 0 )
-{
- mpVScrollBar = new ScrollBar( this, WB_VSCROLL | WB_DRAG );
- mpHScrollBar = new ScrollBar( this, WB_HSCROLL | WB_DRAG );
- mpScrollBarBox = new ScrollBarBox( this );
-
- Link aLink( LINK( this, DialogListBox, ScrollBarHdl ) );
- mpVScrollBar->SetScrollHdl( aLink );
- mpHScrollBar->SetScrollHdl( aLink );
-
- mbVScroll = false;
- mbHScroll = false;
- mbAutoHScroll = ( nWinStyle & WB_AUTOHSCROLL ) ? true : false;
-}
-
-// -----------------------------------------------------------------------
-
-DialogListBox::~DialogListBox()
-{
- delete mpHScrollBar;
- delete mpVScrollBar;
- delete mpScrollBarBox;
- delete mpChild;
-}
-
-// -----------------------------------------------------------------------
-
-void DialogListBox::SetChildWindow( Window* pChild, const Size& rMinSize )
-{
- if( mpChild )
- delete mpChild;
-
- mpChild = pChild;
- maMinSize = rMinSize;
- ImplResizeControls();
- ImplCheckScrollBars();
-}
-
-// -----------------------------------------------------------------------
-
-void DialogListBox::GetFocus()
-{
- if( mpChild )
- mpChild->GrabFocus();
-}
-
-// -----------------------------------------------------------------------
-
-::Window* DialogListBox::GetPreferredKeyInputWindow()
-{
- if( mpChild )
- return mpChild;
- else
- return this;
-}
-
-// -----------------------------------------------------------------------
-
-void DialogListBox::Resize()
-{
- Control::Resize();
- ImplResizeControls();
- ImplCheckScrollBars();
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK_NOARG(DialogListBox, ScrollBarHdl)
-{
- ImplResizeChild();
- return 1;
-}
-
-// -----------------------------------------------------------------------
-
-void DialogListBox::ImplCheckScrollBars()
-{
- bool bArrange = false;
-
- Size aOutSz = GetOutputSizePixel();
-
- // vert. ScrollBar
- if( aOutSz.Height() < maMinSize.Height() )
- {
- if( !mbVScroll )
- bArrange = true;
- mbVScroll = true;
- }
- else
- {
- if( mbVScroll )
- bArrange = true;
- mbVScroll = false;
- }
-
- // horz. ScrollBar
- if( mbAutoHScroll )
- {
- long nWidth = aOutSz.Width();
- if ( mbVScroll )
- nWidth -= mpVScrollBar->GetSizePixel().Width();
- if( nWidth < maMinSize.Width() )
- {
- if( !mbHScroll )
- bArrange = true;
- mbHScroll = true;
-
- if ( !mbVScroll )
- {
- int nHeight = aOutSz.Height() - mpHScrollBar->GetSizePixel().Height();
- if( nHeight < maMinSize.Height() )
- {
- if( !mbVScroll )
- bArrange = true;
- mbVScroll = true;
- }
- }
- }
- else
- {
- if( mbHScroll )
- bArrange = true;
- mbHScroll = false;
- }
- }
-
- if( bArrange )
- ImplResizeControls();
-
- ImplInitScrollBars();
-}
-
-// -----------------------------------------------------------------------
-
-void DialogListBox::ImplInitScrollBars()
-{
- if( mpChild )
- {
- Size aOutSize( GetOutputSizePixel() );
- if( mbHScroll ) aOutSize.Height() -= mpHScrollBar->GetSizePixel().Height();
- if( mbVScroll ) aOutSize.Width() -= mpVScrollBar->GetSizePixel().Width();
-
- if ( mbVScroll )
- {
- mpVScrollBar->SetRangeMax( maMinSize.Height() );
- mpVScrollBar->SetVisibleSize( aOutSize.Height() );
- mpVScrollBar->SetPageSize( 16 );
- }
-
- if ( mbHScroll )
- {
- mpHScrollBar->SetRangeMax( maMinSize.Width() );
- mpHScrollBar->SetVisibleSize( aOutSize.Width() );
- mpHScrollBar->SetPageSize( 16 );
- }
- }
-}
-
-// -----------------------------------------------------------------------
-
-void DialogListBox::ImplResizeControls()
-{
- Size aOutSz( GetOutputSizePixel() );
- long nSBWidth = GetSettings().GetStyleSettings().GetScrollBarSize();
- nSBWidth = CalcZoom( nSBWidth );
-
- maInnerSize = aOutSz;
- if ( mbVScroll )
- maInnerSize.Width() -= nSBWidth;
- if ( mbHScroll )
- maInnerSize.Height() -= nSBWidth;
-
- // ScrollBarBox
- if( mbVScroll && mbHScroll )
- {
- Point aBoxPos( maInnerSize.Width(), maInnerSize.Height() );
- mpScrollBarBox->SetPosSizePixel( aBoxPos, Size( nSBWidth, nSBWidth ) );
- mpScrollBarBox->Show();
- }
- else
- {
- mpScrollBarBox->Hide();
- }
-
- // vert. ScrollBar
- if( mbVScroll )
- {
- // Scrollbar on left or right side?
- Point aVPos( aOutSz.Width() - nSBWidth, 0 );
- mpVScrollBar->SetPosSizePixel( aVPos, Size( nSBWidth, maInnerSize.Height() ) );
- mpVScrollBar->Show();
- }
- else
- {
- mpVScrollBar->Hide();
- }
-
- // horz. ScrollBar
- if( mbHScroll )
- {
- Point aHPos( 0, aOutSz.Height() - nSBWidth );
- mpHScrollBar->SetPosSizePixel( aHPos, Size( maInnerSize.Width(), nSBWidth ) );
- mpHScrollBar->Show();
- }
- else
- {
- mpHScrollBar->Hide();
- }
-
- ImplResizeChild();
-}
-
-void DialogListBox::ImplResizeChild()
-{
- Point aWinPos;
- Size aSize( maInnerSize );
-
- int nOffset;
- if( mbHScroll )
- {
- nOffset = mpHScrollBar->GetThumbPos();
- aWinPos.X() = -nOffset;
- aSize.Width() += nOffset;
- }
-
- if( mbVScroll )
- {
- nOffset = mpVScrollBar->GetThumbPos();
- aWinPos.Y() = -nOffset;
- aSize.Height() += nOffset;
- }
-
- mpChild->SetPosSizePixel( aWinPos, aSize );
-}
-
-// -----------------------------------------------------------------------
-
-void DialogListBox::StateChanged( StateChangedType nType )
-{
- if ( nType == STATE_CHANGE_INITSHOW )
- {
- ImplCheckScrollBars();
- }
- else if ( ( nType == STATE_CHANGE_UPDATEMODE ) || ( nType == STATE_CHANGE_DATA ) )
- {
- sal_Bool bUpdate = IsUpdateMode();
- mpChild->SetUpdateMode( bUpdate );
- if ( bUpdate && IsReallyVisible() )
- ImplCheckScrollBars();
- }
- else if( nType == STATE_CHANGE_ENABLE )
- {
- mpHScrollBar->Enable( IsEnabled() );
- mpVScrollBar->Enable( IsEnabled() );
- mpScrollBarBox->Enable( IsEnabled() );
- Invalidate();
- }
- else if ( nType == STATE_CHANGE_ZOOM )
- {
- mpChild->SetZoom( GetZoom() );
- Resize();
- }
- else if ( nType == STATE_CHANGE_CONTROLFONT )
- {
- mpChild->SetControlFont( GetControlFont() );
- }
- else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
- {
- mpChild->SetControlForeground( GetControlForeground() );
- }
- else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
- {
- mpChild->SetControlBackground( GetControlBackground() );
- }
- else if( nType == STATE_CHANGE_VISIBLE )
- {
- mpChild->Show( IsVisible() );
- }
-
- Control::StateChanged( nType );
-}
-
-// -----------------------------------------------------------------------
-
-long DialogListBox::Notify( NotifyEvent& rNEvt )
-{
- long nDone = 0;
- if ( rNEvt.GetType() == EVENT_COMMAND )
- {
- const CommandEvent& rCEvt = *rNEvt.GetCommandEvent();
- if ( rCEvt.GetCommand() == COMMAND_WHEEL )
- {
- const CommandWheelData* pData = rCEvt.GetWheelData();
- if( !pData->GetModifier() && ( pData->GetMode() == COMMAND_WHEEL_SCROLL ) )
- {
- nDone = HandleScrollCommand( rCEvt, mpHScrollBar, mpVScrollBar );
- }
- }
- }
-
- return nDone ? nDone : Window::Notify( rNEvt );
-}
-
-} // namespace sd
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index a89126cc7a76..97783006139f 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -47,7 +47,6 @@
#include "sddll.hxx"
#include "framework/FrameworkHelper.hxx"
-#include "DialogListBox.hxx"
#include <sfx2/sidebar/Theme.hxx>
#include <algorithm>
@@ -459,7 +458,7 @@ SlideTransitionPane::SlideTransitionPane(
get(mpCB_AUTO_PREVIEW, "auto_preview");
mpLB_SLIDE_TRANSITIONS->set_width_request(mpLB_SLIDE_TRANSITIONS->approximate_char_width() * 16);
- mpLB_SLIDE_TRANSITIONS->set_height_request(mpLB_SLIDE_TRANSITIONS->GetTextHeight() * 16);
+ mpLB_SLIDE_TRANSITIONS->SetDropDownLineCount(4);
if( pDoc )
mxModel.set( pDoc->getUnoModel(), uno::UNO_QUERY );
@@ -1098,34 +1097,18 @@ IMPL_LINK_NOARG(SlideTransitionPane, LateInitCallback)
::Window * createSlideTransitionPanel( ::Window* pParent, ViewShellBase& rBase, const cssu::Reference<css::frame::XFrame>& rxFrame )
{
- DialogListBox* pWindow = 0;
+ ::Window* pWindow = 0;
DrawDocShell* pDocSh = rBase.GetDocShell();
if( pDocSh )
{
- pWindow = new DialogListBox( pParent, WB_CLIPCHILDREN|WB_TABSTOP|WB_AUTOHSCROLL );
-
- Size aMinSize( pWindow->LogicToPixel( Size( 72, 216 ), MAP_APPFONT ) );
- ::Window* pPaneWindow = new SlideTransitionPane( pWindow, rBase, aMinSize, pDocSh->GetDoc(), rxFrame );
- pWindow->SetChildWindow( pPaneWindow, aMinSize );
- pWindow->SetText( pPaneWindow->GetText() );
+ Size aMinSize( pParent->LogicToPixel( Size( 72, 216 ), MAP_APPFONT ) );
+ pWindow = new SlideTransitionPane( pParent, rBase, aMinSize, pDocSh->GetDoc(), rxFrame );
}
return pWindow;
}
-
-
-
-sal_Int32 getSlideTransitionPanelMinimumHeight (::Window* pDialog)
-{
- if (pDialog != NULL)
- return pDialog->LogicToPixel(Size( 72, 216 ), MAP_APPFONT).Height();
- else
- return 0;
-}
-
-
} // namespace sd
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/DialogListBox.hxx b/sd/source/ui/inc/DialogListBox.hxx
deleted file mode 100644
index 640124ecd0c0..000000000000
--- a/sd/source/ui/inc/DialogListBox.hxx
+++ /dev/null
@@ -1,69 +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 .
- */
-#ifndef SD_DIALOGLISTBOX_HXX
-#define SD_DIALOGLISTBOX_HXX
-
-#include <vcl/ctrl.hxx>
-#include <vcl/scrbar.hxx>
-
-namespace sd
-{
-
-class DialogListBox : public Control
-{
-private:
- ScrollBar* mpHScrollBar;
- ScrollBar* mpVScrollBar;
- ScrollBarBox* mpScrollBarBox;
- ::Window* mpChild;
- bool mbVScroll;
- bool mbHScroll;
- bool mbAutoHScroll;
- Size maMinSize, maInnerSize;
-
-protected:
- virtual void GetFocus();
- virtual void StateChanged( StateChangedType nType );
-
- long Notify( NotifyEvent& rNEvt );
-
- void ImplResizeControls();
- void ImplCheckScrollBars();
- void ImplInitScrollBars();
- void ImplResizeChild();
-
- DECL_LINK(ScrollBarHdl, void *);
-
-public:
- DialogListBox( ::Window* pParent, WinBits nWinStyle );
- ~DialogListBox();
-
- void SetChildWindow( ::Window* pChild, const Size& rMinSize );
-
- ::Window* GetPreferredKeyInputWindow();
- void Resize();
-
-};
-
-} // namespace sd
-
-// SD_DIALOGLISTBOX_HXX
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/sidebar/CustomAnimationPanel.cxx b/sd/source/ui/sidebar/CustomAnimationPanel.cxx
index f2b38af7ba1d..95e7f3352f7f 100644
--- a/sd/source/ui/sidebar/CustomAnimationPanel.cxx
+++ b/sd/source/ui/sidebar/CustomAnimationPanel.cxx
@@ -23,7 +23,6 @@
namespace sd {
extern ::Window * createCustomAnimationPanel (::Window* pParent, ViewShellBase& rBase, const cssu::Reference<css::frame::XFrame>& rxFrame);
- extern sal_Int32 getCustomAnimationPanelMinimumHeight (::Window* pParent);
}
namespace sd { namespace sidebar {
@@ -66,7 +65,8 @@ CustomAnimationPanel::~CustomAnimationPanel (void)
css::ui::LayoutSize CustomAnimationPanel::GetHeightForWidth (const sal_Int32 /*nWidth*/)
{
- const sal_Int32 nMinimumHeight(getCustomAnimationPanelMinimumHeight(mpWrappedControl.get()));
+ Window *pControl = mpWrappedControl.get();
+ sal_Int32 nMinimumHeight = pControl ? pControl->get_preferred_size().Height() : 0;
return css::ui::LayoutSize(nMinimumHeight,-1, nMinimumHeight);
}
diff --git a/sd/source/ui/sidebar/SlideTransitionPanel.cxx b/sd/source/ui/sidebar/SlideTransitionPanel.cxx
index f48f592cb57b..8e0b906244ac 100644
--- a/sd/source/ui/sidebar/SlideTransitionPanel.cxx
+++ b/sd/source/ui/sidebar/SlideTransitionPanel.cxx
@@ -23,7 +23,6 @@
namespace sd {
extern ::Window* createSlideTransitionPanel (::Window* pParent, ViewShellBase& rBase, const cssu::Reference<css::frame::XFrame>& rxFrame);
- extern sal_Int32 getSlideTransitionPanelMinimumHeight (::Window* pParent);
}
@@ -67,7 +66,8 @@ SlideTransitionPanel::~SlideTransitionPanel (void)
css::ui::LayoutSize SlideTransitionPanel::GetHeightForWidth (const sal_Int32 /*nWidth*/)
{
- const sal_Int32 nMinimumHeight(getSlideTransitionPanelMinimumHeight(mpWrappedControl.get()));
+ Window *pControl = mpWrappedControl.get();
+ sal_Int32 nMinimumHeight = pControl ? pControl->get_preferred_size().Height() : 0;
return css::ui::LayoutSize(nMinimumHeight,-1, nMinimumHeight);
}
diff --git a/sd/uiconfig/simpress/ui/customanimationspanel.ui b/sd/uiconfig/simpress/ui/customanimationspanel.ui
index fc6d66f8662f..94371c6c5dca 100644
--- a/sd/uiconfig/simpress/ui/customanimationspanel.ui
+++ b/sd/uiconfig/simpress/ui/customanimationspanel.ui
@@ -2,311 +2,389 @@
<interface>
<!-- interface-requires gtk+ 3.0 -->
<!-- interface-requires LibreOffice 1.0 -->
- <object class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-go-up</property>
- </object>
- <object class="GtkImage" id="image2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-go-down</property>
- </object>
<object class="GtkBox" id="CustomAnimationsPanel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
- <object class="GtkBox" id="box1">
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</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="shadow_type">in</property>
<child>
- <object class="GtkFrame" id="frame1">
+ <object class="GtkViewport" id="viewport1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<child>
- <object class="GtkBox" id="box2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkButton" id="add_effect">
- <property name="label" translatable="yes">_Add...</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="change_effect">
- <property name="label" translatable="yes">_Change...</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="remove_effect">
- <property name="label" translatable="yes">_Remove</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Modify effect</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>
- <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="box3">
+ <object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="vexpand">True</property>
<property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkGrid" id="grid1">
+ <object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
- <child>
- <object class="GtkLabel" id="start_effect">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="label" translatable="yes">_Start:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
<child>
- <object class="GtkLabel" id="effect_property">
+ <object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="label" translatable="yes">_Direction:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="effect_speed">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="label" translatable="yes">Sp_eed:</property>
- <property name="use_underline">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkButton" id="add_effect">
+ <property name="label" translatable="yes">_Add...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="change_effect">
+ <property name="label" translatable="yes">_Change...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="remove_effect">
+ <property name="label" translatable="yes">_Remove</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
</child>
- <child>
- <object class="GtkComboBoxText" id="start_effect_list">
+ <child type="label">
+ <object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="entry_text_column">0</property>
- <property name="id_column">1</property>
- <items>
- <item translatable="yes">On click</item>
- <item translatable="yes">With previous</item>
- <item translatable="yes">After previous</item>
- </items>
+ <property name="label" translatable="yes">Modify effect</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
</child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="vexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
<child>
- <object class="GtkBox" id="placeholder">
+ <object class="GtkBox" id="box3">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="vexpand">True</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <object class="sdlo-PropertyControl" id="effect_property_list">
+ <object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="start_effect">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="label" translatable="yes">_Start:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="effect_property">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="label" translatable="yes">_Direction:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="effect_speed">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="label" translatable="yes">Sp_eed:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="start_effect_list">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ <items>
+ <item translatable="yes">On click</item>
+ <item translatable="yes">With previous</item>
+ <item translatable="yes">After previous</item>
+ </items>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="placeholder">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="sdlo-PropertyControl" id="effect_property_list">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="more_properties">
+ <property name="label" translatable="yes">_...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="effect_speed_list">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="sdlo-CustomAnimationList" id="custom_animation_list">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
<property name="vexpand">True</property>
- <property name="entry_text_column">0</property>
- <property name="id_column">1</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="hexpand">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="change_order">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Change order:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="move_up">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">image1</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="move_down">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">image2</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">0</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
</child>
- <child>
- <object class="GtkButton" id="more_properties">
- <property name="label" translatable="yes">_...</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBoxText" id="effect_speed_list">
+ <child type="label">
+ <object class="GtkLabel" id="effect_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="entry_text_column">0</property>
- <property name="id_column">1</property>
+ <property name="label" translatable="yes">Effect</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="sdlo-CustomAnimationList" id="custom_animation_list">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="Custom Animation ListBox-selection"/>
</child>
</object>
<packing>
- <property name="expand">True</property>
+ <property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkBox" id="box4">
+ <object class="GtkFrame" id="frame3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="hexpand">True</property>
- <property name="spacing">6</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
<child>
- <object class="GtkLabel" id="change_order">
+ <object class="GtkBox" id="box5">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Change order:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="move_up">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="image">image1</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkButton" id="play">
+ <property name="label" translatable="yes">_Play</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="slideshow">
+ <property name="label" translatable="yes">S_lide Show</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
- <child>
- <object class="GtkButton" id="move_down">
+ <child type="label">
+ <object class="GtkLabel" id="label7">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="image">image2</property>
+ <property name="can_focus">False</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
</child>
</object>
<packing>
@@ -315,108 +393,39 @@
<property name="position">2</property>
</packing>
</child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="effect_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Effect</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>
- <child>
- <object class="GtkFrame" id="frame3">
- <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="box5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkButton" id="play">
- <property name="label" translatable="yes">_Play</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
<child>
- <object class="GtkButton" id="slideshow">
- <property name="label" translatable="yes">S_lide Show</property>
+ <object class="GtkFrame" id="frame4">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkCheckButton" id="auto_preview">
+ <property name="label" translatable="yes">Automatic pre_view</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="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="position">3</property>
</packing>
</child>
</object>
</child>
- <child type="label">
- <object class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="frame4">
- <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="GtkCheckButton" id="auto_preview">
- <property name="label" translatable="yes">Automatic pre_view</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="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label8">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- </child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
</child>
</object>
<packing>
@@ -426,4 +435,14 @@
</packing>
</child>
</object>
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-go-up</property>
+ </object>
+ <object class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-go-down</property>
+ </object>
</interface>
diff --git a/sd/uiconfig/simpress/ui/slidetransitionspanel.ui b/sd/uiconfig/simpress/ui/slidetransitionspanel.ui
index 2471ef84cb28..ae62f4ebbece 100644
--- a/sd/uiconfig/simpress/ui/slidetransitionspanel.ui
+++ b/sd/uiconfig/simpress/ui/slidetransitionspanel.ui
@@ -7,345 +7,368 @@
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<child>
- <object class="GtkBox" id="box1">
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</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="shadow_type">in</property>
<child>
- <object class="GtkFrame" id="frame3">
+ <object class="GtkViewport" id="viewport1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<child>
- <object class="GtkAlignment" id="alignment3">
+ <object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
+ <property name="vexpand">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkTreeView" id="transitions_list">
+ <object class="GtkFrame" id="frame3">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection"/>
+ <property name="can_focus">False</property>
+ <property name="vexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="vexpand">True</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkTreeView" id="transitions_list">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="vexpand">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection1"/>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Apply to selected slides</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>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Apply to selected slides</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>
- <object class="GtkFrame" id="frame1">
- <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="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
<child>
- <object class="GtkBox" id="box2">
+ <object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
<child>
- <object class="GtkBox" id="box4">
+ <object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
<child>
- <object class="GtkLabel" id="speed_label">
+ <object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Speed:</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkBox" id="box4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="speed_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Speed:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="speed_list">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ <items>
+ <item translatable="yes">Slow</item>
+ <item translatable="yes">Medium</item>
+ <item translatable="yes">Fast</item>
+ </items>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="sound_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Sound:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="sound_list">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ <items>
+ <item translatable="yes">No Sound</item>
+ <item translatable="yes">Stop Previous Sound</item>
+ <item translatable="yes">Other Sound...</item>
+ </items>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="loop_sound">
+ <property name="label" translatable="yes">Loop until next sound</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="margin_left">12</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBoxText" id="speed_list">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="entry_text_column">0</property>
- <property name="id_column">1</property>
- <items>
- <item translatable="yes">Slow</item>
- <item translatable="yes">Medium</item>
- <item translatable="yes">Fast</item>
- </items>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
</child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Modify transition</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>
+ <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="box5">
+ <object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="sound_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Sound:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
<child>
- <object class="GtkComboBoxText" id="sound_list">
+ <object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="entry_text_column">0</property>
- <property name="id_column">1</property>
- <items>
- <item translatable="yes">No Sound</item>
- <item translatable="yes">Stop Previous Sound</item>
- <item translatable="yes">Other Sound...</item>
- </items>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkRadioButton" id="rb_mouse_click">
+ <property name="label" translatable="yes">On mouse click</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">rb_mouse_click</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="rb_auto_after">
+ <property name="label" translatable="yes">Automatically after</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">rb_mouse_click</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="auto_after_value:0sec">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="invisible_char_set">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
- <child>
- <object class="GtkCheckButton" id="loop_sound">
- <property name="label" translatable="yes">Loop until next sound</property>
+ <child type="label">
+ <object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="margin_left">12</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Advance slide</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
</child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
</child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Modify transition</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>
- <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="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
<child>
- <object class="GtkGrid" id="grid1">
+ <object class="GtkButton" id="apply_to_all">
+ <property name="label" translatable="yes">Apply to All Slides</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="halign">center</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButtonBox" id="buttonbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <property name="layout_style">start</property>
<child>
- <object class="GtkRadioButton" id="rb_mouse_click">
- <property name="label" translatable="yes">On mouse click</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- <property name="group">rb_mouse_click</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="rb_auto_after">
- <property name="label" translatable="yes">Automatically after</property>
+ <object class="GtkButton" id="play">
+ <property name="label" translatable="yes">Play</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- <property name="group">rb_mouse_click</property>
+ <property name="receives_default">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="auto_after_value:0sec">
+ <object class="GtkButton" id="slide_show">
+ <property name="label" translatable="yes">Slide Show</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <property name="invisible_char_set">True</property>
+ <property name="receives_default">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="auto_preview">
+ <property name="label" translatable="yes">Automatic preview</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">5</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">Advance slide</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">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="apply_to_all">
- <property name="label" translatable="yes">Apply to All Slides</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="box3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkButton" id="play">
- <property name="label" translatable="yes">Play</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="slide_show">
- <property name="label" translatable="yes">Slide Show</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="auto_preview">
- <property name="label" translatable="yes">Automatic preview</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">5</property>
- </packing>
</child>
</object>
<packing>
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 46ff8b9003e3..28de74fabcf3 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -2473,6 +2473,7 @@ CmisPropertiesControl::CmisPropertiesControl(SfxTabPage* pParent)
, m_rScrolledWindow( *pParent->get<VclScrolledWindow>("CmisScroll"))
, m_rVertScroll( m_rScrolledWindow.getVertScrollBar())
{
+ m_rScrolledWindow.setUserManagedScrolling(true);
m_rVertScroll.EnableDrag();
m_rVertScroll.Show( m_rScrolledWindow.GetStyle() & WB_VSCROLL);
m_rVertScroll.SetRangeMin(0);
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index 1a922f47de09..eb81fb6f7ea2 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -575,7 +575,9 @@ void AssignmentPersistentData::Commit()
get(m_pDatasource, "datasource");
get(m_pAdministrateDatasources, "admin");
get(m_pTable, "datatable");
- m_pFieldScroller = &get<VclScrolledWindow>("scrollwindow")->getVertScrollBar();
+ VclScrolledWindow *pScrollWindow = get<VclScrolledWindow>("scrollwindow");
+ pScrollWindow->setUserManagedScrolling(true);
+ m_pFieldScroller = &pScrollWindow->getVertScrollBar();
for (sal_Int32 row=0; row<FIELD_PAIRS_VISIBLE; ++row)
{
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx
index b6ad3f16b8e1..cb6db3cdb09f 100644
--- a/svx/source/dialog/rubydialog.cxx
+++ b/svx/source/dialog/rubydialog.cxx
@@ -213,6 +213,7 @@ SvxRubyDialog::SvxRubyDialog(SfxBindings *pBind, SfxChildWindow *pCW,
get(m_pPreviewWin, "preview");
m_pPreviewWin->setRubyDialog(this);
get(m_pScrolledWindow, "scrolledwindow");
+ m_pScrolledWindow->setUserManagedScrolling(true);
m_pScrollSB = &m_pScrolledWindow->getVertScrollBar();
get(m_pLeft1ED, "Left1ED");
get(m_pRight1ED, "Right1ED");
diff --git a/svx/source/sidebar/PanelLayout.cxx b/svx/source/sidebar/PanelLayout.cxx
index 2c5a5bbe563f..9712b260867a 100644
--- a/svx/source/sidebar/PanelLayout.cxx
+++ b/svx/source/sidebar/PanelLayout.cxx
@@ -27,14 +27,31 @@ Size PanelLayout::GetOptimalSize() const
void PanelLayout::setPosSizePixel(long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags)
{
+ bool bCanHandleSmallerWidth = false;
+ bool bCanHandleSmallerHeight = false;
+
+ bool bIsLayoutEnabled = isLayoutEnabled(this);
+ Window *pChild = GetWindow(WINDOW_FIRSTCHILD);
+
+ if (bIsLayoutEnabled && pChild->GetType() == WINDOW_SCROLLWINDOW)
+ {
+ WinBits nStyle = pChild->GetStyle();
+ if (nStyle && (WB_AUTOHSCROLL | WB_HSCROLL))
+ bCanHandleSmallerWidth = true;
+ if (nStyle && (WB_AUTOVSCROLL | WB_VSCROLL))
+ bCanHandleSmallerHeight = true;
+ }
+
Size aSize(GetOptimalSize());
- nWidth = std::max(nWidth,aSize.Width());
- nHeight = std::max(nHeight,aSize.Height());
+ if (!bCanHandleSmallerWidth)
+ nWidth = std::max(nWidth,aSize.Width());
+ if (!bCanHandleSmallerHeight)
+ nHeight = std::max(nHeight,aSize.Height());
Control::setPosSizePixel(nX, nY, nWidth, nHeight, nFlags);
- if (isLayoutEnabled(this) && (nFlags & WINDOW_POSSIZE_SIZE))
- VclContainer::setLayoutAllocation(*GetWindow(WINDOW_FIRSTCHILD), Point(0, 0), Size(nWidth, nHeight));
+ if (bIsLayoutEnabled && (nFlags & WINDOW_POSSIZE_SIZE))
+ VclContainer::setLayoutAllocation(*pChild, Point(0, 0), Size(nWidth, nHeight));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index fcb92e2a8a19..3ff834d4c9d3 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -145,8 +145,7 @@ ScrollBar::ScrollBar( Window* pParent, const ResId& rResId ) :
ScrollBar::~ScrollBar()
{
- if( mpData )
- delete mpData;
+ delete mpData;
}
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 1baf1c04135b..77762b50e68b 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -731,7 +731,7 @@ namespace
Button* extractStockAndBuildPushButton(Window *pParent, VclBuilder::stringmap &rMap)
{
- WinBits nBits = WB_CENTER|WB_VCENTER;
+ WinBits nBits = WB_CLIPCHILDREN|WB_CENTER|WB_VCENTER;
nBits |= extractRelief(rMap);
@@ -764,7 +764,7 @@ namespace
Button * extractStockAndBuildMenuButton(Window *pParent, VclBuilder::stringmap &rMap)
{
- WinBits nBits = WB_CENTER|WB_VCENTER|WB_3DLOOK;
+ WinBits nBits = WB_CLIPCHILDREN|WB_CENTER|WB_VCENTER|WB_3DLOOK;
nBits |= extractRelief(rMap);
@@ -1105,7 +1105,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
}
}
- if (bIsPlaceHolder || name == "GtkTreeSelection")
+ if (bIsPlaceHolder || name == "GtkTreeSelection" || name == "GtkViewport")
return NULL;
extractButtonImage(id, rMap, name == "GtkRadioButton");
@@ -1113,14 +1113,14 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
Window *pWindow = NULL;
if (name == "GtkDialog")
{
- WinBits nBits = WB_MOVEABLE|WB_3DLOOK|WB_CLOSEABLE;
+ WinBits nBits = WB_CLIPCHILDREN|WB_MOVEABLE|WB_3DLOOK|WB_CLOSEABLE;
if (extractResizable(rMap))
nBits |= WB_SIZEABLE;
pWindow = new Dialog(pParent, nBits);
}
else if (name == "GtkMessageDialog")
{
- WinBits nBits = WB_MOVEABLE|WB_3DLOOK|WB_CLOSEABLE;
+ WinBits nBits = WB_CLIPCHILDREN|WB_MOVEABLE|WB_3DLOOK|WB_CLOSEABLE;
if (extractResizable(rMap))
nBits |= WB_SIZEABLE;
pWindow = new MessageDialog(pParent, nBits);
@@ -1178,7 +1178,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
else if (name == "GtkRadioButton")
{
extractGroup(id, rMap);
- WinBits nBits = WB_CENTER|WB_VCENTER|WB_3DLOOK;
+ WinBits nBits = WB_CLIPCHILDREN|WB_CENTER|WB_VCENTER|WB_3DLOOK;
OString sWrap = extractCustomProperty(rMap);
if (!sWrap.isEmpty())
nBits |= WB_WORDBREAK;
@@ -1188,7 +1188,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
}
else if (name == "GtkCheckButton")
{
- WinBits nBits = WB_CENTER|WB_VCENTER|WB_3DLOOK;
+ WinBits nBits = WB_CLIPCHILDREN|WB_CENTER|WB_VCENTER|WB_3DLOOK;
OString sWrap = extractCustomProperty(rMap);
if (!sWrap.isEmpty())
nBits |= WB_WORDBREAK;
@@ -1208,7 +1208,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
OString sPattern = extractCustomProperty(rMap);
OString sUnit = extractUnit(sPattern);
- WinBits nBits = WB_LEFT|WB_BORDER|WB_3DLOOK;
+ WinBits nBits = WB_CLIPCHILDREN|WB_LEFT|WB_BORDER|WB_3DLOOK;
if (!id.endsWith("-nospin"))
nBits |= WB_SPIN | WB_REPEAT;
@@ -1254,7 +1254,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
OString sPattern = extractCustomProperty(rMap);
extractModel(id, rMap);
- WinBits nBits = WB_LEFT|WB_VCENTER|WB_3DLOOK;
+ WinBits nBits = WB_CLIPCHILDREN|WB_LEFT|WB_VCENTER|WB_3DLOOK;
bool bDropdown = VclBuilder::extractDropdown(rMap);
@@ -1312,7 +1312,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
OString sAdjustment = extractAdjustment(rMap);
extractModel(id, rMap);
- WinBits nBits = WB_LEFT|WB_VCENTER|WB_3DLOOK;
+ WinBits nBits = WB_CLIPCHILDREN|WB_LEFT|WB_VCENTER|WB_3DLOOK;
bool bDropdown = VclBuilder::extractDropdown(rMap);
@@ -1352,7 +1352,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
// everything over to SvTreeViewBox
//d) remove the users of makeSvTreeViewBox
extractModel(id, rMap);
- WinBits nWinStyle = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_SIMPLEMODE;
+ WinBits nWinStyle = WB_CLIPCHILDREN|WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_SIMPLEMODE;
OString sBorder = extractCustomProperty(rMap);
if (!sBorder.isEmpty())
nWinStyle |= WB_BORDER;
@@ -1433,7 +1433,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
{
extractBuffer(id, rMap);
- WinBits nWinStyle = WB_LEFT;
+ WinBits nWinStyle = WB_CLIPCHILDREN|WB_LEFT;
OString sBorder = extractCustomProperty(rMap);
if (!sBorder.isEmpty())
nWinStyle |= WB_BORDER;
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 7bfcb8cd1caa..977aee810800 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1573,9 +1573,46 @@ IMPL_LINK( VclExpander, ClickHdl, DisclosureButton*, pBtn )
return 0;
}
+VclScrolledWindow::VclScrolledWindow(Window *pParent, WinBits nStyle)
+ : VclBin(pParent, nStyle)
+ , m_bUserManagedScrolling(false)
+ , m_aVScroll(this, WB_HIDE | WB_VERT)
+ , m_aHScroll(this, WB_HIDE | WB_HORZ)
+ , m_aScrollBarBox(this, WB_HIDE)
+{
+ SetType(WINDOW_SCROLLWINDOW);
+
+ Link aLink( LINK( this, VclScrolledWindow, ScrollBarHdl ) );
+ m_aVScroll.SetScrollHdl(aLink);
+ m_aHScroll.SetScrollHdl(aLink);
+}
+
+IMPL_LINK_NOARG(VclScrolledWindow, ScrollBarHdl)
+{
+ Window *pChild = get_child();
+ if (!pChild)
+ return 1;
+
+ Point aWinPos;
+
+ if (m_aHScroll.IsVisible())
+ {
+ aWinPos.X() = -m_aHScroll.GetThumbPos();
+ }
+
+ if (m_aVScroll.IsVisible())
+ {
+ aWinPos.Y() = -m_aVScroll.GetThumbPos();
+ }
+
+ pChild->SetPosPixel(aWinPos);
+
+ return 1;
+}
+
const Window *VclScrolledWindow::get_child() const
{
- assert(GetChildCount() == 3);
+ assert(GetChildCount() == 4);
const WindowImpl* pWindowImpl = ImplGetWindowImpl();
return pWindowImpl->mpLastChild;
}
@@ -1593,15 +1630,38 @@ Size VclScrolledWindow::calculateRequisition() const
if (pChild && pChild->IsVisible())
aRet = getLayoutRequisition(*pChild);
- if (m_aVScroll.IsVisible())
+ if (GetStyle() & WB_VSCROLL)
aRet.Width() += getLayoutRequisition(m_aVScroll).Width();
- if (m_aHScroll.IsVisible())
+ if (GetStyle() & WB_HSCROLL)
aRet.Height() += getLayoutRequisition(m_aHScroll).Height();
return aRet;
}
+void VclScrolledWindow::InitScrollBars(const Size &rRequest)
+{
+ const Window *pChild = get_child();
+ if (!pChild || !pChild->IsVisible())
+ return;
+
+ Size aOutSize(getVisibleChildSize());
+
+ if (m_aVScroll.IsVisible())
+ {
+ m_aVScroll.SetRangeMax(rRequest.Height());
+ m_aVScroll.SetVisibleSize(aOutSize.Height());
+ m_aVScroll.SetPageSize(16);
+ }
+
+ if (m_aHScroll.IsVisible())
+ {
+ m_aHScroll.SetRangeMax(rRequest.Width());
+ m_aHScroll.SetVisibleSize(aOutSize.Width());
+ m_aHScroll.SetPageSize(16);
+ }
+}
+
void VclScrolledWindow::setAllocation(const Size &rAllocation)
{
Size aChildAllocation(rAllocation);
@@ -1611,26 +1671,61 @@ void VclScrolledWindow::setAllocation(const Size &rAllocation)
if (pChild && pChild->IsVisible())
aChildReq = getLayoutRequisition(*pChild);
+ long nAvailHeight = rAllocation.Width();
+ long nAvailWidth = rAllocation.Width();
+ // vert. ScrollBar
+ if (GetStyle() & WB_AUTOVSCROLL)
+ m_aVScroll.Show(nAvailHeight < aChildReq.Height());
+
if (m_aVScroll.IsVisible())
+ nAvailWidth -= getLayoutRequisition(m_aVScroll).Width();
+
+ // horz. ScrollBar
+ if (GetStyle() & WB_AUTOHSCROLL)
{
- long nScrollBarWidth = getLayoutRequisition(m_aVScroll).Width();
+ m_aHScroll.Show(nAvailWidth < aChildReq.Width());
+ nAvailHeight -= getLayoutRequisition(m_aHScroll).Height();
+
+ if (GetStyle() & WB_AUTOVSCROLL)
+ m_aVScroll.Show(nAvailHeight < aChildReq.Height());
+ }
+
+ Size aInnerSize(aChildAllocation);
+ long nScrollBarWidth, nScrollBarHeight;
+
+ if (m_aVScroll.IsVisible())
+ {
+ nScrollBarWidth = getLayoutRequisition(m_aVScroll).Width();
Point aScrollPos(rAllocation.Width() - nScrollBarWidth, 0);
Size aScrollSize(nScrollBarWidth, rAllocation.Height());
setLayoutAllocation(m_aVScroll, aScrollPos, aScrollSize);
aChildAllocation.Width() -= nScrollBarWidth;
+ aInnerSize.Width() -= nScrollBarWidth;
aChildAllocation.Height() = aChildReq.Height();
}
if (m_aHScroll.IsVisible())
{
- long nScrollBarHeight = getLayoutRequisition(m_aHScroll).Height();
+ nScrollBarHeight = getLayoutRequisition(m_aHScroll).Height();
Point aScrollPos(0, rAllocation.Height() - nScrollBarHeight);
Size aScrollSize(rAllocation.Width(), nScrollBarHeight);
setLayoutAllocation(m_aHScroll, aScrollPos, aScrollSize);
aChildAllocation.Height() -= nScrollBarHeight;
+ aInnerSize.Height() -= nScrollBarHeight;
aChildAllocation.Width() = aChildReq.Width();
}
+ if (m_aVScroll.IsVisible() && m_aHScroll.IsVisible())
+ {
+ Point aBoxPos(aInnerSize.Width(), aInnerSize.Height());
+ m_aScrollBarBox.SetPosSizePixel(aBoxPos, Size(nScrollBarWidth, nScrollBarHeight));
+ m_aScrollBarBox.Show();
+ }
+ else
+ {
+ m_aScrollBarBox.Hide();
+ }
+
if (pChild && pChild->IsVisible())
{
Point aChildPos(pChild->GetPosPixel());
@@ -1640,6 +1735,9 @@ void VclScrolledWindow::setAllocation(const Size &rAllocation)
aChildPos.Y() = 0;
setLayoutAllocation(*pChild, aChildPos, aChildAllocation);
}
+
+ if (!m_bUserManagedScrolling)
+ InitScrollBars(aChildReq);
}
Size VclScrolledWindow::getVisibleChildSize() const
@@ -1660,6 +1758,25 @@ bool VclScrolledWindow::set_property(const OString &rKey, const OString &rValue)
return bRet;
}
+long VclScrolledWindow::Notify(NotifyEvent& rNEvt)
+{
+ long nDone = 0;
+ if ( rNEvt.GetType() == EVENT_COMMAND )
+ {
+ const CommandEvent& rCEvt = *rNEvt.GetCommandEvent();
+ if ( rCEvt.GetCommand() == COMMAND_WHEEL )
+ {
+ const CommandWheelData* pData = rCEvt.GetWheelData();
+ if( !pData->GetModifier() && ( pData->GetMode() == COMMAND_WHEEL_SCROLL ) )
+ {
+ nDone = HandleScrollCommand(rCEvt, &m_aHScroll, &m_aVScroll);
+ }
+ }
+ }
+
+ return nDone ? nDone : VclBin::Notify( rNEvt );
+}
+
const Window *VclEventBox::get_child() const
{
const WindowImpl* pWindowImpl = ImplGetWindowImpl();
@@ -1919,7 +2036,7 @@ short MessageDialog::Execute()
m_pImage->set_valign(VCL_ALIGN_START);
m_pImage->Show();
- WinBits nWinStyle = WB_LEFT | WB_VCENTER | WB_WORDBREAK | WB_NOLABEL | WB_NOTABSTOP;
+ WinBits nWinStyle = WB_CLIPCHILDREN | WB_LEFT | WB_VCENTER | WB_WORDBREAK | WB_NOLABEL | WB_NOTABSTOP;
bool bHasSecondaryText = !m_sSecondaryString.isEmpty();