diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-02-14 09:39:34 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-02-14 09:51:34 +0000 |
commit | 431f0b0d21cae98f0578f18144c9b08142544329 (patch) | |
tree | 4f11053d9eaf239c1b6c2dbbd6a1c657536c5ad6 /vcl/source | |
parent | 97f04c8e9c3e798b0f319a4e1067c90e45e3507c (diff) |
add a custom wrap prop to radiobuttons/checkboxes
Change-Id: Idccf3eceb8e9c8a42027dc837eb6d5b405fece67
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/window/builder.cxx | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index ba42b99ef6e7..1f6d7d5f2e75 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -941,15 +941,23 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri { extractGroup(id, rMap); extractButtonImage(id, rMap, true); - pWindow = new RadioButton(pParent, WB_CENTER|WB_VCENTER|WB_3DLOOK); + WinBits nBits = WB_CENTER|WB_VCENTER|WB_3DLOOK; + OString sWrap = extractCustomProperty(rMap); + if (!sWrap.isEmpty()) + nBits |= WB_WORDBREAK; + pWindow = new RadioButton(pParent, nBits); } else if (name == "GtkCheckButton") { + WinBits nBits = WB_CENTER|WB_VCENTER|WB_3DLOOK; + OString sWrap = extractCustomProperty(rMap); + if (!sWrap.isEmpty()) + nBits |= WB_WORDBREAK; //maybe always import as TriStateBox and enable/disable tristate bool bIsTriState = extractInconsistent(rMap); CheckBox *pCheckBox = bIsTriState ? - new TriStateBox(pParent, WB_CENTER|WB_VCENTER|WB_3DLOOK) : - new CheckBox(pParent, WB_CENTER|WB_VCENTER|WB_3DLOOK); + new TriStateBox(pParent, nBits) : + new CheckBox(pParent, nBits); if (bIsTriState) pCheckBox->SetState(STATE_DONTKNOW); pWindow = pCheckBox; |