diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-06-26 20:55:53 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-06-27 16:18:28 +0200 |
commit | 76df547f1790b3bd7cca013b7002575c8c766384 (patch) | |
tree | 944ee63763e52f1d7131c55bc2b4474921b76c4d /vcl/source/window/builder.cxx | |
parent | ca9b3ace07d2093d7c0bfcc8bffd74e5b1381478 (diff) |
map has-frame to WB_BORDER
Change-Id: I3f0aeceb3015bb09d6b82a631f3b001f9061d090
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97265
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/window/builder.cxx')
-rw-r--r-- | vcl/source/window/builder.cxx | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index d88c98528394..f718f1659b4b 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -897,6 +897,18 @@ void VclBuilder::disposeBuilder() namespace { + bool extractHasFrame(VclBuilder::stringmap& rMap) + { + bool bHasFrame = true; + VclBuilder::stringmap::iterator aFind = rMap.find("has-frame"); + if (aFind != rMap.end()) + { + bHasFrame = toBool(aFind->second); + rMap.erase(aFind); + } + return bHasFrame; + } + bool extractDrawValue(VclBuilder::stringmap& rMap) { bool bDrawValue = true; @@ -2142,7 +2154,10 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString & } else if (name == "GtkEntry") { - xWindow = VclPtr<Edit>::Create(pParent, WB_LEFT|WB_VCENTER|WB_BORDER|WB_3DLOOK); + WinBits nWinStyle = WB_LEFT|WB_VCENTER|WB_3DLOOK; + if (extractHasFrame(rMap)) + nWinStyle |= WB_BORDER; + xWindow = VclPtr<Edit>::Create(pParent, nWinStyle); BuilderUtils::ensureDefaultWidthChars(rMap); } else if (name == "GtkNotebook") |