[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sat Jun 27 14:19:03 UTC 2020
vcl/source/window/builder.cxx | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
New commits:
commit 76df547f1790b3bd7cca013b7002575c8c766384
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jun 26 20:55:53 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Jun 27 16:18:28 2020 +0200
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 at redhat.com>
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")
More information about the Libreoffice-commits
mailing list