diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2016-05-06 11:32:35 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2016-05-06 11:57:47 +0300 |
commit | fe620cb2ac2cdd75e7dbdcc0af422dff58c4fb41 (patch) | |
tree | 407f442ec1e13e025009e17821a6a9794f738a12 /svx | |
parent | 2fb31f248fe86c52c1070cbc8b18b24872a4bedc (diff) |
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 'svx')
-rw-r--r-- | svx/source/dialog/fontwork.cxx | 15 | ||||
-rw-r--r-- | svx/uiconfig/ui/dockingfontwork.ui | 38 |
2 files changed, 23 insertions, 30 deletions
diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx index 4c67b92b072d..a7cc7e914962 100644 --- a/svx/source/dialog/fontwork.cxx +++ b/svx/source/dialog/fontwork.cxx @@ -193,42 +193,27 @@ SvxFontWorkDialog::SvxFontWorkDialog(SfxBindings *pBindinx, get(m_pTbxStyle, "style"); nStyleOffId = m_pTbxStyle->GetItemId(0); - m_pTbxStyle->SetItemBits(nStyleOffId, ToolBoxItemBits::AUTOCHECK); // separator is item "1" nStyleRotateId = m_pTbxStyle->GetItemId(2); - m_pTbxStyle->SetItemBits(nStyleRotateId, ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::RADIOCHECK); nStyleUprightId = m_pTbxStyle->GetItemId(3); - m_pTbxStyle->SetItemBits(nStyleUprightId, ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::RADIOCHECK); nStyleSlantXId = m_pTbxStyle->GetItemId(4); - m_pTbxStyle->SetItemBits(nStyleSlantXId, ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::RADIOCHECK); nStyleSlantYId = m_pTbxStyle->GetItemId(5); - m_pTbxStyle->SetItemBits(nStyleSlantYId, ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::RADIOCHECK); get(m_pTbxShadow, "shadow"); nShowFormId = m_pTbxShadow->GetItemId(0); - m_pTbxShadow->SetItemBits(nShowFormId, ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::CHECKABLE); nOutlineId = m_pTbxShadow->GetItemId(1); - m_pTbxShadow->SetItemBits(nOutlineId, ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::CHECKABLE); // separator is item "2" nShadowOffId = m_pTbxShadow->GetItemId(3); - m_pTbxShadow->SetItemBits(nShadowOffId, ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::RADIOCHECK); nShadowNormalId = m_pTbxShadow->GetItemId(4); - m_pTbxShadow->SetItemBits(nShadowNormalId, ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::RADIOCHECK); nShadowSlantId = m_pTbxShadow->GetItemId(5); - m_pTbxShadow->SetItemBits(nShadowSlantId, ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::RADIOCHECK); get(m_pTbxAdjust, "adjust"); nAdjustMirrorId = m_pTbxAdjust->GetItemId(0); - m_pTbxAdjust->SetItemBits(nAdjustMirrorId, ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::CHECKABLE); // separator is item "1" nAdjustLeftId = m_pTbxAdjust->GetItemId(2); - m_pTbxAdjust->SetItemBits(nAdjustLeftId, ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::RADIOCHECK); nAdjustCenterId = m_pTbxAdjust->GetItemId(3); - m_pTbxAdjust->SetItemBits(nAdjustCenterId, ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::RADIOCHECK); nAdjustRightId = m_pTbxAdjust->GetItemId(4); - m_pTbxAdjust->SetItemBits(nAdjustRightId, ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::RADIOCHECK); nAdjustAutoSizeId = m_pTbxAdjust->GetItemId(5); - m_pTbxAdjust->SetItemBits(nAdjustAutoSizeId, ToolBoxItemBits::AUTOCHECK|ToolBoxItemBits::RADIOCHECK); ApplyImageList(); diff --git a/svx/uiconfig/ui/dockingfontwork.ui b/svx/uiconfig/ui/dockingfontwork.ui index 382f26925937..0c729be1b10e 100644 --- a/svx/uiconfig/ui/dockingfontwork.ui +++ b/svx/uiconfig/ui/dockingfontwork.ui @@ -27,7 +27,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkToolButton" id="off"> + <object class="GtkToggleToolButton" id="off"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="tooltip_text" translatable="yes">Off</property> @@ -50,7 +50,7 @@ </packing> </child> <child> - <object class="GtkToolButton" id="rotate"> + <object class="GtkRadioToolButton" id="rotate"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="tooltip_text" translatable="yes">Rotate</property> @@ -63,12 +63,13 @@ </packing> </child> <child> - <object class="GtkToolButton" id="upright"> + <object class="GtkRadioToolButton" id="upright"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="tooltip_text" translatable="yes">Upright</property> <property name="use_underline">True</property> <property name="icon_name">svx/res/fw03.png</property> + <property name="group">rotate</property> </object> <packing> <property name="expand">False</property> @@ -76,12 +77,13 @@ </packing> </child> <child> - <object class="GtkToolButton" id="hori"> + <object class="GtkRadioToolButton" id="hori"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="tooltip_text" translatable="yes">Slant Horizontal</property> <property name="use_underline">True</property> <property name="icon_name">svx/res/fw04.png</property> + <property name="group">rotate</property> </object> <packing> <property name="expand">False</property> @@ -89,12 +91,13 @@ </packing> </child> <child> - <object class="GtkToolButton" id="vert"> + <object class="GtkRadioToolButton" id="vert"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="tooltip_text" translatable="yes">Slant Vertical</property> <property name="use_underline">True</property> <property name="icon_name">svx/res/fw05.png</property> + <property name="group">rotate</property> </object> <packing> <property name="expand">False</property> @@ -112,7 +115,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkToolButton" id="orientation"> + <object class="GtkToggleToolButton" id="orientation"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="tooltip_text" translatable="yes">Orientation</property> @@ -135,7 +138,7 @@ </packing> </child> <child> - <object class="GtkToolButton" id="left"> + <object class="GtkRadioToolButton" id="left"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="tooltip_text" translatable="yes">Align Left</property> @@ -148,12 +151,13 @@ </packing> </child> <child> - <object class="GtkToolButton" id="center"> + <object class="GtkRadioToolButton" id="center"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="tooltip_text" translatable="yes">Center</property> <property name="use_underline">True</property> <property name="icon_name">svx/res/fw08.png</property> + <property name="group">left</property> </object> <packing> <property name="expand">False</property> @@ -161,12 +165,13 @@ </packing> </child> <child> - <object class="GtkToolButton" id="right"> + <object class="GtkRadioToolButton" id="right"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="tooltip_text" translatable="yes">Align Right</property> <property name="use_underline">True</property> <property name="icon_name">svx/res/fw09.png</property> + <property name="group">left</property> </object> <packing> <property name="expand">False</property> @@ -174,12 +179,13 @@ </packing> </child> <child> - <object class="GtkToolButton" id="autosize"> + <object class="GtkRadioToolButton" id="autosize"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="tooltip_text" translatable="yes">AutoSize Text</property> <property name="use_underline">True</property> <property name="icon_name">svx/res/fw010.png</property> + <property name="group">left</property> </object> <packing> <property name="expand">False</property> @@ -272,7 +278,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkToolButton" id="contour"> + <object class="GtkToggleToolButton" id="contour"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="tooltip_text" translatable="yes">Contour</property> @@ -285,7 +291,7 @@ </packing> </child> <child> - <object class="GtkToolButton" id="textcontour"> + <object class="GtkToggleToolButton" id="textcontour"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="tooltip_text" translatable="yes">Text Contour</property> @@ -308,7 +314,7 @@ </packing> </child> <child> - <object class="GtkToolButton" id="noshadow"> + <object class="GtkRadioToolButton" id="noshadow"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="tooltip_text" translatable="yes">No Shadow</property> @@ -321,12 +327,13 @@ </packing> </child> <child> - <object class="GtkToolButton" id="vertical"> + <object class="GtkRadioToolButton" id="vertical"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="tooltip_text" translatable="yes">Vertical</property> <property name="use_underline">True</property> <property name="icon_name">svx/res/fw014.png</property> + <property name="group">noshadow</property> </object> <packing> <property name="expand">False</property> @@ -334,12 +341,13 @@ </packing> </child> <child> - <object class="GtkToolButton" id="slant"> + <object class="GtkRadioToolButton" id="slant"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="tooltip_text" translatable="yes">Slant</property> <property name="use_underline">True</property> <property name="icon_name">svx/res/fw015.png</property> + <property name="group">noshadow</property> </object> <packing> <property name="expand">False</property> |