chart2/source/controller/dialogs/tp_TitleRotation.cxx | 6 +++--- vcl/source/window/toolbox.cxx | 18 ++++++++---------- 2 files changed, 11 insertions(+), 13 deletions(-)
New commits: commit fd706799c8c91db340464c38ae8d4ca3dcf82575 Author: Caolán McNamara <[email protected]> AuthorDate: Tue Jul 7 15:03:35 2020 +0100 Commit: Michael Meeks <[email protected]> CommitDate: Sat Jul 11 11:57:57 2020 +0200 tdf#134603 [en|dis]able logic reversed Change-Id: I192b7a6da4bcd311e64a31d9dc2b4c2b422194cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98267 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98514 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Michael Meeks <[email protected]> diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx index 1cd5ecdf6558..022489881359 100644 --- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx +++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx @@ -61,10 +61,10 @@ SchAlignmentTabPage::SchAlignmentTabPage(weld::Container* pPage, weld::DialogCon IMPL_LINK_NOARG(SchAlignmentTabPage, StackedToggleHdl, weld::ToggleButton&, void) { bool bActive = m_xCbStacked->get_active(); - m_xNfRotate->set_sensitive(bActive); - m_xCtrlDial->set_sensitive(bActive); + m_xNfRotate->set_sensitive(!bActive); + m_xCtrlDial->set_sensitive(!bActive); m_aCtrlDial.StyleUpdated(); - m_xFtRotate->set_sensitive(bActive); + m_xFtRotate->set_sensitive(!bActive); } SchAlignmentTabPage::~SchAlignmentTabPage() commit bf0c2ad460d52f0dda94225eee775649faf1b3a1 Author: Jan-Marek Glogowski <[email protected]> AuthorDate: Mon Jun 29 07:01:26 2020 +0200 Commit: Michael Meeks <[email protected]> CommitDate: Sat Jul 11 11:57:44 2020 +0200 tdf#134054 toolbox: respect drop-down arrow rect When centering the text and icon on the button, the code didn't take the drop-down arrow rect width into account, resulting in an overlapped arrow. This is especially visible, if the drop-down is shown and the button is wrongly highlighted. There is supposed to be some vertical mode, which I couldn't find in the GUI, so this just adapts the width in horizontal mode. Change-Id: I194780dc32db610041ad0ee45a425e1026c7c4e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97358 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <[email protected]> (cherry picked from commit 8565546ce6a04f6f243f4f60d2693b148dca5a77) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97688 Reviewed-by: Thorsten Behrens <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98513 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Michael Meeks <[email protected]> diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 6a258340b7b0..e7a15643f111 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -2643,13 +2643,11 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si long nBtnWidth = aBtnSize.Width()-SMALLBUTTON_HSIZE; long nBtnHeight = aBtnSize.Height()-SMALLBUTTON_VSIZE; Size aImageSize; - Size aTxtSize; - if ( bText ) - { - aTxtSize.setWidth( GetCtrlTextWidth( pItem->maText ) ); - aTxtSize.setHeight( GetTextHeight() ); - } + const bool bDropDown = (pItem->mnBits & ToolBoxItemBits::DROPDOWN) == ToolBoxItemBits::DROPDOWN; + tools::Rectangle aDropDownRect; + if (bDropDown) + aDropDownRect = pItem->GetDropDownRect(mbHorz); if ( bImage ) { @@ -2680,7 +2678,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si } else { - nImageOffX += (nBtnWidth-aImageSize.Width())/2; + nImageOffX += (nBtnWidth-(bDropDown ? aDropDownRect.getWidth() : 0)+SMALLBUTTON_OFF_NORMAL_X-aImageSize.Width())/2; if ( meTextPosition == ToolBoxTextPosition::Right ) nImageOffY += (nBtnHeight-aImageSize.Height())/2; } @@ -2707,6 +2705,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si bool bRotate = false; if ( bText ) { + const Size aTxtSize(GetCtrlTextWidth(pItem->maText), GetTextHeight()); long nTextOffX = nOffX; long nTextOffY = nOffY; @@ -2744,7 +2743,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si else { // center horizontally - nTextOffX += (nBtnWidth-aTxtSize.Width() - TB_IMAGETEXTOFFSET)/2; + nTextOffX += (nBtnWidth-(bDropDown ? aDropDownRect.getWidth() : 0)+SMALLBUTTON_OFF_NORMAL_X-aTxtSize.Width() - TB_IMAGETEXTOFFSET)/2; // set vertical position nTextOffY += nBtnHeight - aTxtSize.Height(); } @@ -2770,9 +2769,8 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si } // paint optional drop down arrow - if ( pItem->mnBits & ToolBoxItemBits::DROPDOWN ) + if (bDropDown) { - tools::Rectangle aDropDownRect( pItem->GetDropDownRect( mbHorz ) ); bool bSetColor = true; if ( !pItem->mbEnabled || !IsEnabled() ) { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
