vcl/source/window/builder.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 6a71408b00b99b3dc841b0a0812b5388f3e0ebed Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Aug 28 13:17:10 2018 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Aug 28 16:11:08 2018 +0200 create toggles with WB_TOGGLE set Change-Id: Ic4142b6f80f2b47e745c4d2bd898c6aef865ca36 Reviewed-on: https://gerrit.libreoffice.org/59703 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 0394261e0248..458b836e77b3 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1003,9 +1003,11 @@ namespace pButton->SetCommandHandler(aCommand); } - VclPtr<Button> extractStockAndBuildPushButton(vcl::Window *pParent, VclBuilder::stringmap &rMap, bool bLegacy) + VclPtr<Button> extractStockAndBuildPushButton(vcl::Window *pParent, VclBuilder::stringmap &rMap, bool bToggle, bool bLegacy) { WinBits nBits = WB_CLIPCHILDREN|WB_CENTER|WB_VCENTER; + if (bToggle) + nBits |= WB_TOGGLE; nBits |= extractRelief(rMap); @@ -1511,7 +1513,7 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString & VclPtr<Button> xButton; OUString sMenu = BuilderUtils::extractCustomProperty(rMap); if (sMenu.isEmpty()) - xButton = extractStockAndBuildPushButton(pParent, rMap, m_bLegacy); + xButton = extractStockAndBuildPushButton(pParent, rMap, name == "GtkToggleButton", m_bLegacy); else { assert(m_bLegacy && "use GtkMenuButton"); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits