[Libreoffice-commits] core.git: cui/source cui/uiconfig
Rishabh Kumar
kris.kr296 at gmail.com
Wed May 18 13:05:24 UTC 2016
cui/source/inc/cuitabarea.hxx | 15 +-
cui/source/tabpages/tparea.cxx | 136 +-------------------------
cui/source/tabpages/tpgradnt.cxx | 56 ++++++++--
cui/uiconfig/ui/areatabpage.ui | 96 ------------------
cui/uiconfig/ui/gradientpage.ui | 199 ++++++++++++++++++++++++++++++---------
5 files changed, 219 insertions(+), 283 deletions(-)
New commits:
commit fe3d9ac20b0f27b8beca7e54efa8ba571e76101d
Author: Rishabh Kumar <kris.kr296 at gmail.com>
Date: Tue May 17 18:00:35 2016 +0530
Addition of new controls and their rearrangement in gradient tab
1. Addition of increment spin box and slider in gradient tab.
2. Addition of slider for border controls in gradient tab.
3. Rearrangement of controls.
4. Removal of gradient controls from Area tab.
Change-Id: I56c3767a0d54990338982cd45ed10a10dd8a94c1
Reviewed-on: https://gerrit.libreoffice.org/24910
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index dfffa39..c8235fe 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -22,6 +22,7 @@
#include <svtools/valueset.hxx>
#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
+#include <vcl/slider.hxx>
#include <svx/dlgctrl.hxx>
#include <svx/xsetit.hxx>
#include <svx/xfillit0.hxx>
@@ -192,10 +193,6 @@ private:
VclPtr<BitmapLB> m_pLbBitmap;
VclPtr<SvxXRectPreview> m_pCtlBitmapPreview;
- VclPtr<TriStateBox> m_pTsbStepCount;
- VclPtr<VclFrame> m_pFlStepCount;
- VclPtr<NumericField> m_pNumFldStepCount;
-
VclPtr<VclFrame> m_pFlHatchBckgrd;
VclPtr<CheckBox> m_pCbxHatchBckgrd;
VclPtr<ColorLB> m_pLbHatchBckgrdColor;
@@ -272,8 +269,6 @@ private:
DECL_LINK_TYPED( ModifyHatchingHdl_Impl, ListBox&, void );
DECL_LINK_TYPED( ToggleHatchBckgrdColorHdl_Impl, CheckBox&, void );
DECL_LINK_TYPED( ModifyBitmapHdl_Impl, ListBox&, void );
- DECL_LINK_TYPED( ModifyStepCountEditHdl_Impl, Edit&, void );
- DECL_LINK_TYPED( ModifyStepCountClickHdl_Impl, Button*, void );
void ModifyStepCountHdl_Impl(void*);
//UUUU
@@ -390,25 +385,26 @@ class SvxGradientTabPage : public SfxTabPage
private:
VclPtr<ListBox> m_pLbGradientType;
- VclPtr<FixedText> m_pFtCenterX;
+ VclPtr<FixedText> m_pFtCenter;
VclPtr<MetricField> m_pMtrCenterX;
- VclPtr<FixedText> m_pFtCenterY;
VclPtr<MetricField> m_pMtrCenterY;
VclPtr<FixedText> m_pFtAngle;
VclPtr<MetricField> m_pMtrAngle;
VclPtr<MetricField> m_pMtrBorder;
+ VclPtr<Slider> m_pSliderBorder;
VclPtr<ColorLB> m_pLbColorFrom;
VclPtr<MetricField> m_pMtrColorFrom;
VclPtr<ColorLB> m_pLbColorTo;
VclPtr<MetricField> m_pMtrColorTo;
VclPtr<GradientLB> m_pLbGradients;
+ VclPtr<MetricField> m_pMtrIncrement;
+ VclPtr<Slider> m_pSliderIncrement;
VclPtr<SvxXRectPreview> m_pCtlPreview;
VclPtr<PushButton> m_pBtnAdd;
VclPtr<PushButton> m_pBtnModify;
VclPtr<PushButton> m_pBtnDelete;
VclPtr<PushButton> m_pBtnLoad;
VclPtr<PushButton> m_pBtnSave;
-
const SfxItemSet& m_rOutAttrs;
XColorListRef m_pColorList;
@@ -432,6 +428,7 @@ private:
DECL_LINK_TYPED( ChangeGradientHdl_Impl, ListBox&, void );
DECL_LINK_TYPED( ModifiedEditHdl_Impl, Edit&, void );
DECL_LINK_TYPED( ModifiedListBoxHdl_Impl, ListBox&, void );
+ DECL_LINK_TYPED( ModifiedSliderHdl_Impl, Slider*, void );
DECL_LINK_TYPED( ClickLoadHdl_Impl, Button*, void );
DECL_LINK_TYPED( ClickSaveHdl_Impl, Button*, void );
void ModifiedHdl_Impl(void*);
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 4ab7c8e..4b0faa3 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -44,6 +44,8 @@
#include "sfx2/opengrf.hxx"
#include <vcl/layout.hxx>
+#define DEFAULT_GRADIENTSTEP 64
+
using namespace com::sun::star;
// static ----------------------------------------------------------------
@@ -113,10 +115,6 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs
get(m_pLbBitmap,"LB_BITMAP");
get(m_pCtlBitmapPreview,"CTL_BITMAP_PREVIEW");
- get(m_pTsbStepCount,"TSB_STEPCOUNT");
- get(m_pFlStepCount,"FL_STEPCOUNT");
- get(m_pNumFldStepCount,"NUM_FLD_STEPCOUNT");
-
get(m_pFlHatchBckgrd,"FL_HATCHCOLORS");
get(m_pLbHatchBckgrdColor,"LB_HATCHBCKGRDCOLOR");
get(m_pCbxHatchBckgrd,"CB_HATCHBCKGRD");
@@ -153,12 +151,11 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs
//size required for any of the areas which might be selected
//later, so that there's sufficient space
VclContainer *pMainFrame = get<VclContainer>("mainframe");
- Size aIncrementsSize(m_pFlStepCount->get_preferred_size());
Size aHatchSize(m_pFlHatchBckgrd->get_preferred_size());
Size aBitmapSize(m_pBxBitmap->get_preferred_size());
Size aMainFrame(
- std::max(std::max(aIncrementsSize.Width(), aHatchSize.Width()), aBitmapSize.Width()),
- std::max(std::max(aIncrementsSize.Height(), aHatchSize.Height()), aBitmapSize.Height()));
+ std::max(aHatchSize.Width(), aBitmapSize.Width()),
+ std::max(aHatchSize.Height(), aBitmapSize.Height()));
pMainFrame->set_width_request(aMainFrame.Width());
pMainFrame->set_height_request(aMainFrame.Height());
@@ -167,8 +164,6 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs
m_pLbBitmap->Hide();
m_pCtlBitmapPreview->Hide();
- m_pFlStepCount->Hide();
-
m_pBxBitmap->Hide();
// Controls for Hatch-Background
@@ -214,9 +209,6 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs
m_pLbHatching->SetSelectHdl( LINK( this, SvxAreaTabPage, ModifyHatchingHdl_Impl ) );
m_pLbBitmap->SetSelectHdl( LINK( this, SvxAreaTabPage, ModifyBitmapHdl_Impl ) );
- m_pTsbStepCount->SetClickHdl( LINK( this, SvxAreaTabPage, ModifyStepCountClickHdl_Impl ) );
- m_pNumFldStepCount->SetModifyHdl( LINK( this, SvxAreaTabPage, ModifyStepCountEditHdl_Impl ) );
-
Link<Edit&,void> aLink( LINK( this, SvxAreaTabPage, ModifyTileHdl_Impl ) );
Link<Button*,void> aClickLink( LINK( this, SvxAreaTabPage, ModifyTileClickHdl_Impl ) );
m_pTsbTile->SetClickHdl( aClickLink );
@@ -272,9 +264,6 @@ void SvxAreaTabPage::dispose()
m_pLbHatching.clear();
m_pLbBitmap.clear();
m_pCtlBitmapPreview.clear();
- m_pTsbStepCount.clear();
- m_pFlStepCount.clear();
- m_pNumFldStepCount.clear();
m_pFlHatchBckgrd.clear();
m_pCbxHatchBckgrd.clear();
m_pLbHatchBckgrdColor.clear();
@@ -694,39 +683,6 @@ bool SvxAreaTabPage::FillItemSet( SfxItemSet* rAttrs )
break;
}
- // step size
- if( m_pTsbStepCount->IsEnabled() )
- {
- sal_uInt16 nValue = 0;
- bool bValueModified = false;
- TriState eState = m_pTsbStepCount->GetState();
- if( eState == TRISTATE_TRUE )
- {
- if( m_pTsbStepCount->IsValueChangedFromSaved() )
- bValueModified = true;
- }
- else
- {
- // condition != Disabled ?
- if( !m_pNumFldStepCount->GetText().isEmpty() )
- {
- nValue = (sal_uInt16) m_pNumFldStepCount->GetValue();
- if( m_pNumFldStepCount->IsValueChangedFromSaved() )
- bValueModified = true;
- }
- }
- if( bValueModified )
- {
- XGradientStepCountItem aFillBitmapItem( nValue );
- pOld = GetOldItem( *rAttrs, XATTR_GRADIENTSTEPCOUNT );
- if ( !pOld || !( *static_cast<const XGradientStepCountItem*>(pOld) == aFillBitmapItem ) )
- {
- rAttrs->Put( aFillBitmapItem );
- bModified = true;
- }
- }
- }
-
if( m_pTsbTile->IsEnabled() )
{
TriState eState = m_pTsbTile->GetState();
@@ -1078,30 +1034,6 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs )
m_pTypeLB->SetNoSelection();
}
- // step size
- if( ( rAttrs->GetItemState( XATTR_GRADIENTSTEPCOUNT ) != SfxItemState::DONTCARE ) ||
- ( rAttrs->GetItemState( XATTR_FILLSTYLE ) != SfxItemState::DONTCARE ) )
- {
- m_pTsbStepCount->EnableTriState( false );
- sal_uInt16 nValue = static_cast<const XGradientStepCountItem&>( rAttrs->Get( XATTR_GRADIENTSTEPCOUNT ) ).GetValue();
- if( nValue == 0 )
- {
- m_pTsbStepCount->SetState( TRISTATE_TRUE );
- m_pNumFldStepCount->SetText( "" );
- }
- else
- {
- m_pTsbStepCount->SetState( TRISTATE_FALSE );
- m_pNumFldStepCount->SetValue( nValue );
- }
- ModifyStepCountHdl_Impl( m_pTsbStepCount );
- }
- else
- {
- m_pTsbStepCount->SetState( TRISTATE_INDET );
- m_pNumFldStepCount->SetText( "" );
- }
-
// attributes for the bitmap filling
if( rAttrs->GetItemState( XATTR_FILLBMP_TILE ) != SfxItemState::DONTCARE )
@@ -1276,8 +1208,6 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs )
m_pLbHatchBckgrdColor->SaveValue();
if (!isMissingBitmap)
m_pLbBitmap->SaveValue();
- m_pTsbStepCount->SaveValue();
- m_pNumFldStepCount->SaveValue();
m_pTsbTile->SaveValue();
m_pTsbStretch->SaveValue();
m_pTsbScale->SaveValue();
@@ -1298,8 +1228,6 @@ void SvxAreaTabPage::ChangesApplied()
m_pLbHatching->SaveValue();
m_pLbHatchBckgrdColor->SaveValue();
m_pLbBitmap->SaveValue();
- m_pTsbStepCount->SaveValue();
- m_pNumFldStepCount->SaveValue();
m_pTsbTile->SaveValue();
m_pTsbStretch->SaveValue();
m_pTsbScale->SaveValue();
@@ -1340,8 +1268,6 @@ void SvxAreaTabPage::ClickInvisibleHdl_Impl()
m_pCtlXRectPreview->Hide();
m_pCtlBitmapPreview->Hide();
- m_pFlStepCount->Hide();
-
// Controls for Hatch-Background
m_pFlHatchBckgrd->Hide();
@@ -1368,8 +1294,6 @@ void SvxAreaTabPage::ClickColorHdl_Impl()
m_pCtlXRectPreview->Show();
m_pCtlBitmapPreview->Hide();
- m_pFlStepCount->Hide();
-
// Controls for Hatch-Background
m_pFlHatchBckgrd->Hide();
@@ -1416,17 +1340,10 @@ void SvxAreaTabPage::ClickGradientHdl_Impl()
m_pCtlXRectPreview->Show();
m_pCtlBitmapPreview->Hide();
- m_pFlStepCount->Enable();
- m_pFlStepCount->Show();
- m_pTsbStepCount->Enable();
- m_pTsbStepCount->Show();
- m_pNumFldStepCount->Show();
-
// Controls for Hatch-Background
m_pFlHatchBckgrd->Hide();
ModifyGradientHdl_Impl( *m_pLbGradient );
- ModifyStepCountHdl_Impl( m_pTsbStepCount );
}
@@ -1450,6 +1367,11 @@ IMPL_LINK_NOARG_TYPED(SvxAreaTabPage, ModifyGradientHdl_Impl, ListBox&, void)
else
m_rXFSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) );
+ sal_uInt16 nValue = static_cast<const XGradientStepCountItem&>( m_rOutAttrs.Get( XATTR_GRADIENTSTEPCOUNT ) ).GetValue();
+ if( nValue == 0 )
+ nValue = DEFAULT_GRADIENTSTEP;
+ m_rXFSet.Put( XGradientStepCountItem( nValue ) );
+
m_pCtlXRectPreview->SetAttributes( m_aXFillAttr.GetItemSet() );
m_pCtlXRectPreview->Invalidate();
}
@@ -1467,8 +1389,6 @@ void SvxAreaTabPage::ClickHatchingHdl_Impl()
m_pCtlXRectPreview->Show();
m_pCtlBitmapPreview->Hide();
- m_pFlStepCount->Hide();
-
m_pBxBitmap->Hide();
// Controls for Hatch-Background
@@ -1576,8 +1496,6 @@ void SvxAreaTabPage::ClickBitmapHdl_Impl()
m_pCtlBitmapPreview->Show();
m_pCtlXRectPreview->Hide();
- m_pFlStepCount->Hide();
-
m_pBxTile->Enable();
m_pFlSize->Enable();
@@ -1626,42 +1544,6 @@ IMPL_LINK_NOARG_TYPED(SvxAreaTabPage, ModifyBitmapHdl_Impl, ListBox&, void)
m_pCtlBitmapPreview->Invalidate();
}
-
-IMPL_LINK_TYPED( SvxAreaTabPage, ModifyStepCountClickHdl_Impl, Button*, p, void )
-{
- ModifyStepCountHdl_Impl(p);
-}
-IMPL_LINK_TYPED( SvxAreaTabPage, ModifyStepCountEditHdl_Impl, Edit&, r, void )
-{
- ModifyStepCountHdl_Impl(&r);
-}
-void SvxAreaTabPage::ModifyStepCountHdl_Impl( void* p )
-{
- if( p == m_pTsbStepCount )
- {
- if( m_pTsbStepCount->GetState() == TRISTATE_FALSE )
- {
- if( m_pNumFldStepCount->GetText().isEmpty() )
- m_pNumFldStepCount->SetText("64");
-
- m_pNumFldStepCount->Enable();
- }
- else
- m_pNumFldStepCount->Disable();
- }
-
- sal_uInt16 nValue = 0;
- if( m_pTsbStepCount->GetState() != TRISTATE_TRUE )
- {
- // condition != Disabled ?
- if( !m_pNumFldStepCount->GetText().isEmpty() )
- nValue = (sal_uInt16) m_pNumFldStepCount->GetValue();
- }
- m_rXFSet.Put( XGradientStepCountItem( nValue ) );
- m_pCtlXRectPreview->SetAttributes( m_aXFillAttr.GetItemSet() );
- m_pCtlXRectPreview->Invalidate();
-}
-
IMPL_LINK_NOARG_TYPED( SvxAreaTabPage, ClickImportHdl_Impl, Button*, void )
{
ResMgr& rMgr = CUI_MGR();
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index c87694a..f56afab 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -41,6 +41,8 @@
#include <svx/dialogs.hrc>
#include "paragrph.hrc"
+#define DEFAULT_GRADIENTSTEP 64
+
using namespace com::sun::star;
SvxGradientTabPage::SvxGradientTabPage
@@ -64,14 +66,16 @@ SvxGradientTabPage::SvxGradientTabPage
m_aXFillAttr ( rInAttrs.GetPool() ),
m_rXFSet ( m_aXFillAttr.GetItemSet() )
{
+ get(m_pMtrIncrement, "incrementmtr");
+ get(m_pSliderIncrement,"incrementslider");
get(m_pLbGradientType, "gradienttypelb");
- get(m_pFtCenterX, "centerxft");
+ get(m_pFtCenter, "centerft");
get(m_pMtrCenterX, "centerxmtr");
- get(m_pFtCenterY, "centeryft");
get(m_pMtrCenterY, "centerymtr");
get(m_pFtAngle, "angleft");
get(m_pMtrAngle, "anglemtr");
get(m_pMtrBorder, "bordermtr");
+ get(m_pSliderBorder, "borderslider");
get(m_pLbColorFrom, "colorfromlb");
get(m_pMtrColorFrom, "colorfrommtr");
get(m_pLbColorTo, "colortolb");
@@ -98,8 +102,10 @@ SvxGradientTabPage::SvxGradientTabPage
// as long as NOT supported by the item
+ m_pSliderIncrement->SetRange(Range(3,256));
m_pMtrColorTo->SetValue( 100 );
m_pMtrColorFrom->SetValue( 100 );
+ m_pSliderBorder->SetRange(Range(0,100));
// setting the output device
m_rXFSet.Put( m_aXFStyleItem );
@@ -118,10 +124,13 @@ SvxGradientTabPage::SvxGradientTabPage
Link<Edit&,void> aLink = LINK( this, SvxGradientTabPage, ModifiedEditHdl_Impl );
Link<ListBox&,void> aLink2 = LINK( this, SvxGradientTabPage, ModifiedListBoxHdl_Impl );
m_pLbGradientType->SetSelectHdl( aLink2 );
+ m_pMtrIncrement->SetModifyHdl( aLink );
+ m_pSliderIncrement->SetSlideHdl( LINK( this, SvxGradientTabPage, ModifiedSliderHdl_Impl ) );
m_pMtrCenterX->SetModifyHdl( aLink );
m_pMtrCenterY->SetModifyHdl( aLink );
m_pMtrAngle->SetModifyHdl( aLink );
m_pMtrBorder->SetModifyHdl( aLink );
+ m_pSliderBorder->SetSlideHdl( LINK( this, SvxGradientTabPage, ModifiedSliderHdl_Impl ) );
m_pMtrColorFrom->SetModifyHdl( aLink );
m_pLbColorFrom->SetSelectHdl( aLink2 );
m_pMtrColorTo->SetModifyHdl( aLink );
@@ -145,14 +154,16 @@ SvxGradientTabPage::~SvxGradientTabPage()
void SvxGradientTabPage::dispose()
{
+ m_pMtrIncrement.clear();
+ m_pSliderIncrement.clear();
m_pLbGradientType.clear();
- m_pFtCenterX.clear();
+ m_pFtCenter.clear();
m_pMtrCenterX.clear();
- m_pFtCenterY.clear();
m_pMtrCenterY.clear();
m_pFtAngle.clear();
m_pMtrAngle.clear();
m_pMtrBorder.clear();
+ m_pSliderBorder.clear();
m_pLbColorFrom.clear();
m_pMtrColorFrom.clear();
m_pLbColorTo.clear();
@@ -339,6 +350,7 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet )
std::unique_ptr<XGradient> pXGradient;
OUString aString;
sal_Int32 nPos = m_pLbGradients->GetSelectEntryPos();
+ sal_uInt16 nValue = m_pMtrIncrement->GetValue();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
pXGradient.reset(new XGradient( m_pGradientList->GetGradient( nPos )->GetGradient() ));
@@ -361,6 +373,7 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet )
DBG_ASSERT( pXGradient, "XGradient konnte nicht erzeugt werden" );
rSet->Put( XFillStyleItem( drawing::FillStyle_GRADIENT ) );
rSet->Put( XFillGradientItem( aString, *pXGradient ) );
+ rSet->Put( XGradientStepCountItem( nValue ) );
}
return true;
}
@@ -402,8 +415,21 @@ IMPL_LINK_TYPED( SvxGradientTabPage, ModifiedEditHdl_Impl, Edit&, rBox, void )
{
ModifiedHdl_Impl(&rBox);
}
+IMPL_LINK_TYPED( SvxGradientTabPage, ModifiedSliderHdl_Impl, Slider*, rSlider, void )
+{
+ ModifiedHdl_Impl(rSlider);
+}
void SvxGradientTabPage::ModifiedHdl_Impl( void* pControl )
{
+ if( pControl == m_pMtrBorder )
+ m_pSliderBorder->SetThumbPos( m_pMtrBorder->GetValue() );
+ if( pControl == m_pSliderBorder )
+ m_pMtrBorder->SetValue( m_pSliderBorder->GetThumbPos() );
+ if( pControl == m_pMtrIncrement )
+ m_pSliderIncrement->SetThumbPos( m_pMtrIncrement->GetValue() );
+ if(pControl == m_pSliderIncrement)
+ m_pMtrIncrement->SetValue( m_pSliderIncrement->GetThumbPos() );
+
css::awt::GradientStyle eXGS = (css::awt::GradientStyle) m_pLbGradientType->GetSelectEntryPos();
XGradient aXGradient( m_pLbColorFrom->GetSelectEntryColor(),
@@ -420,6 +446,9 @@ void SvxGradientTabPage::ModifiedHdl_Impl( void* pControl )
if( pControl == m_pLbGradientType || pControl == this )
SetControlState_Impl( eXGS );
+ sal_uInt16 nValue = (sal_uInt16)m_pMtrIncrement->GetValue();
+ m_rXFSet.Put( XGradientStepCountItem( nValue ) );
+
// displaying in XOutDev
m_rXFSet.Put( XFillGradientItem( OUString(), aXGradient ) );
m_pCtlPreview->SetAttributes( m_aXFillAttr.GetItemSet() );
@@ -827,7 +856,12 @@ IMPL_LINK_NOARG_TYPED(SvxGradientTabPage, ChangeGradientHdl_Impl, ListBox&, void
if( pGradient )
{
css::awt::GradientStyle eXGS = pGradient->GetGradientStyle();
+ sal_uInt16 nValue = static_cast<const XGradientStepCountItem&>( m_rOutAttrs.Get( XATTR_GRADIENTSTEPCOUNT ) ).GetValue();
+ if(nValue == 0)
+ nValue = DEFAULT_GRADIENTSTEP;
+ m_pMtrIncrement->SetValue( nValue );
+ m_pSliderIncrement->SetThumbPos( nValue );
m_pLbGradientType->SelectEntryPos(
sal::static_int_cast< sal_Int32 >( eXGS ) );
// if the entry is not in the listbox,
@@ -852,6 +886,7 @@ IMPL_LINK_NOARG_TYPED(SvxGradientTabPage, ChangeGradientHdl_Impl, ListBox&, void
m_pMtrAngle->SetValue( pGradient->GetAngle() / 10 ); // should be changed in resource
m_pMtrBorder->SetValue( pGradient->GetBorder() );
+ m_pSliderBorder->SetThumbPos( pGradient->GetBorder() );
m_pMtrCenterX->SetValue( pGradient->GetXOffset() );
m_pMtrCenterY->SetValue( pGradient->GetYOffset() );
m_pMtrColorFrom->SetValue( pGradient->GetStartIntens() );
@@ -862,6 +897,7 @@ IMPL_LINK_NOARG_TYPED(SvxGradientTabPage, ChangeGradientHdl_Impl, ListBox&, void
// fill ItemSet and pass it on to aCtlPreview
m_rXFSet.Put( XFillGradientItem( OUString(), *pGradient ) );
+ m_rXFSet.Put( XGradientStepCountItem( nValue ) );
m_pCtlPreview->SetAttributes( m_aXFillAttr.GetItemSet() );
m_pCtlPreview->Invalidate();
@@ -875,27 +911,24 @@ void SvxGradientTabPage::SetControlState_Impl( css::awt::GradientStyle eXGS )
{
case css::awt::GradientStyle_LINEAR:
case css::awt::GradientStyle_AXIAL:
- m_pFtCenterX->Disable();
+ m_pFtCenter->Disable();
m_pMtrCenterX->Disable();
- m_pFtCenterY->Disable();
m_pMtrCenterY->Disable();
m_pFtAngle->Enable();
m_pMtrAngle->Enable();
break;
case css::awt::GradientStyle_RADIAL:
- m_pFtCenterX->Enable();
+ m_pFtCenter->Enable();
m_pMtrCenterX->Enable();
- m_pFtCenterY->Enable();
m_pMtrCenterY->Enable();
m_pFtAngle->Disable();
m_pMtrAngle->Disable();
break;
case css::awt::GradientStyle_ELLIPTICAL:
- m_pFtCenterX->Enable();
+ m_pFtCenter->Enable();
m_pMtrCenterX->Enable();
- m_pFtCenterY->Enable();
m_pMtrCenterY->Enable();
m_pFtAngle->Enable();
m_pMtrAngle->Enable();
@@ -903,9 +936,8 @@ void SvxGradientTabPage::SetControlState_Impl( css::awt::GradientStyle eXGS )
case css::awt::GradientStyle_SQUARE:
case css::awt::GradientStyle_RECT:
- m_pFtCenterX->Enable();
+ m_pFtCenter->Enable();
m_pMtrCenterX->Enable();
- m_pFtCenterY->Enable();
m_pMtrCenterY->Enable();
m_pFtAngle->Enable();
m_pMtrAngle->Enable();
diff --git a/cui/uiconfig/ui/areatabpage.ui b/cui/uiconfig/ui/areatabpage.ui
index b9bf6de..459457f 100644
--- a/cui/uiconfig/ui/areatabpage.ui
+++ b/cui/uiconfig/ui/areatabpage.ui
@@ -3,13 +3,6 @@
<interface>
<requires lib="gtk+" version="3.0"/>
<!-- interface-requires LibreOffice 1.0 -->
- <object class="GtkAdjustment" id="adjustment1">
- <property name="lower">3</property>
- <property name="upper">256</property>
- <property name="value">64</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
<object class="GtkAdjustment" id="adjustment2">
<property name="upper">100</property>
<property name="step_increment">1</property>
@@ -227,85 +220,6 @@
<property name="hexpand">True</property>
<property name="orientation">vertical</property>
<child>
- <object class="GtkFrame" id="FL_STEPCOUNT">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <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="GtkBox" id="box6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkCheckButton" id="TSB_STEPCOUNT">
- <property name="label" translatable="yes">_Automatic</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="inconsistent">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkAlignment" id="alignment8">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkSpinButton" id="NUM_FLD_STEPCOUNT">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="invisible_char">•</property>
- <property name="adjustment">adjustment1</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Increments</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="FL_HATCHCOLORS">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -378,7 +292,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
@@ -620,7 +534,7 @@
<property name="can_focus">True</property>
<property name="halign">start</property>
<property name="invisible_char">•</property>
- <property name="text" translatable="no">0</property>
+ <property name="text">0</property>
<property name="adjustment">adjustment2</property>
</object>
<packing>
@@ -666,7 +580,7 @@
<property name="can_focus">True</property>
<property name="halign">start</property>
<property name="invisible_char">•</property>
- <property name="text" translatable="no">0</property>
+ <property name="text">0</property>
<property name="adjustment">adjustment2</property>
</object>
<packing>
@@ -804,7 +718,7 @@
<property name="can_focus">True</property>
<property name="halign">start</property>
<property name="invisible_char">•</property>
- <property name="text" translatable="no">0</property>
+ <property name="text">0</property>
<property name="adjustment">adjustment2</property>
</object>
<packing>
@@ -870,7 +784,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
diff --git a/cui/uiconfig/ui/gradientpage.ui b/cui/uiconfig/ui/gradientpage.ui
index f09ecd5..69eedbd 100644
--- a/cui/uiconfig/ui/gradientpage.ui
+++ b/cui/uiconfig/ui/gradientpage.ui
@@ -1,8 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.16.1 -->
<interface>
<requires lib="gtk+" version="3.0"/>
- <requires lib="LibreOffice" version="1.0"/>
+ <!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="lower">3</property>
+ <property name="upper">256</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
<object class="GtkAdjustment" id="angleadjustment">
<property name="upper">359</property>
<property name="step_increment">15</property>
@@ -59,6 +65,26 @@
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
+ <object class="GtkComboBoxText" id="gradienttypelb">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <items>
+ <item translatable="yes">Linear</item>
+ <item translatable="yes">Axial</item>
+ <item translatable="yes">Radial</item>
+ <item translatable="yes">Ellipsoid</item>
+ <item translatable="yes">Quadratic</item>
+ <item translatable="yes">Square</item>
+ </items>
+ </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="typeft">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -69,74 +95,105 @@
<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="GtkComboBoxText" id="gradienttypelb">
+ <object class="GtkLabel" id="incrementft">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <items>
- <item translatable="yes">Linear</item>
- <item translatable="yes">Axial</item>
- <item translatable="yes">Radial</item>
- <item translatable="yes">Ellipsoid</item>
- <item translatable="yes">Quadratic</item>
- <item translatable="yes">Square</item>
- </items>
+ <property name="xalign">0</property>
+ <property name="yalign">0.43999999761581421</property>
+ <property name="label" translatable="yes">Increment:</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <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="GtkLabel" id="centerxft">
+ <object class="GtkScale" id="incrementslider">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Center _X:</property>
- <property name="use_underline">True</property>
+ <property name="can_focus">True</property>
+ <property name="round_digits">1</property>
+ <property name="draw_value">False</property>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="centerxmtr:%">
+ <object class="GtkSpinButton" id="incrementmtr">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <property name="adjustment">percentadjustment</property>
+ <property name="adjustment">adjustment1</property>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="centeryft">
+ <object class="GtkLabel" id="centerft">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0.43999999761581421</property>
- <property name="label" translatable="yes">Center _Y:</property>
+ <property name="label" translatable="yes">Center ( X / Y ) :</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="centerymtr:%">
+ <object class="GtkBox" id="box1">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <property name="adjustment">percentadjustment</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkSpinButton" id="centerxmtr:%">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="adjustment">percentadjustment</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="centerymtr:%">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="adjustment">percentadjustment</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">5</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -149,8 +206,10 @@
<property name="use_underline">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -162,7 +221,9 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">3</property>
+ <property name="top_attach">5</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -176,7 +237,23 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">4</property>
+ <property name="top_attach">6</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScale" id="borderslider">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="round_digits">1</property>
+ <property name="draw_value">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">7</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -188,7 +265,9 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">4</property>
+ <property name="top_attach">7</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -201,7 +280,9 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">5</property>
+ <property name="top_attach">8</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -212,8 +293,10 @@
<property name="id_column">1</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">5</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">9</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -225,7 +308,9 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">6</property>
+ <property name="top_attach">9</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -238,7 +323,9 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">7</property>
+ <property name="top_attach">10</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -249,8 +336,10 @@
<property name="id_column">1</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">7</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">11</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -262,7 +351,9 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">8</property>
+ <property name="top_attach">11</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -271,6 +362,18 @@
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="expand">False</property>
@@ -297,6 +400,8 @@
<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>
@@ -314,6 +419,8 @@
<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>
</object>
@@ -393,6 +500,8 @@
<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>
@@ -410,6 +519,8 @@
<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>
More information about the Libreoffice-commits
mailing list