summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-07-04 20:46:32 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-07-04 20:46:40 +0100
commitd856ae2f4d52aff52768a514d8a1b32138bd206a (patch)
tree1f6e4e828f205ab14ec57a81acb45be8d35be6b3 /cui
parent5d63514c6eddcd61a319c994202c7689f60ebf0a (diff)
deploy maingrid hack to align previews within similar tabpages in a dialog
and move some accessibility resources into the .ui files Change-Id: I139a7df4c8c18110fcd576a69a565b2e7baea0db
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/tabarea.hrc2
-rw-r--r--cui/source/tabpages/tabarea.src5
-rw-r--r--cui/source/tabpages/tpgradnt.cxx6
-rw-r--r--cui/source/tabpages/tphatch.cxx6
-rw-r--r--cui/uiconfig/ui/gradientpage.ui10
-rw-r--r--cui/uiconfig/ui/hatchpage.ui140
6 files changed, 81 insertions, 88 deletions
diff --git a/cui/source/tabpages/tabarea.hrc b/cui/source/tabpages/tabarea.hrc
index 5509a6d24e38..d5797457c80a 100644
--- a/cui/source/tabpages/tabarea.hrc
+++ b/cui/source/tabpages/tabarea.hrc
@@ -121,6 +121,4 @@
#define CB_HATCHBCKGRD 21
#define LB_HATCHBCKGRDCOLOR 22
-#define STR_LB_HATCHINGSTYLE 5031
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/tabarea.src b/cui/source/tabpages/tabarea.src
index 3c1ca20b00ac..3fffd78ed5b4 100644
--- a/cui/source/tabpages/tabarea.src
+++ b/cui/source/tabpages/tabarea.src
@@ -881,9 +881,4 @@ TabDialog RID_SVXDLG_AREA
};
};
-String STR_LB_HATCHINGSTYLE
-{
- Text [ en-US ] = "Hatching Style" ;
-};
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index db2b50799c85..897605e9604d 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -23,6 +23,7 @@
#include <vcl/msgbox.hxx>
#include <unotools/pathoptions.hxx>
#include <sfx2/app.hxx>
+#include <sfx2/dialoghelper.hxx>
#include <sfx2/filedlghelper.hxx>
#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
@@ -93,8 +94,7 @@ SvxGradientTabPage::SvxGradientTabPage
get(m_pBtnLoad, "load");
get(m_pBtnSave, "save");
- m_pCtlPreview->SetAccessibleName(String(CUI_RES(STR_EXAMPLE)));
- m_pLbGradients->SetAccessibleName( GetText());
+ m_pLbGradients->SetAccessibleName(GetText());
// this page needs ExchangeSupport
@@ -137,6 +137,8 @@ SvxGradientTabPage::SvxGradientTabPage
// #i76307# always paint the preview in LTR, because this is what the document does
m_pCtlPreview->EnableRTL( sal_False );
+
+ setPreviewsToSamePlace(pParent, this);
}
// -----------------------------------------------------------------------
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index cceae5824489..1076807ab7a2 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -22,8 +22,9 @@
#include <vcl/msgbox.hxx>
#include <unotools/pathoptions.hxx>
#include <sfx2/app.hxx>
-#include <sfx2/module.hxx>
+#include <sfx2/dialoghelper.hxx>
#include <sfx2/filedlghelper.hxx>
+#include <sfx2/module.hxx>
#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
#include <cuires.hrc>
@@ -134,8 +135,7 @@ SvxHatchTabPage::SvxHatchTabPage
m_pCtlPreview->SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
- m_pCtlPreview->SetAccessibleName(String(CUI_RES(STR_EXAMPLE)));
- m_pLbHatchings->SetAccessibleName( String(CUI_RES(STR_LB_HATCHINGSTYLE)) );
+ setPreviewsToSamePlace(pParent, this);
}
// -----------------------------------------------------------------------
diff --git a/cui/uiconfig/ui/gradientpage.ui b/cui/uiconfig/ui/gradientpage.ui
index 1978aa76d679..d2e6147e27bd 100644
--- a/cui/uiconfig/ui/gradientpage.ui
+++ b/cui/uiconfig/ui/gradientpage.ui
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
+ <!-- interface-requires LibreOffice 1.0 -->
<object class="GtkAdjustment" id="angleadjustment">
<property name="upper">359</property>
<property name="step_increment">15</property>
@@ -36,12 +37,12 @@
<property name="vexpand">True</property>
<property name="spacing">12</property>
<child>
- <object class="GtkGrid" id="grid2">
+ <object class="GtkGrid" id="maingrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="vexpand">True</property>
<property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="typeft">
<property name="visible">True</property>
@@ -361,6 +362,11 @@
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="previewctl-atkobject">
+ <property name="AtkObject::accessible-name" translatable="yes">Example</property>
+ </object>
+ </child>
</object>
<packing>
<property name="left_attach">0</property>
diff --git a/cui/uiconfig/ui/hatchpage.ui b/cui/uiconfig/ui/hatchpage.ui
index 9a7fe1c43f89..b78951e684cf 100644
--- a/cui/uiconfig/ui/hatchpage.ui
+++ b/cui/uiconfig/ui/hatchpage.ui
@@ -2,6 +2,16 @@
<interface>
<!-- interface-requires gtk+ 3.0 -->
<!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixbuf">res/sc05501.png</property>
+ </object>
+ <object class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixbuf">res/sc05502.png</property>
+ </object>
<object class="GtkBox" id="HatchPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -33,12 +43,12 @@
<property name="vexpand">True</property>
<property name="spacing">12</property>
<child>
- <object class="GtkGrid" id="grid2">
+ <object class="GtkGrid" id="maingrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="vexpand">True</property>
<property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="distanceft">
<property name="visible">True</property>
@@ -46,7 +56,6 @@
<property name="xalign">0</property>
<property name="label" translatable="yes">_Spacing</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">distancemtr:0mm</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -62,11 +71,10 @@
<property name="xalign">0</property>
<property name="label" translatable="yes">A_ngle</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">anglemtr:0</property>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
@@ -78,11 +86,10 @@
<property name="xalign">0</property>
<property name="label" translatable="yes">_Line type</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">linetypelb</property>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">5</property>
+ <property name="top_attach">3</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
@@ -94,23 +101,10 @@
<property name="xalign">0</property>
<property name="label" translatable="yes">Line _color</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">linecolorlb</property>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">7</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="anglemtrdegrees">
- <property name="can_focus">False</property>
- <property name="label" translatable="yes"> degrees</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
+ <property name="top_attach">4</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
@@ -120,68 +114,92 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
+ <property name="invisible_char_set">True</property>
<property name="adjustment">distanceadjustment</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="anglemtr:0">
+ <object class="GtkComboBoxText" id="linetypelb">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <property name="adjustment">angleadjustment</property>
+ <property name="can_focus">False</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ <items>
+ <item translatable="yes">Single</item>
+ <item translatable="yes">Crossed</item>
+ <item translatable="yes">Triple</item>
+ </items>
</object>
<packing>
- <property name="left_attach">0</property>
+ <property name="left_attach">1</property>
<property name="top_attach">3</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
- <object class="svxlo-SvxRectCtl" id="anglectl">
+ <object class="svxlo-ColorLB" id="linecolorlb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
- <property name="left_attach">0</property>
+ <property name="left_attach">1</property>
<property name="top_attach">4</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkComboBoxText" id="linetypelb">
+ <object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="entry_text_column">0</property>
- <property name="id_column">1</property>
- <items>
- <item translatable="yes">Single</item>
- <item translatable="yes">Crossed</item>
- <item translatable="yes">Triple</item>
- </items>
+ <child>
+ <object class="GtkSpinButton" id="anglemtr:0">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="invisible_char_set">True</property>
+ <property name="adjustment">angleadjustment</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="anglemtrdegrees">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes"> degrees</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">6</property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
- <object class="svxlo-ColorLB" id="linecolorlb">
+ <object class="svxlo-SvxRectCtl" id="anglectl">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">8</property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
@@ -189,27 +207,6 @@
<child>
<placeholder/>
</child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
</object>
<packing>
<property name="expand">False</property>
@@ -246,6 +243,11 @@
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="previewctl-atkobject">
+ <property name="AtkObject::accessible-name" translatable="yes">Example</property>
+ </object>
+ </child>
</object>
<packing>
<property name="left_attach">0</property>
@@ -400,14 +402,4 @@
<property name="upper">99</property>
<property name="step_increment">100</property>
</object>
- <object class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pixbuf">res/sc05501.png</property>
- </object>
- <object class="GtkImage" id="image2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pixbuf">res/sc05502.png</property>
- </object>
</interface>