diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-04-12 10:38:11 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-04-12 10:42:35 +0100 |
commit | fd8324adb1e8024a0bb37bf096cf5988be1ead62 (patch) | |
tree | bbe1d89f1da8eace79e3bbb50b87280b2168deb9 /sw | |
parent | 3ce8127936548eccf0646319ffd35c7beaaee603 (diff) |
use a size-group for the labels to get things to align nicely
It appears I have a small bug in how size-groups and/or generic size-requests
work. It seems that margins should be part of the request, but I'm adding those
on after the request, not as part of the request. But we can workaround that by
putting a one element box around the elements with margins and put those boxes
into the size group instead. That way it works now, and will continue to work
after I change the request+margin logic
tristates are a pain, They are always set to "state unknown" on .ui load, while
in .src load they default to "state nocheck". So to be super sure that the
logic is unchanged set them explicitly initially in .cxx to "state nocheck"
restore accessibility relationship between tristate used as a label and the
labeled thing.
Change-Id: Ibf4879c3e9a4ecc4726896479377f51bf727b238
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/chrdlg/numpara.cxx | 10 | ||||
-rw-r--r-- | sw/source/ui/misc/pggrid.cxx | 2 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/numparapage.ui | 172 |
3 files changed, 91 insertions, 93 deletions
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index e4d13af40ef6..96a528025a53 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -42,7 +42,7 @@ static sal_uInt16 aPageRg[] = { }; SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent, const SfxItemSet& rAttr ) : - SfxTabPage(pParent, "NumParaPage", "/modules/swriter/ui/numparapage.ui", rAttr), + SfxTabPage(pParent, "NumParaPage", "modules/swriter/ui/numparapage.ui", rAttr), msOutlineNumbering( SW_RES( STR_OUTLINE_NUMBERING ) ), bModified(sal_False), @@ -56,12 +56,16 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent, const SfxItemSet& get(m_pNewStartBX, "boxNEW_START"); get(m_pNewStartCB, "checkCB_NEW_START"); + m_pNewStartCB->SetState(STATE_NOCHECK); get(m_pNewStartNumberCB, "checkCB_NUMBER_NEW_START"); + m_pNewStartNumberCB->SetState(STATE_NOCHECK); get(m_pNewStartNF, "spinNF_NEW_START"); get(m_pCountParaFram, "frameFL_COUNT_PARA"); get(m_pCountParaCB, "checkCB_COUNT_PARA"); + m_pCountParaCB->SetState(STATE_NOCHECK); get(m_pRestartParaCountCB, "checkCB_RESTART_PARACOUNT"); + m_pRestartParaCountCB->SetState(STATE_NOCHECK); get(m_pRestartBX, "boxRESTART_NO"); get(m_pRestartNF, "spinNF_RESTART_PARA"); @@ -74,8 +78,8 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent, const SfxItemSet& { sal_uInt16 nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue(); - if(HTMLMODE_ON & nHtmlMode) - m_pCountParaFram->Hide(); + if (HTMLMODE_ON & nHtmlMode) + m_pCountParaFram->Hide(); } m_pNewStartCB->SetClickHdl(LINK(this, SwParagraphNumTabPage, NewStartHdl_Impl)); diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index ed05263af82d..f45804bc726b 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -41,7 +41,7 @@ #include "view.hxx" SwTextGridPage::SwTextGridPage(Window *pParent, const SfxItemSet &rSet) : - SfxTabPage(pParent, "TextGridPage","/modules/swriter/ui/textgridpage.ui", rSet), + SfxTabPage(pParent, "TextGridPage", "modules/swriter/ui/textgridpage.ui", rSet), m_nRubyUserValue(0), m_bRubyUserValue(sal_False), m_aPageSize(MM50, MM50), diff --git a/sw/uiconfig/swriter/ui/numparapage.ui b/sw/uiconfig/swriter/ui/numparapage.ui index e7209f1ad383..6ccd65ac1e06 100644 --- a/sw/uiconfig/swriter/ui/numparapage.ui +++ b/sw/uiconfig/swriter/ui/numparapage.ui @@ -41,7 +41,10 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="halign">start</property> + <property name="xalign">0</property> <property name="label" translatable="yes">Outline level:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">comboLB_OUTLINE_LEVEL</property> </object> <packing> <property name="expand">False</property> @@ -50,10 +53,24 @@ </packing> </child> <child> - <object class="GtkComboBox" id="comboLB_OUTLINE_LEVEL"> + <object class="GtkComboBoxText" id="comboLB_OUTLINE_LEVEL"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="model">liststoreOUTLINE_LEVEL</property> + <property name="entry_text_column">0</property> + <property name="id_column">1</property> + <items> + <item translatable="yes">Body text</item> + <item translatable="yes">Level 1</item> + <item translatable="yes">Level 2</item> + <item translatable="yes">Level 3</item> + <item translatable="yes">Level 4</item> + <item translatable="yes">Level 5</item> + <item translatable="yes">Level 6</item> + <item translatable="yes">Level 7</item> + <item translatable="yes">Level 8</item> + <item translatable="yes">Level 9</item> + <item translatable="yes">Level 10</item> + </items> </object> <packing> <property name="expand">False</property> @@ -104,12 +121,13 @@ <object class="GtkBox" id="boxNUMBER_STYLE"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="spacing">6</property> + <property name="spacing">12</property> <child> <object class="GtkLabel" id="labelFT_NUMBER_STYLE"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="halign">start</property> + <property name="xalign">0</property> <property name="label" translatable="yes">_Numbering style:</property> <property name="use_underline">True</property> </object> @@ -120,10 +138,14 @@ </packing> </child> <child> - <object class="GtkComboBox" id="comboLB_NUMBER_STYLE"> + <object class="GtkComboBoxText" id="comboLB_NUMBER_STYLE"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="model">liststoreNUMBERING</property> + <property name="entry_text_column">0</property> + <property name="id_column">1</property> + <items> + <item translatable="yes">None</item> + </items> </object> <packing> <property name="expand">False</property> @@ -143,6 +165,7 @@ <property name="label" translatable="yes">R_estart at this paragraph</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="no_show_all">True</property> <property name="relief">none</property> <property name="use_underline">True</property> <property name="xalign">0</property> @@ -157,18 +180,35 @@ </child> <child> <object class="GtkBox" id="boxNEW_START"> + <property name="sensitive">False</property> <property name="can_focus">False</property> - <property name="spacing">6</property> + <property name="spacing">12</property> <child> - <object class="GtkCheckButton" id="checkCB_NUMBER_NEW_START"> - <property name="label" translatable="yes">S_tart with:</property> + <object class="GtkBox" id="box4"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="xalign">0</property> - <property name="inconsistent">True</property> - <property name="draw_indicator">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkCheckButton" id="checkCB_NUMBER_NEW_START"> + <property name="label" translatable="yes">S_tart with:</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="margin_left">12</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="inconsistent">True</property> + <property name="draw_indicator">True</property> + <accessibility> + <relation type="label-for" target="spinNF_NEW_START"/> + </accessibility> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> @@ -273,17 +313,31 @@ <child> <object class="GtkBox" id="boxRESTART_NO"> <property name="visible">True</property> + <property name="sensitive">False</property> <property name="can_focus">False</property> - <property name="spacing">6</property> + <property name="spacing">12</property> <child> - <object class="GtkLabel" id="labelFT_RESTART_NO"> + <object class="GtkBox" id="box3"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="margin_left">12</property> - <property name="label" translatable="yes">_Start with:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">spinNF_RESTART_PARA</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="labelFT_RESTART_NO"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="margin_left">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Start with:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">spinNF_RESTART_PARA</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> @@ -334,74 +388,6 @@ </packing> </child> </object> - <object class="GtkListStore" id="liststoreNUMBERING"> - <columns> - <!-- column-name gchararray1 --> - <column type="gchararray"/> - <!-- column-name guint1 --> - <column type="guint"/> - </columns> - <data> - <row> - <col id="0" translatable="yes">None</col> - <col id="1">1</col> - </row> - </data> - </object> - <object class="GtkListStore" id="liststoreOUTLINE_LEVEL"> - <columns> - <!-- column-name gchararray1 --> - <column type="gchararray"/> - <!-- column-name guint1 --> - <column type="guint"/> - </columns> - <data> - <row> - <col id="0" translatable="yes">Body text</col> - <col id="1">0</col> - </row> - <row> - <col id="0" translatable="yes">Level 1</col> - <col id="1">1</col> - </row> - <row> - <col id="0" translatable="yes">Level 2</col> - <col id="1">2</col> - </row> - <row> - <col id="0" translatable="yes">Level 3</col> - <col id="1">3</col> - </row> - <row> - <col id="0" translatable="yes">Level 4</col> - <col id="1">4</col> - </row> - <row> - <col id="0" translatable="yes">Level 5</col> - <col id="1">5</col> - </row> - <row> - <col id="0" translatable="yes">Level 6</col> - <col id="1">6</col> - </row> - <row> - <col id="0" translatable="yes">Level 7</col> - <col id="1">7</col> - </row> - <row> - <col id="0" translatable="yes">Level 8</col> - <col id="1">8</col> - </row> - <row> - <col id="0" translatable="yes">Level 9</col> - <col id="1">9</col> - </row> - <row> - <col id="0" translatable="yes">Level 10</col> - <col id="1">10</col> - </row> - </data> - </object> <object class="GtkSizeGroup" id="sizegroup1"> <widgets> <widget name="comboLB_OUTLINE_LEVEL"/> @@ -410,4 +396,12 @@ <widget name="spinNF_RESTART_PARA"/> </widgets> </object> + <object class="GtkSizeGroup" id="sizegroup2"> + <widgets> + <widget name="labelFT_OUTLINE_LEVEL"/> + <widget name="labelFT_NUMBER_STYLE"/> + <widget name="box4"/> + <widget name="box3"/> + </widgets> + </object> </interface> |