summaryrefslogtreecommitdiffstats
path: root/vcl
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2016-05-06 11:32:35 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2016-05-06 11:57:47 +0300
commitfe620cb2ac2cdd75e7dbdcc0af422dff58c4fb41 (patch)
tree407f442ec1e13e025009e17821a6a9794f738a12 /vcl
parentimprove perf. of VCL event dispatch, take II (diff)
downloadcore-fe620cb2ac2cdd75e7dbdcc0af422dff58c4fb41.tar.gz
core-fe620cb2ac2cdd75e7dbdcc0af422dff58c4fb41.zip
Set toggle/radio ToolBox bits in .ui too
The way gtk works doesn't exactly map to our ToolBox behavior, but still we can use that to some extent. Change-Id: Ia525e4356a612e3abfacb54d591dba05750278f2
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/builder.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index b55222ba38ad..74f1c7791411 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1647,7 +1647,8 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString &
{
xWindow = VclPtr<ToolBox>::Create(pParent, WB_3DLOOK | WB_TABSTOP);
}
- else if (name == "GtkToolButton" || name == "GtkMenuToolButton")
+ else if (name == "GtkToolButton" || name == "GtkMenuToolButton" ||
+ name == "GtkToggleToolButton" || name == "GtkRadioToolButton")
{
ToolBox *pToolBox = dynamic_cast<ToolBox*>(pParent);
if (pToolBox)
@@ -1658,6 +1659,10 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString &
ToolBoxItemBits nBits = ToolBoxItemBits::NONE;
if (name == "GtkMenuToolButton")
nBits |= ToolBoxItemBits::DROPDOWN;
+ else if (name == "GtkToggleToolButton")
+ nBits |= ToolBoxItemBits::AUTOCHECK | ToolBoxItemBits::CHECKABLE;
+ else if (name == "GtkRadioToolButton")
+ nBits |= ToolBoxItemBits::AUTOCHECK | ToolBoxItemBits::RADIOCHECK;
if (!aCommand.isEmpty() && m_xFrame.is())
{