unify strip previews optimal size in one place
Change-Id: I6ae1073d013c9d9bbca39c505955436cd4950d1b
This commit is contained in:
@@ -748,7 +748,6 @@
|
|||||||
<property name="right_padding">12</property>
|
<property name="right_padding">12</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="svxlo-SvxFontPrevWindow" id="preview:border">
|
<object class="svxlo-SvxFontPrevWindow" id="preview:border">
|
||||||
<property name="height_request">100</property>
|
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<child internal-child="accessible">
|
<child internal-child="accessible">
|
||||||
|
@@ -646,7 +646,6 @@
|
|||||||
<property name="right_padding">12</property>
|
<property name="right_padding">12</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="svxlo-SvxFontPrevWindow" id="preview:border">
|
<object class="svxlo-SvxFontPrevWindow" id="preview:border">
|
||||||
<property name="height_request">100</property>
|
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<child internal-child="accessible">
|
<child internal-child="accessible">
|
||||||
|
@@ -516,7 +516,6 @@
|
|||||||
<property name="right_padding">12</property>
|
<property name="right_padding">12</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="svxlo-SvxFontPrevWindow" id="preview:border">
|
<object class="svxlo-SvxFontPrevWindow" id="preview:border">
|
||||||
<property name="height_request">100</property>
|
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="hexpand">True</property>
|
<property name="hexpand">True</property>
|
||||||
|
@@ -1,6 +1,41 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<interface>
|
<interface>
|
||||||
<!-- interface-requires gtk+ 3.0 -->
|
<!-- interface-requires gtk+ 3.0 -->
|
||||||
|
<object class="GtkAdjustment" id="adjustmentAMOUNT">
|
||||||
|
<property name="upper">100</property>
|
||||||
|
<property name="step_increment">1</property>
|
||||||
|
<property name="page_increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adjustmentCOUNT">
|
||||||
|
<property name="upper">100</property>
|
||||||
|
<property name="step_increment">1</property>
|
||||||
|
<property name="page_increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adjustmentDELAY">
|
||||||
|
<property name="upper">300</property>
|
||||||
|
<property name="step_increment">1</property>
|
||||||
|
<property name="page_increment">50</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkImage" id="imageDOWN">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="stock">gtk-go-down</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkImage" id="imageLEFT">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="stock">gtk-go-back</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkImage" id="imageRIGHT">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="stock">gtk-go-forward</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkImage" id="imageUP">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="stock">gtk-go-up</property>
|
||||||
|
</object>
|
||||||
<object class="GtkBox" id="TextAnimation">
|
<object class="GtkBox" id="TextAnimation">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
@@ -25,6 +60,7 @@
|
|||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="hexpand">True</property>
|
<property name="hexpand">True</property>
|
||||||
<property name="spacing">18</property>
|
<property name="spacing">18</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox" id="box1">
|
<object class="GtkBox" id="box1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@@ -68,7 +104,7 @@
|
|||||||
<object class="GtkBox" id="boxDIRECTION">
|
<object class="GtkBox" id="boxDIRECTION">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="halign">end</property>
|
<property name="halign">start</property>
|
||||||
<property name="hexpand">True</property>
|
<property name="hexpand">True</property>
|
||||||
<property name="spacing">12</property>
|
<property name="spacing">12</property>
|
||||||
<child>
|
<child>
|
||||||
@@ -505,41 +541,6 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<object class="GtkAdjustment" id="adjustmentAMOUNT">
|
|
||||||
<property name="upper">100</property>
|
|
||||||
<property name="step_increment">1</property>
|
|
||||||
<property name="page_increment">10</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkAdjustment" id="adjustmentCOUNT">
|
|
||||||
<property name="upper">100</property>
|
|
||||||
<property name="step_increment">1</property>
|
|
||||||
<property name="page_increment">10</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkAdjustment" id="adjustmentDELAY">
|
|
||||||
<property name="upper">300</property>
|
|
||||||
<property name="step_increment">1</property>
|
|
||||||
<property name="page_increment">50</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkImage" id="imageDOWN">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="stock">gtk-go-down</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkImage" id="imageLEFT">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="stock">gtk-go-back</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkImage" id="imageRIGHT">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="stock">gtk-go-forward</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkImage" id="imageUP">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="stock">gtk-go-up</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkListStore" id="liststoreEFFECT">
|
<object class="GtkListStore" id="liststoreEFFECT">
|
||||||
<columns>
|
<columns>
|
||||||
<!-- column-name gchararray1 -->
|
<!-- column-name gchararray1 -->
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<interface>
|
<interface>
|
||||||
<!-- interface-requires LibreOffice 1.0 -->
|
|
||||||
<!-- interface-requires gtk+ 3.0 -->
|
<!-- interface-requires gtk+ 3.0 -->
|
||||||
|
<!-- interface-requires LibreOffice 1.0 -->
|
||||||
<object class="GtkAdjustment" id="adjustment1">
|
<object class="GtkAdjustment" id="adjustment1">
|
||||||
<property name="lower">-100</property>
|
<property name="lower">-100</property>
|
||||||
<property name="upper">100</property>
|
<property name="upper">100</property>
|
||||||
@@ -364,7 +364,8 @@
|
|||||||
<object class="svxlo-SvxRectCtl" id="CTL_POSITION">
|
<object class="svxlo-SvxRectCtl" id="CTL_POSITION">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="vexpand">True</property>
|
<property name="halign">start</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">True</property>
|
<property name="expand">True</property>
|
||||||
|
@@ -226,7 +226,6 @@
|
|||||||
<property name="right_padding">12</property>
|
<property name="right_padding">12</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="svxlo-SvxFontPrevWindow" id="preview:border">
|
<object class="svxlo-SvxFontPrevWindow" id="preview:border">
|
||||||
<property name="height_request">100</property>
|
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<child internal-child="accessible">
|
<child internal-child="accessible">
|
||||||
|
@@ -34,6 +34,8 @@ Size SFX2_DLLPUBLIC getDrawPreviewOptimalSize(const Window *pReference);
|
|||||||
|
|
||||||
Size SFX2_DLLPUBLIC getDrawListBoxOptimalSize(const Window *pReference);
|
Size SFX2_DLLPUBLIC getDrawListBoxOptimalSize(const Window *pReference);
|
||||||
|
|
||||||
|
Size SFX2_DLLPUBLIC getPreviewStripSize(const Window *pReference);
|
||||||
|
|
||||||
OUString SFX2_DLLPUBLIC getWidestTime(const LocaleDataWrapper& rWrapper);
|
OUString SFX2_DLLPUBLIC getWidestTime(const LocaleDataWrapper& rWrapper);
|
||||||
|
|
||||||
OUString SFX2_DLLPUBLIC formatTime(const DateTime& rDateTime, const LocaleDataWrapper& rWrapper);
|
OUString SFX2_DLLPUBLIC formatTime(const DateTime& rDateTime, const LocaleDataWrapper& rWrapper);
|
||||||
|
@@ -397,6 +397,7 @@ public:
|
|||||||
|
|
||||||
virtual void Paint( const Rectangle& rRect );
|
virtual void Paint( const Rectangle& rRect );
|
||||||
virtual void Resize();
|
virtual void Resize();
|
||||||
|
virtual Size GetOptimalSize() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
|
@@ -45,8 +45,6 @@ private:
|
|||||||
SVX_DLLPRIVATE void SetFontSize(const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont);
|
SVX_DLLPRIVATE void SetFontSize(const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont);
|
||||||
SVX_DLLPRIVATE void SetFontLang(const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont);
|
SVX_DLLPRIVATE void SetFontLang(const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont);
|
||||||
|
|
||||||
Size m_aInitialSize;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SvxFontPrevWindow( Window* pParent, const ResId& rId );
|
SvxFontPrevWindow( Window* pParent, const ResId& rId );
|
||||||
SvxFontPrevWindow(Window* pParent, WinBits nStyle);
|
SvxFontPrevWindow(Window* pParent, WinBits nStyle);
|
||||||
|
@@ -48,6 +48,7 @@ public:
|
|||||||
virtual void Paint(const Rectangle& rRect);
|
virtual void Paint(const Rectangle& rRect);
|
||||||
virtual void Resize();
|
virtual void Resize();
|
||||||
virtual void MouseButtonDown( const MouseEvent& rMEvt );
|
virtual void MouseButtonDown( const MouseEvent& rMEvt );
|
||||||
|
virtual Size GetOptimalSize() const;
|
||||||
|
|
||||||
void SetAttributes( const SfxItemSet& rInAttrs );
|
void SetAttributes( const SfxItemSet& rInAttrs );
|
||||||
|
|
||||||
|
@@ -67,6 +67,11 @@ Size getDrawListBoxOptimalSize(const Window *pReference)
|
|||||||
return pReference->LogicToPixel(Size(88, 110), MAP_APPFONT);
|
return pReference->LogicToPixel(Size(88, 110), MAP_APPFONT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Size SFX2_DLLPUBLIC getPreviewStripSize(const Window *pReference)
|
||||||
|
{
|
||||||
|
return pReference->LogicToPixel(Size(70 , 40), MapMode(MAP_APPFONT));
|
||||||
|
}
|
||||||
|
|
||||||
OUString SFX2_DLLPUBLIC getWidestTime(const LocaleDataWrapper& rWrapper)
|
OUString SFX2_DLLPUBLIC getWidestTime(const LocaleDataWrapper& rWrapper)
|
||||||
{
|
{
|
||||||
Date aDate(22, 12, 2000);
|
Date aDate(22, 12, 2000);
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#include <tools/shl.hxx>
|
#include <tools/shl.hxx>
|
||||||
#include <vcl/builder.hxx>
|
#include <vcl/builder.hxx>
|
||||||
#include <vcl/svapp.hxx>
|
#include <vcl/svapp.hxx>
|
||||||
|
#include <sfx2/dialoghelper.hxx>
|
||||||
#include <svx/xtable.hxx>
|
#include <svx/xtable.hxx>
|
||||||
#include <svx/xpool.hxx>
|
#include <svx/xpool.hxx>
|
||||||
#include <svx/dialogs.hrc>
|
#include <svx/dialogs.hrc>
|
||||||
@@ -107,7 +107,7 @@ void SvxRectCtl::SetControlSettings(RECT_POINT eRpt, sal_uInt16 nBorder, sal_uIn
|
|||||||
|
|
||||||
Size SvxRectCtl::GetOptimalSize() const
|
Size SvxRectCtl::GetOptimalSize() const
|
||||||
{
|
{
|
||||||
return LogicToPixel(Size(39, 39), MAP_APPFONT);
|
return LogicToPixel(Size(78, 39), MAP_APPFONT);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxRectCtl(Window *pParent, VclBuilder::stringmap &)
|
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxRectCtl(Window *pParent, VclBuilder::stringmap &)
|
||||||
@@ -1838,6 +1838,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxXLinePreview(Window *pPa
|
|||||||
return new SvxXLinePreview(pParent);
|
return new SvxXLinePreview(pParent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Size SvxXLinePreview::GetOptimalSize() const
|
||||||
|
{
|
||||||
|
return getPreviewStripSize(this);
|
||||||
|
}
|
||||||
|
|
||||||
SvxXLinePreview::~SvxXLinePreview()
|
SvxXLinePreview::~SvxXLinePreview()
|
||||||
{
|
{
|
||||||
SdrObject *pFoo = mpLineObjA;
|
SdrObject *pFoo = mpLineObjA;
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <sfx2/dialoghelper.hxx>
|
||||||
#include <sfx2/viewsh.hxx> // SfxViewShell
|
#include <sfx2/viewsh.hxx> // SfxViewShell
|
||||||
#include <sfx2/printer.hxx> // Printer
|
#include <sfx2/printer.hxx> // Printer
|
||||||
#include <vcl/builder.hxx>
|
#include <vcl/builder.hxx>
|
||||||
@@ -502,14 +503,12 @@ void SvxFontPrevWindow::Init()
|
|||||||
SvxFontPrevWindow::SvxFontPrevWindow( Window* pParent, const ResId& rId ) :
|
SvxFontPrevWindow::SvxFontPrevWindow( Window* pParent, const ResId& rId ) :
|
||||||
Window( pParent, rId )
|
Window( pParent, rId )
|
||||||
{
|
{
|
||||||
m_aInitialSize = GetSizePixel();
|
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
SvxFontPrevWindow::SvxFontPrevWindow(Window* pParent, WinBits nStyle)
|
SvxFontPrevWindow::SvxFontPrevWindow(Window* pParent, WinBits nStyle)
|
||||||
: Window(pParent, nStyle)
|
: Window(pParent, nStyle)
|
||||||
{
|
{
|
||||||
m_aInitialSize = LogicToPixel(Size(70 , 27), MapMode(MAP_APPFONT));
|
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1499,7 +1498,7 @@ void SvxFontPrevWindow::SetFontEscapement( sal_uInt8 nProp, sal_uInt8 nEscProp,
|
|||||||
|
|
||||||
Size SvxFontPrevWindow::GetOptimalSize() const
|
Size SvxFontPrevWindow::GetOptimalSize() const
|
||||||
{
|
{
|
||||||
return m_aInitialSize;
|
return getPreviewStripSize(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@@ -17,13 +17,13 @@
|
|||||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <sfx2/dialoghelper.hxx>
|
||||||
#include <svx/svdomeas.hxx>
|
#include <svx/svdomeas.hxx>
|
||||||
#include <svx/svdmodel.hxx>
|
#include <svx/svdmodel.hxx>
|
||||||
#include <vcl/builder.hxx>
|
|
||||||
|
|
||||||
#include "svx/measctrl.hxx"
|
#include "svx/measctrl.hxx"
|
||||||
#include <svx/dialmgr.hxx>
|
#include <svx/dialmgr.hxx>
|
||||||
#include "svx/dlgutil.hxx"
|
#include "svx/dlgutil.hxx"
|
||||||
|
#include <vcl/builder.hxx>
|
||||||
|
|
||||||
SvxXMeasurePreview::SvxXMeasurePreview( Window* pParent,const ResId& rResId,const SfxItemSet& rInAttrs)
|
SvxXMeasurePreview::SvxXMeasurePreview( Window* pParent,const ResId& rResId,const SfxItemSet& rInAttrs)
|
||||||
: Control ( pParent, rResId )
|
: Control ( pParent, rResId )
|
||||||
@@ -98,6 +98,10 @@ extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxXMeasurePreview(Window *
|
|||||||
return new SvxXMeasurePreview(pParent, nWinStyle);
|
return new SvxXMeasurePreview(pParent, nWinStyle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Size SvxXMeasurePreview::GetOptimalSize() const
|
||||||
|
{
|
||||||
|
return getPreviewStripSize(this);
|
||||||
|
}
|
||||||
|
|
||||||
SvxXMeasurePreview::~SvxXMeasurePreview()
|
SvxXMeasurePreview::~SvxXMeasurePreview()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user