diff options
author | Rishabh Kumar <kris.kr296@gmail.com> | 2016-07-20 15:19:55 +0530 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-07-20 11:19:53 +0000 |
commit | 4587fcaa9e3645232a862c10167a22b84306d0b9 (patch) | |
tree | ea8a39a906fcbab7d53c5d6d5dc23d43688aafe5 /cui | |
parent | 525c326d9d3d1b6defa22589e0af60c9cc884a5c (diff) |
Revert "Addition of new controls and their rearrangement in gradient tab"
Unfinished GSoC: Area Fill project feature.
Introduces regression in LibreOffice-5-2.
This reverts commit fe3d9ac20b0f27b8beca7e54efa8ba571e76101d.
Change-Id: Ic1a9e2d7279e0b06e19b5d1020b37b44d28060b4
Reviewed-on: https://gerrit.libreoffice.org/27338
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/inc/cuitabarea.hxx | 15 | ||||
-rw-r--r-- | cui/source/tabpages/tparea.cxx | 136 | ||||
-rw-r--r-- | cui/source/tabpages/tpgradnt.cxx | 56 | ||||
-rw-r--r-- | cui/uiconfig/ui/areatabpage.ui | 96 | ||||
-rw-r--r-- | cui/uiconfig/ui/gradientpage.ui | 199 |
5 files changed, 283 insertions, 219 deletions
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index c8235febabb7..dfffa39f13c6 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -22,7 +22,6 @@ #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> @@ -193,6 +192,10 @@ 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; @@ -269,6 +272,8 @@ 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 @@ -385,26 +390,25 @@ class SvxGradientTabPage : public SfxTabPage private: VclPtr<ListBox> m_pLbGradientType; - VclPtr<FixedText> m_pFtCenter; + VclPtr<FixedText> m_pFtCenterX; 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; @@ -428,7 +432,6 @@ 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 4b0faa319dcc..4ab7c8ec911a 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -44,8 +44,6 @@ #include "sfx2/opengrf.hxx" #include <vcl/layout.hxx> -#define DEFAULT_GRADIENTSTEP 64 - using namespace com::sun::star; // static ---------------------------------------------------------------- @@ -115,6 +113,10 @@ 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"); @@ -151,11 +153,12 @@ 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(aHatchSize.Width(), aBitmapSize.Width()), - std::max(aHatchSize.Height(), aBitmapSize.Height())); + std::max(std::max(aIncrementsSize.Width(), aHatchSize.Width()), aBitmapSize.Width()), + std::max(std::max(aIncrementsSize.Height(), aHatchSize.Height()), aBitmapSize.Height())); pMainFrame->set_width_request(aMainFrame.Width()); pMainFrame->set_height_request(aMainFrame.Height()); @@ -164,6 +167,8 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs m_pLbBitmap->Hide(); m_pCtlBitmapPreview->Hide(); + m_pFlStepCount->Hide(); + m_pBxBitmap->Hide(); // Controls for Hatch-Background @@ -209,6 +214,9 @@ 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 ); @@ -264,6 +272,9 @@ 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(); @@ -683,6 +694,39 @@ 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(); @@ -1034,6 +1078,30 @@ 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 ) @@ -1208,6 +1276,8 @@ 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(); @@ -1228,6 +1298,8 @@ 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(); @@ -1268,6 +1340,8 @@ void SvxAreaTabPage::ClickInvisibleHdl_Impl() m_pCtlXRectPreview->Hide(); m_pCtlBitmapPreview->Hide(); + m_pFlStepCount->Hide(); + // Controls for Hatch-Background m_pFlHatchBckgrd->Hide(); @@ -1294,6 +1368,8 @@ void SvxAreaTabPage::ClickColorHdl_Impl() m_pCtlXRectPreview->Show(); m_pCtlBitmapPreview->Hide(); + m_pFlStepCount->Hide(); + // Controls for Hatch-Background m_pFlHatchBckgrd->Hide(); @@ -1340,10 +1416,17 @@ 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 ); } @@ -1367,11 +1450,6 @@ 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(); } @@ -1389,6 +1467,8 @@ void SvxAreaTabPage::ClickHatchingHdl_Impl() m_pCtlXRectPreview->Show(); m_pCtlBitmapPreview->Hide(); + m_pFlStepCount->Hide(); + m_pBxBitmap->Hide(); // Controls for Hatch-Background @@ -1496,6 +1576,8 @@ void SvxAreaTabPage::ClickBitmapHdl_Impl() m_pCtlBitmapPreview->Show(); m_pCtlXRectPreview->Hide(); + m_pFlStepCount->Hide(); + m_pBxTile->Enable(); m_pFlSize->Enable(); @@ -1544,6 +1626,42 @@ 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 f56afab9b365..c87694a87ae2 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -41,8 +41,6 @@ #include <svx/dialogs.hrc> #include "paragrph.hrc" -#define DEFAULT_GRADIENTSTEP 64 - using namespace com::sun::star; SvxGradientTabPage::SvxGradientTabPage @@ -66,16 +64,14 @@ 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_pFtCenter, "centerft"); + get(m_pFtCenterX, "centerxft"); 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"); @@ -102,10 +98,8 @@ 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 ); @@ -124,13 +118,10 @@ 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 ); @@ -154,16 +145,14 @@ SvxGradientTabPage::~SvxGradientTabPage() void SvxGradientTabPage::dispose() { - m_pMtrIncrement.clear(); - m_pSliderIncrement.clear(); m_pLbGradientType.clear(); - m_pFtCenter.clear(); + m_pFtCenterX.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(); @@ -350,7 +339,6 @@ 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() )); @@ -373,7 +361,6 @@ 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; } @@ -415,21 +402,8 @@ 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(), @@ -446,9 +420,6 @@ 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() ); @@ -856,12 +827,7 @@ 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, @@ -886,7 +852,6 @@ 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() ); @@ -897,7 +862,6 @@ 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(); @@ -911,24 +875,27 @@ void SvxGradientTabPage::SetControlState_Impl( css::awt::GradientStyle eXGS ) { case css::awt::GradientStyle_LINEAR: case css::awt::GradientStyle_AXIAL: - m_pFtCenter->Disable(); + m_pFtCenterX->Disable(); m_pMtrCenterX->Disable(); + m_pFtCenterY->Disable(); m_pMtrCenterY->Disable(); m_pFtAngle->Enable(); m_pMtrAngle->Enable(); break; case css::awt::GradientStyle_RADIAL: - m_pFtCenter->Enable(); + m_pFtCenterX->Enable(); m_pMtrCenterX->Enable(); + m_pFtCenterY->Enable(); m_pMtrCenterY->Enable(); m_pFtAngle->Disable(); m_pMtrAngle->Disable(); break; case css::awt::GradientStyle_ELLIPTICAL: - m_pFtCenter->Enable(); + m_pFtCenterX->Enable(); m_pMtrCenterX->Enable(); + m_pFtCenterY->Enable(); m_pMtrCenterY->Enable(); m_pFtAngle->Enable(); m_pMtrAngle->Enable(); @@ -936,8 +903,9 @@ void SvxGradientTabPage::SetControlState_Impl( css::awt::GradientStyle eXGS ) case css::awt::GradientStyle_SQUARE: case css::awt::GradientStyle_RECT: - m_pFtCenter->Enable(); + m_pFtCenterX->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 459457faa395..b9bf6de3e5a8 100644 --- a/cui/uiconfig/ui/areatabpage.ui +++ b/cui/uiconfig/ui/areatabpage.ui @@ -3,6 +3,13 @@ <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> @@ -220,6 +227,85 @@ <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> @@ -292,7 +378,7 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">0</property> + <property name="position">1</property> </packing> </child> <child> @@ -534,7 +620,7 @@ <property name="can_focus">True</property> <property name="halign">start</property> <property name="invisible_char">•</property> - <property name="text">0</property> + <property name="text" translatable="no">0</property> <property name="adjustment">adjustment2</property> </object> <packing> @@ -580,7 +666,7 @@ <property name="can_focus">True</property> <property name="halign">start</property> <property name="invisible_char">•</property> - <property name="text">0</property> + <property name="text" translatable="no">0</property> <property name="adjustment">adjustment2</property> </object> <packing> @@ -718,7 +804,7 @@ <property name="can_focus">True</property> <property name="halign">start</property> <property name="invisible_char">•</property> - <property name="text">0</property> + <property name="text" translatable="no">0</property> <property name="adjustment">adjustment2</property> </object> <packing> @@ -784,7 +870,7 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">1</property> + <property name="position">2</property> </packing> </child> </object> diff --git a/cui/uiconfig/ui/gradientpage.ui b/cui/uiconfig/ui/gradientpage.ui index 69eedbdf80a4..f09ecd5fc029 100644 --- a/cui/uiconfig/ui/gradientpage.ui +++ b/cui/uiconfig/ui/gradientpage.ui @@ -1,14 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.16.1 --> +<!-- Generated with glade 3.18.3 --> <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="step_increment">1</property> - <property name="page_increment">10</property> - </object> + <requires lib="LibreOffice" version="1.0"/> <object class="GtkAdjustment" id="angleadjustment"> <property name="upper">359</property> <property name="step_increment">15</property> @@ -65,26 +59,6 @@ <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> @@ -95,105 +69,74 @@ <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="incrementft"> + <object class="GtkComboBoxText" id="gradienttypelb"> <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">Increment:</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">2</property> - <property name="width">1</property> - <property name="height">1</property> + <property name="left_attach">1</property> + <property name="top_attach">0</property> </packing> </child> <child> - <object class="GtkScale" id="incrementslider"> + <object class="GtkLabel" id="centerxft"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="round_digits">1</property> - <property name="draw_value">False</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Center _X:</property> + <property name="use_underline">True</property> </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">3</property> - <property name="width">1</property> - <property name="height">1</property> + <property name="top_attach">1</property> </packing> </child> <child> - <object class="GtkSpinButton" id="incrementmtr"> + <object class="GtkSpinButton" id="centerxmtr:%"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="adjustment">adjustment1</property> + <property name="invisible_char">●</property> + <property name="adjustment">percentadjustment</property> </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">3</property> - <property name="width">1</property> - <property name="height">1</property> + <property name="top_attach">1</property> </packing> </child> <child> - <object class="GtkLabel" id="centerft"> + <object class="GtkLabel" id="centeryft"> <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 ( X / Y ) :</property> + <property name="label" translatable="yes">Center _Y:</property> <property name="use_underline">True</property> </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">4</property> - <property name="width">1</property> - <property name="height">1</property> + <property name="top_attach">2</property> </packing> </child> <child> - <object class="GtkBox" id="box1"> + <object class="GtkSpinButton" id="centerymtr:%"> <property name="visible">True</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> + <property name="can_focus">True</property> + <property name="invisible_char">●</property> + <property name="adjustment">percentadjustment</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">5</property> - <property name="width">1</property> - <property name="height">1</property> + <property name="left_attach">1</property> + <property name="top_attach">2</property> </packing> </child> <child> @@ -206,10 +149,8 @@ <property name="use_underline">True</property> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">4</property> - <property name="width">1</property> - <property name="height">1</property> + <property name="left_attach">0</property> + <property name="top_attach">3</property> </packing> </child> <child> @@ -221,9 +162,7 @@ </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">5</property> - <property name="width">1</property> - <property name="height">1</property> + <property name="top_attach">3</property> </packing> </child> <child> @@ -237,23 +176,7 @@ </object> <packing> <property name="left_attach">0</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> + <property name="top_attach">4</property> </packing> </child> <child> @@ -265,9 +188,7 @@ </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">7</property> - <property name="width">1</property> - <property name="height">1</property> + <property name="top_attach">4</property> </packing> </child> <child> @@ -280,9 +201,7 @@ </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">8</property> - <property name="width">1</property> - <property name="height">1</property> + <property name="top_attach">5</property> </packing> </child> <child> @@ -293,10 +212,8 @@ <property name="id_column">1</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">9</property> - <property name="width">1</property> - <property name="height">1</property> + <property name="left_attach">1</property> + <property name="top_attach">5</property> </packing> </child> <child> @@ -308,9 +225,7 @@ </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">9</property> - <property name="width">1</property> - <property name="height">1</property> + <property name="top_attach">6</property> </packing> </child> <child> @@ -323,9 +238,7 @@ </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">10</property> - <property name="width">1</property> - <property name="height">1</property> + <property name="top_attach">7</property> </packing> </child> <child> @@ -336,10 +249,8 @@ <property name="id_column">1</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">11</property> - <property name="width">1</property> - <property name="height">1</property> + <property name="left_attach">1</property> + <property name="top_attach">7</property> </packing> </child> <child> @@ -351,9 +262,7 @@ </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">11</property> - <property name="width">1</property> - <property name="height">1</property> + <property name="top_attach">8</property> </packing> </child> <child> @@ -362,18 +271,6 @@ <child> <placeholder/> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="expand">False</property> @@ -400,8 +297,6 @@ <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> @@ -419,8 +314,6 @@ <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> @@ -500,8 +393,6 @@ <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> @@ -519,8 +410,6 @@ <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> |