diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-09-09 16:18:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-09-09 22:27:44 +0200 |
commit | c8610e24baaa0788f74acadcf6db1a00856f0d3a (patch) | |
tree | 197c5e4849ed01e9f5593620a380a20638ead790 /cui | |
parent | b90fa8698e1928b218cdbc07a7ca02b5a80eb406 (diff) |
weld SvxShadowTabPage
Change-Id: I5447641216c8cba3d275d76c00bf7306df8acf19
Reviewed-on: https://gerrit.libreoffice.org/60221
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/inc/cuitabarea.hxx | 26 | ||||
-rw-r--r-- | cui/source/tabpages/tpshadow.cxx | 189 | ||||
-rw-r--r-- | cui/uiconfig/ui/shadowtabpage.ui | 81 |
3 files changed, 163 insertions, 133 deletions
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index fc256c66312f..64fbb0316230 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -308,14 +308,6 @@ class SvxShadowTabPage : public SvxTabPage static const sal_uInt16 pShadowRanges[]; private: - VclPtr<TriStateBox> m_pTsbShowShadow; - VclPtr<VclGrid> m_pGridShadow; - VclPtr<SvxRectCtl> m_pCtlPosition; - VclPtr<MetricField> m_pMtrDistance; - VclPtr<SvxColorListBox> m_pLbShadowColor; - VclPtr<MetricField> m_pMtrTransparent; - VclPtr<SvxXShadowPreview> m_pCtlXRectPreview; - const SfxItemSet& m_rOutAttrs; XColorListRef m_pColorList; @@ -327,12 +319,22 @@ private: SfxItemSet& m_rXFSet; MapUnit m_ePoolUnit; - DECL_LINK( ClickShadowHdl_Impl, Button*, void ); - DECL_LINK( ModifyShadowHdl_Impl, Edit&, void ); - DECL_LINK( SelectShadowHdl_Impl, SvxColorListBox&, void ); + RectCtl m_aCtlPosition; + SvxXShadowPreview m_aCtlXRectPreview; + std::unique_ptr<weld::CheckButton> m_xTsbShowShadow; + std::unique_ptr<weld::Widget> m_xGridShadow; + std::unique_ptr<weld::MetricSpinButton> m_xMtrDistance; + std::unique_ptr<ColorListBox> m_xLbShadowColor; + std::unique_ptr<weld::MetricSpinButton> m_xMtrTransparent; + std::unique_ptr<weld::CustomWeld> m_xCtlPosition; + std::unique_ptr<weld::CustomWeld> m_xCtlXRectPreview; + + DECL_LINK(ClickShadowHdl_Impl, weld::ToggleButton&, void); + DECL_LINK(ModifyShadowHdl_Impl, weld::MetricSpinButton&, void); + DECL_LINK(SelectShadowHdl_Impl, ColorListBox&, void); public: - SvxShadowTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); + SvxShadowTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs); virtual ~SvxShadowTabPage() override; virtual void dispose() override; diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index d03a37a7d98f..3b2ac0b04b64 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -45,27 +45,23 @@ const sal_uInt16 SvxShadowTabPage::pShadowRanges[] = 0 }; -SvxShadowTabPage::SvxShadowTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ) : - - SvxTabPage ( pParent, - "ShadowTabPage", - "cui/ui/shadowtabpage.ui", - rInAttrs ), - m_rOutAttrs ( rInAttrs ), - m_pnColorListState ( nullptr ), - m_nPageType ( PageType::Area ), - m_nDlgType ( 0 ), - m_aXFillAttr ( rInAttrs.GetPool() ), - m_rXFSet ( m_aXFillAttr.GetItemSet() ) +SvxShadowTabPage::SvxShadowTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs) + : SvxTabPage(pParent, "cui/ui/shadowtabpage.ui", "ShadowTabPage", rInAttrs) + , m_rOutAttrs(rInAttrs) + , m_pnColorListState(nullptr) + , m_nPageType(PageType::Area) + , m_nDlgType(0) + , m_aXFillAttr(rInAttrs.GetPool()) + , m_rXFSet(m_aXFillAttr.GetItemSet()) + , m_aCtlPosition(this) + , m_xTsbShowShadow(m_xBuilder->weld_check_button("TSB_SHOW_SHADOW")) + , m_xGridShadow(m_xBuilder->weld_widget("gridSHADOW")) + , m_xMtrDistance(m_xBuilder->weld_metric_spin_button("MTR_FLD_DISTANCE", FUNIT_CM)) + , m_xLbShadowColor(new ColorListBox(m_xBuilder->weld_menu_button("LB_SHADOW_COLOR"), pParent.GetFrameWeld())) + , m_xMtrTransparent(m_xBuilder->weld_metric_spin_button("MTR_SHADOW_TRANSPARENT", FUNIT_PERCENT)) + , m_xCtlPosition(new weld::CustomWeld(*m_xBuilder, "CTL_POSITION", m_aCtlPosition)) + , m_xCtlXRectPreview(new weld::CustomWeld(*m_xBuilder, "CTL_COLOR_PREVIEW", m_aCtlXRectPreview)) { - get(m_pTsbShowShadow,"TSB_SHOW_SHADOW"); - get(m_pGridShadow,"gridSHADOW"); - get(m_pCtlPosition,"CTL_POSITION"); - get(m_pMtrDistance,"MTR_FLD_DISTANCE"); - get(m_pLbShadowColor,"LB_SHADOW_COLOR"); - get(m_pMtrTransparent,"MTR_SHADOW_TRANSPARENT"); - get(m_pCtlXRectPreview,"CTL_COLOR_PREVIEW"); - // this page needs ExchangeSupport SetExchangeSupport(); @@ -80,7 +76,7 @@ SvxShadowTabPage::SvxShadowTabPage( vcl::Window* pParent, const SfxItemSet& rInA break; default: ;//prevent warning } - SetFieldUnit( *m_pMtrDistance, eFUnit ); + SetFieldUnit( *m_xMtrDistance, eFUnit ); // determine PoolUnit SfxItemPool* pPool = m_rOutAttrs.GetPool(); @@ -143,14 +139,13 @@ SvxShadowTabPage::SvxShadowTabPage( vcl::Window* pParent, const SfxItemSet& rInA } m_rXFSet.Put( XFillStyleItem( eXFS ) ); - m_pCtlXRectPreview->SetRectangleAttributes(m_aXFillAttr.GetItemSet()); - //aCtlXRectPreview.SetFillAttr( aXFillAttr ); - - m_pTsbShowShadow->SetClickHdl( LINK( this, SvxShadowTabPage, ClickShadowHdl_Impl ) ); - m_pLbShadowColor->SetSelectHdl( LINK( this, SvxShadowTabPage, SelectShadowHdl_Impl ) ); - Link<Edit&,void> aLink = LINK( this, SvxShadowTabPage, ModifyShadowHdl_Impl ); - m_pMtrTransparent->SetModifyHdl( aLink ); - m_pMtrDistance->SetModifyHdl( aLink ); + m_aCtlXRectPreview.SetRectangleAttributes(m_aXFillAttr.GetItemSet()); + + m_xTsbShowShadow->connect_toggled(LINK( this, SvxShadowTabPage, ClickShadowHdl_Impl)); + m_xLbShadowColor->SetSelectHdl( LINK( this, SvxShadowTabPage, SelectShadowHdl_Impl ) ); + Link<weld::MetricSpinButton&,void> aLink = LINK( this, SvxShadowTabPage, ModifyShadowHdl_Impl ); + m_xMtrTransparent->connect_value_changed(aLink); + m_xMtrDistance->connect_value_changed(aLink); } SvxShadowTabPage::~SvxShadowTabPage() @@ -160,13 +155,9 @@ SvxShadowTabPage::~SvxShadowTabPage() void SvxShadowTabPage::dispose() { - m_pTsbShowShadow.clear(); - m_pGridShadow.clear(); - m_pCtlPosition.clear(); - m_pMtrDistance.clear(); - m_pLbShadowColor.clear(); - m_pMtrTransparent.clear(); - m_pCtlXRectPreview.clear(); + m_xCtlXRectPreview.reset(); + m_xLbShadowColor.reset(); + m_xCtlPosition.reset(); SvxTabPage::dispose(); } @@ -206,8 +197,8 @@ void SvxShadowTabPage::ActivatePage( const SfxItemSet& rSet ) SdrOnOffItem aItem( makeSdrShadowItem( false )); rAttribs.Put( aItem ); - m_pCtlXRectPreview->SetRectangleAttributes( rAttribs ); - ModifyShadowHdl_Impl( *m_pMtrTransparent ); + m_aCtlXRectPreview.SetRectangleAttributes( rAttribs ); + ModifyShadowHdl_Impl( *m_xMtrTransparent ); } m_nPageType = PageType::Shadow; } @@ -230,11 +221,11 @@ bool SvxShadowTabPage::FillItemSet( SfxItemSet* rAttrs ) const SfxPoolItem* pOld = nullptr; - if( m_pTsbShowShadow->IsValueChangedFromSaved() ) + if (m_xTsbShowShadow->get_state_changed_from_saved()) { - TriState eState = m_pTsbShowShadow->GetState(); + TriState eState = m_xTsbShowShadow->get_state(); assert(eState != TRISTATE_INDET); - // given how m_pTsbShowShadow is set up and saved in Reset(), + // given how m_xTsbShowShadow is set up and saved in Reset(), // eState == TRISTATE_INDET would imply // !IsValueChangedFromSaved() SdrOnOffItem aItem( makeSdrShadowItem(eState == TRISTATE_TRUE) ); @@ -250,9 +241,9 @@ bool SvxShadowTabPage::FillItemSet( SfxItemSet* rAttrs ) // a bit intricate inquiry whether there was something changed, // as the items can't be displayed directly on controls sal_Int32 nX = 0, nY = 0; - sal_Int32 nXY = GetCoreValue( *m_pMtrDistance, m_ePoolUnit ); + sal_Int32 nXY = GetCoreValue( *m_xMtrDistance, m_ePoolUnit ); - switch( m_pCtlPosition->GetActualRP() ) + switch (m_aCtlPosition.GetActualRP()) { case RectPoint::LT: nX = nY = -nXY; break; case RectPoint::MT: nY = -nXY; break; @@ -269,7 +260,7 @@ bool SvxShadowTabPage::FillItemSet( SfxItemSet* rAttrs ) // string in the respective MetricField=="", then the comparison of the old // and the new distance values would return a wrong result because in such a // case the new distance values would match the default values of the MetricField !!!! - if ( !m_pMtrDistance->IsEmptyFieldValue() || + if ( !m_xMtrDistance->get_text().isEmpty() || m_rOutAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SfxItemState::DONTCARE || m_rOutAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SfxItemState::DONTCARE ) { @@ -301,7 +292,7 @@ bool SvxShadowTabPage::FillItemSet( SfxItemSet* rAttrs ) // ShadowColor { - XColorItem aItem(makeSdrShadowColorItem(m_pLbShadowColor->GetSelectEntryColor())); + XColorItem aItem(makeSdrShadowColorItem(m_xLbShadowColor->GetSelectEntryColor())); pOld = GetOldItem( *rAttrs, SDRATTR_SHADOWCOLOR ); if ( !pOld || !( *static_cast<const XColorItem*>(pOld) == aItem ) ) { @@ -311,8 +302,8 @@ bool SvxShadowTabPage::FillItemSet( SfxItemSet* rAttrs ) } // transparency - sal_uInt16 nVal = static_cast<sal_uInt16>(m_pMtrTransparent->GetValue()); - if( m_pMtrTransparent->IsValueChangedFromSaved() ) + sal_uInt16 nVal = static_cast<sal_uInt16>(m_xMtrTransparent->get_value(FUNIT_PERCENT)); + if (m_xMtrTransparent->get_value_changed_from_saved()) { SdrPercentItem aItem( makeSdrShadowTransparenceItem(nVal) ); pOld = GetOldItem( *rAttrs, SDRATTR_SHADOWTRANSPARENCE ); @@ -337,17 +328,15 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs ) // has a shadow been set? if( rAttrs->GetItemState( SDRATTR_SHADOW ) != SfxItemState::DONTCARE ) { - m_pTsbShowShadow->EnableTriState( false ); - if( rAttrs->Get( SDRATTR_SHADOW ).GetValue() ) - m_pTsbShowShadow->SetState( TRISTATE_TRUE ); + m_xTsbShowShadow->set_state(TRISTATE_TRUE); else { - m_pTsbShowShadow->SetState( TRISTATE_FALSE ); + m_xTsbShowShadow->set_state(TRISTATE_FALSE); } } else - m_pTsbShowShadow->SetState( TRISTATE_INDET ); + m_xTsbShowShadow->set_state(TRISTATE_INDET); // distance (only 8 possible positions), // so there is only one item evaluated @@ -359,21 +348,21 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs ) sal_Int32 nY = rAttrs->Get( SDRATTR_SHADOWYDIST ).GetValue(); if( nX != 0 ) - SetMetricValue( *m_pMtrDistance, nX < 0 ? -nX : nX, m_ePoolUnit ); + SetMetricValue( *m_xMtrDistance, nX < 0 ? -nX : nX, m_ePoolUnit ); else - SetMetricValue( *m_pMtrDistance, nY < 0 ? -nY : nY, m_ePoolUnit ); + SetMetricValue( *m_xMtrDistance, nY < 0 ? -nY : nY, m_ePoolUnit ); // setting the shadow control - if ( nX < 0 && nY < 0 ) m_pCtlPosition->SetActualRP( RectPoint::LT ); - else if( nX == 0 && nY < 0 ) m_pCtlPosition->SetActualRP( RectPoint::MT ); - else if( nX > 0 && nY < 0 ) m_pCtlPosition->SetActualRP( RectPoint::RT ); - else if( nX < 0 && nY == 0 ) m_pCtlPosition->SetActualRP( RectPoint::LM ); + if ( nX < 0 && nY < 0 ) m_aCtlPosition.SetActualRP( RectPoint::LT ); + else if( nX == 0 && nY < 0 ) m_aCtlPosition.SetActualRP( RectPoint::MT ); + else if( nX > 0 && nY < 0 ) m_aCtlPosition.SetActualRP( RectPoint::RT ); + else if( nX < 0 && nY == 0 ) m_aCtlPosition.SetActualRP( RectPoint::LM ); // there's no center point anymore - else if( nX == 0 && nY == 0 ) m_pCtlPosition->SetActualRP( RectPoint::RB ); - else if( nX > 0 && nY == 0 ) m_pCtlPosition->SetActualRP( RectPoint::RM ); - else if( nX < 0 && nY > 0 ) m_pCtlPosition->SetActualRP( RectPoint::LB ); - else if( nX == 0 && nY > 0 ) m_pCtlPosition->SetActualRP( RectPoint::MB ); - else if( nX > 0 && nY > 0 ) m_pCtlPosition->SetActualRP( RectPoint::RB ); + else if( nX == 0 && nY == 0 ) m_aCtlPosition.SetActualRP( RectPoint::RB ); + else if( nX > 0 && nY == 0 ) m_aCtlPosition.SetActualRP( RectPoint::RM ); + else if( nX < 0 && nY > 0 ) m_aCtlPosition.SetActualRP( RectPoint::LB ); + else if( nX == 0 && nY > 0 ) m_aCtlPosition.SetActualRP( RectPoint::MB ); + else if( nX > 0 && nY > 0 ) m_aCtlPosition.SetActualRP( RectPoint::RB ); } else { @@ -386,90 +375,88 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs ) sal_Int32 nX = pXDistItem->GetValue(); sal_Int32 nY = pYDistItem->GetValue(); if( nX != 0 ) - SetMetricValue( *m_pMtrDistance, nX < 0 ? -nX : nX, m_ePoolUnit ); + SetMetricValue( *m_xMtrDistance, nX < 0 ? -nX : nX, m_ePoolUnit ); else - SetMetricValue( *m_pMtrDistance, nY < 0 ? -nY : nY, m_ePoolUnit ); + SetMetricValue( *m_xMtrDistance, nY < 0 ? -nY : nY, m_ePoolUnit ); } // Tristate, e. g. multiple objects have been marked of which some have a shadow and some don't. // The text (which shall be displayed) of the MetricFields is set to "" and serves as an // identification in the method FillItemSet for the fact that the distance value was NOT changed !!!! - m_pMtrDistance->SetText( "" ); - m_pCtlPosition->SetActualRP( RectPoint::MM ); + m_xMtrDistance->set_text( "" ); + m_aCtlPosition.SetActualRP( RectPoint::MM ); } if( rAttrs->GetItemState( SDRATTR_SHADOWCOLOR ) != SfxItemState::DONTCARE ) { - m_pLbShadowColor->SelectEntry( rAttrs->Get( SDRATTR_SHADOWCOLOR ).GetColorValue() ); + m_xLbShadowColor->SelectEntry( rAttrs->Get( SDRATTR_SHADOWCOLOR ).GetColorValue() ); } else - m_pLbShadowColor->SetNoSelection(); + m_xLbShadowColor->SetNoSelection(); if( rAttrs->GetItemState( SDRATTR_SHADOWTRANSPARENCE ) != SfxItemState::DONTCARE ) { sal_uInt16 nTransp = rAttrs->Get( SDRATTR_SHADOWTRANSPARENCE ).GetValue(); - m_pMtrTransparent->SetValue( nTransp ); + m_xMtrTransparent->set_value(nTransp, FUNIT_PERCENT); } else - m_pMtrTransparent->SetText( "" ); + m_xMtrTransparent->set_text(""); //aCtlPosition - m_pMtrDistance->SaveValue(); - m_pLbShadowColor->SaveValue(); - m_pTsbShowShadow->SaveValue(); + m_xMtrDistance->save_value(); + m_xLbShadowColor->SaveValue(); + m_xTsbShowShadow->save_state(); // #66832# This field was not saved, but used to determine changes. // Why? Seems to be the error. // It IS the error. - m_pMtrTransparent->SaveValue(); + m_xMtrTransparent->save_value(); - ClickShadowHdl_Impl( nullptr ); - ModifyShadowHdl_Impl( *m_pMtrTransparent ); + ClickShadowHdl_Impl(*m_xTsbShowShadow); + ModifyShadowHdl_Impl(*m_xMtrTransparent); } -VclPtr<SfxTabPage> SvxShadowTabPage::Create( TabPageParent pWindow, +VclPtr<SfxTabPage> SvxShadowTabPage::Create( TabPageParent pParent, const SfxItemSet* rAttrs ) { - return VclPtr<SvxShadowTabPage>::Create( pWindow.pParent, *rAttrs ); + return VclPtr<SvxShadowTabPage>::Create( pParent, *rAttrs ); } - -IMPL_LINK_NOARG(SvxShadowTabPage, ClickShadowHdl_Impl, Button*, void) +IMPL_LINK_NOARG(SvxShadowTabPage, ClickShadowHdl_Impl, weld::ToggleButton&, void) { - if( m_pTsbShowShadow->GetState() == TRISTATE_FALSE ) + if (m_xTsbShowShadow->get_state() == TRISTATE_FALSE) { - m_pGridShadow->Disable(); + m_xGridShadow->set_sensitive(false); } else { - m_pGridShadow->Enable(); + m_xGridShadow->set_sensitive(true); } - m_pCtlPosition->Invalidate(); - - ModifyShadowHdl_Impl( *m_pMtrTransparent ); + m_aCtlPosition.Invalidate(); + ModifyShadowHdl_Impl(*m_xMtrTransparent); } -IMPL_LINK_NOARG(SvxShadowTabPage, SelectShadowHdl_Impl, SvxColorListBox&, void) +IMPL_LINK_NOARG(SvxShadowTabPage, SelectShadowHdl_Impl, ColorListBox&, void) { - ModifyShadowHdl_Impl(*m_pMtrTransparent); + ModifyShadowHdl_Impl(*m_xMtrTransparent); } -IMPL_LINK_NOARG(SvxShadowTabPage, ModifyShadowHdl_Impl, Edit&, void) +IMPL_LINK_NOARG(SvxShadowTabPage, ModifyShadowHdl_Impl, weld::MetricSpinButton&, void) { - if( m_pTsbShowShadow->GetState() == TRISTATE_TRUE ) + if (m_xTsbShowShadow->get_state() == TRISTATE_TRUE) m_rXFSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) ); else m_rXFSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) ); - m_rXFSet.Put( XFillColorItem( OUString(), m_pLbShadowColor->GetSelectEntryColor() ) ); - sal_uInt16 nVal = static_cast<sal_uInt16>(m_pMtrTransparent->GetValue()); + m_rXFSet.Put( XFillColorItem( OUString(), m_xLbShadowColor->GetSelectEntryColor() ) ); + sal_uInt16 nVal = static_cast<sal_uInt16>(m_xMtrTransparent->get_value(FUNIT_PERCENT)); m_rXFSet.Put( XFillTransparenceItem( nVal ) ); // shadow removal sal_Int32 nX = 0, nY = 0; - sal_Int32 nXY = GetCoreValue( *m_pMtrDistance, m_ePoolUnit ); - switch( m_pCtlPosition->GetActualRP() ) + sal_Int32 nXY = GetCoreValue( *m_xMtrDistance, m_ePoolUnit ); + switch( m_aCtlPosition.GetActualRP() ) { case RectPoint::LT: nX = nY = -nXY; break; case RectPoint::MT: nY = -nXY; break; @@ -482,24 +469,22 @@ IMPL_LINK_NOARG(SvxShadowTabPage, ModifyShadowHdl_Impl, Edit&, void) case RectPoint::MM: break; } - m_pCtlXRectPreview->SetShadowPosition(Point(nX, nY)); + m_aCtlXRectPreview.SetShadowPosition(Point(nX, nY)); - m_pCtlXRectPreview->SetShadowAttributes(m_aXFillAttr.GetItemSet()); - //aCtlXRectPreview.SetFillAttr( aXFillAttr ); - m_pCtlXRectPreview->Invalidate(); + m_aCtlXRectPreview.SetShadowAttributes(m_aXFillAttr.GetItemSet()); + m_aCtlXRectPreview.Invalidate(); } - void SvxShadowTabPage::PointChanged( vcl::Window*, RectPoint ) { // repaint shadow - ModifyShadowHdl_Impl( *m_pMtrTransparent ); + ModifyShadowHdl_Impl( *m_xMtrTransparent ); } void SvxShadowTabPage::PointChanged( weld::DrawingArea*, RectPoint ) { // repaint shadow - ModifyShadowHdl_Impl( *m_pMtrTransparent ); + ModifyShadowHdl_Impl( *m_xMtrTransparent ); } void SvxShadowTabPage::PageCreated(const SfxAllItemSet& aSet) diff --git a/cui/uiconfig/ui/shadowtabpage.ui b/cui/uiconfig/ui/shadowtabpage.ui index 1fba29ca3472..0cab81237044 100644 --- a/cui/uiconfig/ui/shadowtabpage.ui +++ b/cui/uiconfig/ui/shadowtabpage.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.18.3 --> +<!-- Generated with glade 3.22.1 --> <interface domain="cui"> <requires lib="gtk+" version="3.18"/> <requires lib="LibreOffice" version="1.0"/> @@ -65,9 +65,10 @@ <property name="row_spacing">6</property> <property name="column_spacing">12</property> <child> - <object class="GtkSpinButton" id="MTR_SHADOW_TRANSPARENT:0%"> + <object class="GtkSpinButton" id="MTR_SHADOW_TRANSPARENT"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="activates_default">True</property> <property name="adjustment">adjustmentPercent</property> </object> <packing> @@ -76,9 +77,10 @@ </packing> </child> <child> - <object class="GtkSpinButton" id="MTR_FLD_DISTANCE:0cm"> + <object class="GtkSpinButton" id="MTR_FLD_DISTANCE"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="activates_default">True</property> <property name="adjustment">adjustmentDistance</property> </object> <packing> @@ -87,9 +89,27 @@ </packing> </child> <child> - <object class="svxlo-SvxRectCtl" id="CTL_POSITION"> + <object class="GtkScrolledWindow"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can_focus">True</property> + <property name="halign">start</property> + <property name="valign">center</property> + <property name="hscrollbar_policy">never</property> + <property name="vscrollbar_policy">never</property> + <property name="shadow_type">in</property> + <child> + <object class="GtkViewport"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkDrawingArea" id="CTL_POSITION"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property> + </object> + </child> + </object> + </child> </object> <packing> <property name="left_attach">1</property> @@ -97,10 +117,14 @@ </packing> </child> <child> - <object class="svxcorelo-SvxColorListBox" id="LB_SHADOW_COLOR"> + <object class="GtkMenuButton" id="LB_SHADOW_COLOR"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <child> + <placeholder/> + </child> </object> <packing> <property name="left_attach">1</property> @@ -116,9 +140,10 @@ <object class="GtkLabel" id="FT_DISTANCE"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">1</property> <property name="label" translatable="yes" context="shadowtabpage|FT_DISTANCE">_Distance:</property> <property name="use_underline">True</property> + <property name="mnemonic_widget">MTR_FLD_DISTANCE</property> + <property name="xalign">1</property> </object> </child> </object> @@ -136,9 +161,10 @@ <object class="GtkLabel" id="FT_TRANSPARENT"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">1</property> <property name="label" translatable="yes" context="shadowtabpage|FT_TRANSPARENT">_Transparency:</property> <property name="use_underline">True</property> + <property name="mnemonic_widget">MTR_SHADOW_TRANSPARENT</property> + <property name="xalign">1</property> </object> </child> </object> @@ -156,9 +182,10 @@ <object class="GtkLabel" id="FT_SHADOW_COLOR"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">1</property> <property name="label" translatable="yes" context="shadowtabpage|FT_SHADOW_COLOR">_Color:</property> <property name="use_underline">True</property> + <property name="mnemonic_widget">LB_SHADOW_COLOR</property> + <property name="xalign">1</property> </object> </child> </object> @@ -167,6 +194,9 @@ <property name="top_attach">2</property> </packing> </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="expand">False</property> @@ -193,14 +223,27 @@ <property name="spacing">6</property> <property name="homogeneous">True</property> <child> - <object class="svxlo-SvxXShadowPreview" id="CTL_COLOR_PREVIEW"> + <object class="GtkScrolledWindow"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="vexpand">True</property> - <child internal-child="accessible"> - <object class="AtkObject" id="CTL_COLOR_PREVIEW-atkobject"> - <property name="AtkObject::accessible-name" translatable="yes" context="shadowtabpage|CTL_COLOR_PREVIEW-atkobject">Example</property> + <property name="hscrollbar_policy">never</property> + <property name="vscrollbar_policy">never</property> + <property name="shadow_type">in</property> + <child> + <object class="GtkViewport"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkDrawingArea" id="CTL_COLOR_PREVIEW"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child internal-child="accessible"> + <object class="AtkObject" id="CTL_COLOR_PREVIEW-atkobject"> + <property name="AtkObject::accessible-name" translatable="yes" context="shadowtabpage|CTL_COLOR_PREVIEW-atkobject">Example</property> + </object> + </child> + </object> + </child> </object> </child> </object> @@ -234,8 +277,8 @@ </object> <object class="GtkSizeGroup" id="sizegroup1"> <widgets> - <widget name="MTR_SHADOW_TRANSPARENT:0%"/> - <widget name="MTR_FLD_DISTANCE:0cm"/> + <widget name="MTR_SHADOW_TRANSPARENT"/> + <widget name="MTR_FLD_DISTANCE"/> <widget name="LB_SHADOW_COLOR"/> </widgets> </object> |