Kaydet (Commit) fd8324ad authored tarafından Caolán McNamara's avatar Caolán McNamara

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
üst 3ce81279
...@@ -42,7 +42,7 @@ static sal_uInt16 aPageRg[] = { ...@@ -42,7 +42,7 @@ static sal_uInt16 aPageRg[] = {
}; };
SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent, const SfxItemSet& rAttr ) : 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 ) ), msOutlineNumbering( SW_RES( STR_OUTLINE_NUMBERING ) ),
bModified(sal_False), bModified(sal_False),
...@@ -56,12 +56,16 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent, const SfxItemSet& ...@@ -56,12 +56,16 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent, const SfxItemSet&
get(m_pNewStartBX, "boxNEW_START"); get(m_pNewStartBX, "boxNEW_START");
get(m_pNewStartCB, "checkCB_NEW_START"); get(m_pNewStartCB, "checkCB_NEW_START");
m_pNewStartCB->SetState(STATE_NOCHECK);
get(m_pNewStartNumberCB, "checkCB_NUMBER_NEW_START"); get(m_pNewStartNumberCB, "checkCB_NUMBER_NEW_START");
m_pNewStartNumberCB->SetState(STATE_NOCHECK);
get(m_pNewStartNF, "spinNF_NEW_START"); get(m_pNewStartNF, "spinNF_NEW_START");
get(m_pCountParaFram, "frameFL_COUNT_PARA"); get(m_pCountParaFram, "frameFL_COUNT_PARA");
get(m_pCountParaCB, "checkCB_COUNT_PARA"); get(m_pCountParaCB, "checkCB_COUNT_PARA");
m_pCountParaCB->SetState(STATE_NOCHECK);
get(m_pRestartParaCountCB, "checkCB_RESTART_PARACOUNT"); get(m_pRestartParaCountCB, "checkCB_RESTART_PARACOUNT");
m_pRestartParaCountCB->SetState(STATE_NOCHECK);
get(m_pRestartBX, "boxRESTART_NO"); get(m_pRestartBX, "boxRESTART_NO");
get(m_pRestartNF, "spinNF_RESTART_PARA"); get(m_pRestartNF, "spinNF_RESTART_PARA");
...@@ -74,8 +78,8 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent, const SfxItemSet& ...@@ -74,8 +78,8 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent, const SfxItemSet&
{ {
sal_uInt16 nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue(); sal_uInt16 nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue();
if(HTMLMODE_ON & nHtmlMode) if (HTMLMODE_ON & nHtmlMode)
m_pCountParaFram->Hide(); m_pCountParaFram->Hide();
} }
m_pNewStartCB->SetClickHdl(LINK(this, SwParagraphNumTabPage, NewStartHdl_Impl)); m_pNewStartCB->SetClickHdl(LINK(this, SwParagraphNumTabPage, NewStartHdl_Impl));
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#include "view.hxx" #include "view.hxx"
SwTextGridPage::SwTextGridPage(Window *pParent, const SfxItemSet &rSet) : 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_nRubyUserValue(0),
m_bRubyUserValue(sal_False), m_bRubyUserValue(sal_False),
m_aPageSize(MM50, MM50), m_aPageSize(MM50, MM50),
......
...@@ -41,7 +41,10 @@ ...@@ -41,7 +41,10 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="halign">start</property> <property name="halign">start</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Outline level:</property> <property name="label" translatable="yes">Outline level:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">comboLB_OUTLINE_LEVEL</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -50,10 +53,24 @@ ...@@ -50,10 +53,24 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkComboBox" id="comboLB_OUTLINE_LEVEL"> <object class="GtkComboBoxText" id="comboLB_OUTLINE_LEVEL">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</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> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -104,12 +121,13 @@ ...@@ -104,12 +121,13 @@
<object class="GtkBox" id="boxNUMBER_STYLE"> <object class="GtkBox" id="boxNUMBER_STYLE">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="spacing">6</property> <property name="spacing">12</property>
<child> <child>
<object class="GtkLabel" id="labelFT_NUMBER_STYLE"> <object class="GtkLabel" id="labelFT_NUMBER_STYLE">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="halign">start</property> <property name="halign">start</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Numbering style:</property> <property name="label" translatable="yes">_Numbering style:</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
</object> </object>
...@@ -120,10 +138,14 @@ ...@@ -120,10 +138,14 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkComboBox" id="comboLB_NUMBER_STYLE"> <object class="GtkComboBoxText" id="comboLB_NUMBER_STYLE">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</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> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -143,6 +165,7 @@ ...@@ -143,6 +165,7 @@
<property name="label" translatable="yes">R_estart at this paragraph</property> <property name="label" translatable="yes">R_estart at this paragraph</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">False</property> <property name="receives_default">False</property>
<property name="no_show_all">True</property>
<property name="relief">none</property> <property name="relief">none</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
...@@ -157,18 +180,35 @@ ...@@ -157,18 +180,35 @@
</child> </child>
<child> <child>
<object class="GtkBox" id="boxNEW_START"> <object class="GtkBox" id="boxNEW_START">
<property name="sensitive">False</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="spacing">6</property> <property name="spacing">12</property>
<child> <child>
<object class="GtkCheckButton" id="checkCB_NUMBER_NEW_START"> <object class="GtkBox" id="box4">
<property name="label" translatable="yes">S_tart with:</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">False</property>
<property name="receives_default">False</property> <property name="orientation">vertical</property>
<property name="use_underline">True</property> <child>
<property name="xalign">0</property> <object class="GtkCheckButton" id="checkCB_NUMBER_NEW_START">
<property name="inconsistent">True</property> <property name="label" translatable="yes">S_tart with:</property>
<property name="draw_indicator">True</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> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -273,17 +313,31 @@ ...@@ -273,17 +313,31 @@
<child> <child>
<object class="GtkBox" id="boxRESTART_NO"> <object class="GtkBox" id="boxRESTART_NO">
<property name="visible">True</property> <property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="spacing">6</property> <property name="spacing">12</property>
<child> <child>
<object class="GtkLabel" id="labelFT_RESTART_NO"> <object class="GtkBox" id="box3">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="halign">start</property> <property name="orientation">vertical</property>
<property name="margin_left">12</property> <child>
<property name="label" translatable="yes">_Start with:</property> <object class="GtkLabel" id="labelFT_RESTART_NO">
<property name="use_underline">True</property> <property name="visible">True</property>
<property name="mnemonic_widget">spinNF_RESTART_PARA</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> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -334,74 +388,6 @@ ...@@ -334,74 +388,6 @@
</packing> </packing>
</child> </child>
</object> </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"> <object class="GtkSizeGroup" id="sizegroup1">
<widgets> <widgets>
<widget name="comboLB_OUTLINE_LEVEL"/> <widget name="comboLB_OUTLINE_LEVEL"/>
...@@ -410,4 +396,12 @@ ...@@ -410,4 +396,12 @@
<widget name="spinNF_RESTART_PARA"/> <widget name="spinNF_RESTART_PARA"/>
</widgets> </widgets>
</object> </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> </interface>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment