cui/source/inc/cuitabarea.hxx | 2 cui/source/tabpages/tparea.cxx | 2 cui/source/tabpages/tpgradnt.cxx | 27 +- cui/uiconfig/ui/gradientpage.ui | 112 ++++------ include/tools/gen.hxx | 6 include/vcl/slider.hxx | 1 vcl/Package_theme_definitions.mk | 1 vcl/source/control/slider.cxx | 55 +++- vcl/uiconfig/theme_definitions/ios/definition.xml | 15 + vcl/uiconfig/theme_definitions/ios/slider-button-disabled.svg | 3 10 files changed, 136 insertions(+), 88 deletions(-)
New commits: commit c19d924a3abefe396beda2772ab8a7cf3c9527f8 Author: Tomaž Vajngerl <[email protected]> AuthorDate: Thu Apr 4 10:56:40 2019 +0900 Commit: Tomaž Vajngerl <[email protected]> CommitDate: Thu Apr 4 22:22:43 2019 +0900 ios theme definition: add slider disabled state Change-Id: Ie4388f00c4a0c11df77782691fe9ea7f706d2b5c Reviewed-on: https://gerrit.libreoffice.org/70231 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <[email protected]> (cherry picked from commit aa5abc875934990d1ecec17abc6c58d51afd10b1) diff --git a/vcl/Package_theme_definitions.mk b/vcl/Package_theme_definitions.mk index 8f551ebaa8ce..dbb0a92fe268 100644 --- a/vcl/Package_theme_definitions.mk +++ b/vcl/Package_theme_definitions.mk @@ -53,6 +53,7 @@ $(eval $(call gb_Package_add_files_with_dir,vcl_theme_definitions,$(LIBO_SHARE_F ios/arrow-up.svg \ ios/arrow-down.svg \ ios/slider-button.svg \ + ios/slider-button-disabled.svg \ )) # vim: set noet sw=4 ts=4: diff --git a/vcl/uiconfig/theme_definitions/ios/definition.xml b/vcl/uiconfig/theme_definitions/ios/definition.xml index 0f0823193857..5b4aa12b44ea 100644 --- a/vcl/uiconfig/theme_definitions/ios/definition.xml +++ b/vcl/uiconfig/theme_definitions/ios/definition.xml @@ -295,14 +295,20 @@ <slider> <part value="Button"> - <state> + <state enabled="true"> <image source="slider-button.svg" /> </state> + <state enabled="false"> + <image source="slider-button-disabled.svg" /> + </state> </part> <part value="TrackHorzLeft"> - <state> + <state enabled="true"> <line stroke="#007AFF" stroke-width="6" x1="0.0" y1="0.5" x2="1.0" y2="0.5"/> </state> + <state enabled="false"> + <line stroke="#8e8e93" stroke-width="6" x1="0.0" y1="0.5" x2="1.0" y2="0.5"/> + </state> </part> <part value="TrackHorzRight"> <state> @@ -310,9 +316,12 @@ </state> </part> <part value="TrackVertUpper"> - <state> + <state enabled="true"> <line stroke="#007AFF" stroke-width="6" x1="0.5" y1="0.0" x2="0.5" y2="1.0"/> </state> + <state enabled="false"> + <line stroke="#8e8e93" stroke-width="6" x1="0.5" y1="0.0" x2="0.5" y2="1.0"/> + </state> </part> <part value="TrackVertLower"> <state> diff --git a/vcl/uiconfig/theme_definitions/ios/slider-button-disabled.svg b/vcl/uiconfig/theme_definitions/ios/slider-button-disabled.svg new file mode 100644 index 000000000000..3c3b9fc56c2e --- /dev/null +++ b/vcl/uiconfig/theme_definitions/ios/slider-button-disabled.svg @@ -0,0 +1,3 @@ +<svg version="1.1" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg"> + <rect x="2" y="2" width="24" height="24" rx="12" ry="12" fill="#fff" stroke="#ccc" stroke-width=".92308"/> +</svg> commit 3a2cfc646afe5e2b8a1ff0bdb215897931268ba6 Author: Tomaž Vajngerl <[email protected]> AuthorDate: Wed Apr 3 22:11:41 2019 +0900 Commit: Tomaž Vajngerl <[email protected]> CommitDate: Thu Apr 4 22:21:41 2019 +0900 tdf#124155 fix slider to not go beyond rect bounds We need to ask the NWF for the size of the thumb and not just use the hard-coded value. Reviewed-on: https://gerrit.libreoffice.org/70201 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <[email protected]> (cherry picked from commit 9956cf0692058414ef3efdb0e8058fbb0b39f6bc) Change-Id: I98c6b5782c6a043fc358198ddf844d36d7aa90d6 diff --git a/include/vcl/slider.hxx b/include/vcl/slider.hxx index 426727c15ae7..ab7c035e52cc 100644 --- a/include/vcl/slider.hxx +++ b/include/vcl/slider.hxx @@ -36,6 +36,7 @@ private: long mnThumbPixOffset; long mnThumbPixRange; long mnThumbPixPos; + long mnThumbSize; long mnChannelPixOffset; long mnChannelPixRange; long mnChannelPixTop; diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx index c2af3bf820bc..f5f3984ad158 100644 --- a/vcl/source/control/slider.cxx +++ b/vcl/source/control/slider.cxx @@ -29,7 +29,6 @@ #define SLIDER_STATE_THUMB_DOWN ((sal_uInt16)0x0004) #define SLIDER_THUMB_SIZE 9 -#define SLIDER_THUMB_HALFSIZE 4 #define SLIDER_CHANNEL_OFFSET 0 #define SLIDER_CHANNEL_SIZE 4 #define SLIDER_CHANNEL_HALFSIZE 2 @@ -43,6 +42,7 @@ void Slider::ImplInit( vcl::Window* pParent, WinBits nStyle ) mnThumbPixOffset = 0; mnThumbPixRange = 0; mnThumbPixPos = 0; // between mnThumbPixOffset and mnThumbPixOffset+mnThumbPixRange + mnThumbSize = SLIDER_THUMB_SIZE; mnChannelPixOffset = 0; mnChannelPixRange = 0; mnChannelPixTop = 0; @@ -116,8 +116,8 @@ void Slider::ImplUpdateRects( bool bUpdate ) { if ( GetStyle() & WB_HORZ ) { - maThumbRect.Left() = mnThumbPixPos-SLIDER_THUMB_HALFSIZE; - maThumbRect.Right() = maThumbRect.Left()+SLIDER_THUMB_SIZE-1; + maThumbRect.Left() = mnThumbPixPos - (mnThumbSize / 2); + maThumbRect.Right() = maThumbRect.Left() + mnThumbSize - 1; if ( mnChannelPixOffset < maThumbRect.Left() ) { maChannel1Rect.Left() = mnChannelPixOffset; @@ -137,7 +137,7 @@ void Slider::ImplUpdateRects( bool bUpdate ) else maChannel2Rect.SetEmpty(); - const tools::Rectangle aControlRegion( tools::Rectangle( Point(0,0), Size( SLIDER_THUMB_SIZE, 10 ) ) ); + const tools::Rectangle aControlRegion(tools::Rectangle(Point(), Size(mnThumbSize, 10))); tools::Rectangle aThumbBounds, aThumbContent; if ( GetNativeControlRegion( ControlType::Slider, ControlPart::ThumbHorz, aControlRegion, ControlState::NONE, ImplControlValue(), @@ -150,8 +150,8 @@ void Slider::ImplUpdateRects( bool bUpdate ) } else { - maThumbRect.Top() = mnThumbPixPos-SLIDER_THUMB_HALFSIZE; - maThumbRect.Bottom() = maThumbRect.Top()+SLIDER_THUMB_SIZE-1; + maThumbRect.Top() = mnThumbPixPos - (mnThumbSize / 2); + maThumbRect.Bottom() = maThumbRect.Top() + mnThumbSize - 1; if ( mnChannelPixOffset < maThumbRect.Top() ) { maChannel1Rect.Top() = mnChannelPixOffset; @@ -171,7 +171,7 @@ void Slider::ImplUpdateRects( bool bUpdate ) else maChannel2Rect.SetEmpty(); - const tools::Rectangle aControlRegion( tools::Rectangle( Point(0,0), Size( 10, SLIDER_THUMB_SIZE ) ) ); + const tools::Rectangle aControlRegion(tools::Rectangle(Point(), Size(10, mnThumbSize))); tools::Rectangle aThumbBounds, aThumbContent; if ( GetNativeControlRegion( ControlType::Slider, ControlPart::ThumbVert, aControlRegion, ControlState::NONE, ImplControlValue(), @@ -248,8 +248,39 @@ void Slider::ImplCalc( bool bUpdate ) { bool bInvalidateAll = false; - if ( mbCalcSize ) + if (mbCalcSize) { + if (GetStyle() & WB_HORZ) + { + const tools::Rectangle aControlRegion(tools::Rectangle(Point(), Size(SLIDER_THUMB_SIZE, 10))); + tools::Rectangle aThumbBounds, aThumbContent; + if (GetNativeControlRegion(ControlType::Slider, ControlPart::ThumbHorz, + aControlRegion, ControlState::NONE, ImplControlValue(), + aThumbBounds, aThumbContent)) + { + mnThumbSize = aThumbBounds.GetWidth(); + } + else + { + mnThumbSize = SLIDER_THUMB_SIZE; + } + } + else + { + const tools::Rectangle aControlRegion(tools::Rectangle(Point(), Size(10, SLIDER_THUMB_SIZE))); + tools::Rectangle aThumbBounds, aThumbContent; + if (GetNativeControlRegion( ControlType::Slider, ControlPart::ThumbVert, + aControlRegion, ControlState::NONE, ImplControlValue(), + aThumbBounds, aThumbContent)) + { + mnThumbSize = aThumbBounds.GetHeight(); + } + else + { + mnThumbSize = SLIDER_THUMB_SIZE; + } + } + long nOldChannelPixOffset = mnChannelPixOffset; long nOldChannelPixRange = mnChannelPixRange; long nOldChannelPixTop = mnChannelPixTop; @@ -277,10 +308,10 @@ void Slider::ImplCalc( bool bUpdate ) maThumbRect.Right() = aSize.Width()-1; } - if ( nCalcWidth >= SLIDER_THUMB_SIZE ) + if (nCalcWidth >= mnThumbSize) { - mnThumbPixOffset = SLIDER_THUMB_HALFSIZE; - mnThumbPixRange = nCalcWidth-(SLIDER_THUMB_HALFSIZE*2); + mnThumbPixOffset = mnThumbSize / 2; + mnThumbPixRange = nCalcWidth - mnThumbSize; mnThumbPixPos = 0; mnChannelPixOffset = SLIDER_CHANNEL_OFFSET; mnChannelPixRange = nCalcWidth-(SLIDER_CHANNEL_OFFSET*2); @@ -951,7 +982,7 @@ void Slider::SetThumbPos( long nNewThumbPos ) Size Slider::CalcWindowSizePixel() { - long nWidth = mnMaxRange-mnMinRange+(SLIDER_THUMB_HALFSIZE*2)+1; + long nWidth = mnMaxRange - mnMinRange + mnThumbSize + 1; long nHeight = SLIDER_HEIGHT; Size aSize; if ( GetStyle() & WB_HORZ ) commit cf43b676044773414fd35172e5e98422a555ede5 Author: Tomaž Vajngerl <[email protected]> AuthorDate: Wed Apr 3 12:21:08 2019 +0900 Commit: Tomaž Vajngerl <[email protected]> CommitDate: Thu Apr 4 21:50:11 2019 +0900 tdf#124155 change "gradient tab page" - increment & angle slider Remove slider for increments as the increments should better be left to "auto" and rarely modified (setting a value means it will use a limitied amount of increments, but auto effectively means as much as it is needed and can use the native backend for drawing). OTOH use a slider for setting the "angle" as it is already present in hatch tab page. Angle needs a slider as it is usually one of the main properties of a gradient (especially linear). Increase the tab pages a bit (10px on every side) to have a bit of breating space for all the widgets. Reviewed-on: https://gerrit.libreoffice.org/70175 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <[email protected]> (cherry picked from commit 994b41a6c69d20637dcb95894c385f5c0102d600) Change-Id: I66167fe2c97b53bc3627237279332bdd59fb03d7 diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index f180f133d6b3..eb90d8a1cb8d 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -353,6 +353,7 @@ private: VclPtr<MetricField> m_pMtrCenterY; VclPtr<FixedText> m_pFtAngle; VclPtr<MetricField> m_pMtrAngle; + VclPtr<Slider> m_pSliderAngle; VclPtr<MetricField> m_pMtrBorder; VclPtr<Slider> m_pSliderBorder; VclPtr<SvxColorListBox> m_pLbColorFrom; @@ -362,7 +363,6 @@ private: VclPtr<SvxPresetListBox> m_pGradientLB; VclPtr<NumericField> m_pMtrIncrement; VclPtr<CheckBox> m_pCbIncrement; - VclPtr<Slider> m_pSliderIncrement; VclPtr<SvxXRectPreview> m_pCtlPreview; VclPtr<PushButton> m_pBtnAdd; VclPtr<PushButton> m_pBtnModify; diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index 38c53d4980e1..d4bf3fb14e6c 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -145,6 +145,8 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs lclExtendSize(aSize, m_pFillTabPage->GetOptimalSize()); m_pFillTabPage.disposeAndClear(); + aSize.extendBy(10, 10); // apply a bit of margin + m_pFillTab->set_width_request(aSize.Width()); m_pFillTab->set_height_request(aSize.Height()); } diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index 86cb408c1a01..a57094674bf1 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -67,13 +67,13 @@ SvxGradientTabPage::SvxGradientTabPage { get(m_pCbIncrement, "autoincrement"); get(m_pMtrIncrement, "incrementmtr"); - get(m_pSliderIncrement,"incrementslider"); get(m_pLbGradientType, "gradienttypelb"); get(m_pFtCenter, "centerft"); get(m_pMtrCenterX, "centerxmtr"); get(m_pMtrCenterY, "centerymtr"); get(m_pFtAngle, "angleft"); get(m_pMtrAngle, "anglemtr"); + get(m_pSliderAngle, "angleslider"); get(m_pMtrBorder, "bordermtr"); get(m_pSliderBorder, "borderslider"); get(m_pLbColorFrom, "colorfromlb"); @@ -94,10 +94,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)); + m_pSliderAngle->SetRange(Range(0,359)); // setting the output device m_rXFSet.Put( XFillStyleItem(drawing::FillStyle_GRADIENT) ); @@ -117,10 +117,10 @@ SvxGradientTabPage::SvxGradientTabPage m_pLbGradientType->SetSelectHdl( aLink2 ); m_pCbIncrement->SetToggleHdl( LINK( this, SvxGradientTabPage, ChangeAutoStepHdl_Impl ) ); 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_pSliderAngle->SetSlideHdl( LINK( this, SvxGradientTabPage, ModifiedSliderHdl_Impl ) ); m_pMtrBorder->SetModifyHdl( aLink ); m_pSliderBorder->SetSlideHdl( LINK( this, SvxGradientTabPage, ModifiedSliderHdl_Impl ) ); m_pMtrColorFrom->SetModifyHdl( aLink ); @@ -144,13 +144,13 @@ void SvxGradientTabPage::dispose() { m_pCbIncrement.clear(); m_pMtrIncrement.clear(); - m_pSliderIncrement.clear(); m_pLbGradientType.clear(); m_pFtCenter.clear(); m_pMtrCenterX.clear(); m_pMtrCenterY.clear(); m_pFtAngle.clear(); m_pMtrAngle.clear(); + m_pSliderAngle.clear(); m_pMtrBorder.clear(); m_pSliderBorder.clear(); m_pLbColorFrom.clear(); @@ -262,7 +262,6 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet ) void SvxGradientTabPage::Reset( const SfxItemSet* ) { m_pMtrIncrement->SetValue(DEFAULT_GRADIENTSTEP); - m_pSliderIncrement->SetThumbPos(DEFAULT_GRADIENTSTEP); ChangeGradientHdl_Impl(); // determine state of the buttons @@ -308,12 +307,10 @@ IMPL_LINK_NOARG( SvxGradientTabPage, ChangeAutoStepHdl_Impl, CheckBox&, void ) { if(m_pCbIncrement->IsChecked()) { - m_pSliderIncrement->Disable(); m_pMtrIncrement->Disable(); } else { - m_pSliderIncrement->Enable(); m_pMtrIncrement->Enable(); } ModifiedHdl_Impl(m_pMtrIncrement); @@ -325,10 +322,10 @@ void SvxGradientTabPage::ModifiedHdl_Impl( void const * pControl ) 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() ); + if( pControl == m_pMtrAngle ) + m_pSliderAngle->SetThumbPos( m_pMtrAngle->GetValue() ); + if(pControl == m_pSliderAngle) + m_pMtrAngle->SetValue( m_pSliderAngle->GetThumbPos() ); css::awt::GradientStyle eXGS = (css::awt::GradientStyle) m_pLbGradientType->GetSelectedEntryPos(); @@ -581,15 +578,12 @@ void SvxGradientTabPage::ChangeGradientHdl_Impl() { m_pCbIncrement->SetState(TRISTATE_TRUE); m_pMtrIncrement->Disable(); - m_pSliderIncrement->Disable(); } else { m_pCbIncrement->SetState(TRISTATE_FALSE); m_pMtrIncrement->Enable(); m_pMtrIncrement->SetValue( nValue ); - m_pSliderIncrement->Enable(); - m_pSliderIncrement->SetThumbPos( nValue ); } m_pLbGradientType->SelectEntryPos( sal::static_int_cast< sal_Int32 >( eXGS ) ); @@ -602,6 +596,7 @@ void SvxGradientTabPage::ChangeGradientHdl_Impl() m_pLbColorTo->SelectEntry( pGradient->GetEndColor() ); m_pMtrAngle->SetValue( pGradient->GetAngle() / 10 ); // should be changed in resource + m_pSliderAngle->SetThumbPos( pGradient->GetAngle() / 10 ); m_pMtrBorder->SetValue( pGradient->GetBorder() ); m_pSliderBorder->SetThumbPos( pGradient->GetBorder() ); m_pMtrCenterX->SetValue( pGradient->GetXOffset() ); @@ -633,6 +628,7 @@ void SvxGradientTabPage::SetControlState_Impl( css::awt::GradientStyle eXGS ) m_pMtrCenterY->Disable(); m_pFtAngle->Enable(); m_pMtrAngle->Enable(); + m_pSliderAngle->Enable(); break; case css::awt::GradientStyle_RADIAL: @@ -641,6 +637,7 @@ void SvxGradientTabPage::SetControlState_Impl( css::awt::GradientStyle eXGS ) m_pMtrCenterY->Enable(); m_pFtAngle->Disable(); m_pMtrAngle->Disable(); + m_pSliderAngle->Disable(); break; case css::awt::GradientStyle_ELLIPTICAL: @@ -649,6 +646,7 @@ void SvxGradientTabPage::SetControlState_Impl( css::awt::GradientStyle eXGS ) m_pMtrCenterY->Enable(); m_pFtAngle->Enable(); m_pMtrAngle->Enable(); + m_pSliderAngle->Enable(); break; case css::awt::GradientStyle_SQUARE: @@ -658,6 +656,7 @@ void SvxGradientTabPage::SetControlState_Impl( css::awt::GradientStyle eXGS ) m_pMtrCenterY->Enable(); m_pFtAngle->Enable(); m_pMtrAngle->Enable(); + m_pSliderAngle->Enable(); break; default: break; diff --git a/cui/uiconfig/ui/gradientpage.ui b/cui/uiconfig/ui/gradientpage.ui index 1c278de00ce1..daa95c0255e6 100644 --- a/cui/uiconfig/ui/gradientpage.ui +++ b/cui/uiconfig/ui/gradientpage.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.0"/> <requires lib="LibreOffice" version="1.0"/> @@ -203,19 +203,7 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkScale" id="incrementslider"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hexpand">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">2</property> + <property name="width">2</property> </packing> </child> <child> @@ -227,7 +215,7 @@ </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">2</property> + <property name="top_attach">1</property> </packing> </child> <child> @@ -236,6 +224,7 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="hexpand">True</property> <property name="use_underline">True</property> <property name="xalign">0</property> <property name="draw_indicator">True</property> @@ -245,12 +234,6 @@ <property name="top_attach">1</property> </packing> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="expand">False</property> @@ -266,33 +249,6 @@ <property name="row_spacing">3</property> <property name="column_spacing">6</property> <child> - <object class="GtkLabel" id="angleft"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes" context="gradientpage|angleft">A_ngle:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">anglemtr:0degrees</property> - <property name="xalign">0</property> - <property name="yalign">0.43999999761581421</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkSpinButton" id="anglemtr:0degrees"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="invisible_char">●</property> - <property name="adjustment">angleadjustment</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> - </packing> - </child> - <child> <object class="GtkLabel" id="centerft"> <property name="visible">True</property> <property name="can_focus">False</property> @@ -304,6 +260,7 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">0</property> + <property name="width">2</property> </packing> </child> <child> @@ -344,11 +301,12 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">1</property> + <property name="width">2</property> </packing> </child> </object> <packing> - <property name="expand">True</property> + <property name="expand">False</property> <property name="fill">True</property> <property name="position">2</property> </packing> @@ -372,7 +330,8 @@ </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="top_attach">2</property> + <property name="width">2</property> </packing> </child> <child> @@ -385,7 +344,7 @@ </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="top_attach">3</property> </packing> </child> <child> @@ -398,11 +357,50 @@ </object> <packing> <property name="left_attach">1</property> + <property name="top_attach">3</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="angleft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="gradientpage|angleft">A_ngle:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">anglemtr:0degrees</property> + <property name="xalign">0</property> + <property name="yalign">0.43999999761581421</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">2</property> + </packing> + </child> + <child> + <object class="GtkScale" id="angleslider"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="draw_value">False</property> + </object> + <packing> + <property name="left_attach">0</property> <property name="top_attach">1</property> </packing> </child> <child> - <placeholder/> + <object class="GtkSpinButton" id="anglemtr:0degrees"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="halign">end</property> + <property name="invisible_char">●</property> + <property name="adjustment">angleadjustment</property> + <property name="value">15</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + </packing> </child> </object> <packing> @@ -430,12 +428,14 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">0</property> + <property name="width">2</property> </packing> </child> <child> <object class="svxcorelo-SvxColorListBox" id="colorfromlb"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="hexpand">True</property> <property name="entry_text_column">0</property> <property name="id_column">1</property> </object> @@ -457,9 +457,6 @@ <property name="top_attach">1</property> </packing> </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="expand">True</property> @@ -478,6 +475,7 @@ <object class="svxcorelo-SvxColorListBox" id="colortolb"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="hexpand">True</property> <property name="entry_text_column">0</property> <property name="id_column">1</property> </object> @@ -511,11 +509,9 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">0</property> + <property name="width">2</property> </packing> </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="expand">False</property> diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx index c4dd2e6fd02b..77e90a266245 100644 --- a/include/tools/gen.hxx +++ b/include/tools/gen.hxx @@ -195,6 +195,12 @@ public: long getHeight() const { return Height(); } void setWidth(long nWidth) { Width() = nWidth; } void setHeight(long nHeight) { Height() = nHeight; } + + void extendBy(long x, long y) + { + nA += x; + nB += y; + } }; inline bool operator ==(Size const & s1, Size const & s2) _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
