summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2013-07-15 13:37:39 +0200
committerJan Holesovsky <kendy@suse.cz>2013-07-15 16:02:51 +0200
commit94c8113897d9fc7f56a43dba4cc1331d758e46a7 (patch)
tree265b20ec51b1d8f247c7251efeee5d759143a5ab
parent8fe5f011537d3eaf2e6bb59ab8672b8de5b41425 (diff)
sidebar: Get AreaPropertyPanel basically to work.
Change-Id: Ib5f05346ab5b38b4f3ec30f95b2435c9231d13ab
-rw-r--r--include/svx/dialogs.hrc3
-rw-r--r--svx/source/sidebar/area/AreaPropertyPanel.cxx48
-rw-r--r--svx/source/sidebar/area/AreaPropertyPanel.hxx16
-rw-r--r--svx/source/tbxctrls/itemwin.cxx10
-rw-r--r--svx/uiconfig/ui/sidebararea.ui301
5 files changed, 174 insertions, 204 deletions
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index 3f18a94aca72..2e54ba488827 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -1004,9 +1004,6 @@
// sidebar-related resources (defined in the appropriate .hrc's)
#define RID_SVX_SIDEBAR_BEGIN (RID_SVX_START + 1240)
-// sidebar-related resources (defined in the appropriate .hrc's)
-#define RID_SVX_SIDEBAR_BEGIN (RID_SVX_START + 1240)
-
// !!! IMPORTANT: consider and update RID_SVXSTR_NEXTFREE when introducing new RIDs for Strings !!!
#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1270)
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx b/svx/source/sidebar/area/AreaPropertyPanel.cxx
index 40330ae46275..359beefc43a6 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx
@@ -77,8 +77,6 @@ AreaPropertyPanel::AreaPropertyPanel(
maGradientElliptical(),
maGradientSquare(),
maGradientRect(),
- mpLbFillType(new SvxFillTypeBox(this)),
- mpLbFillAttr(new SvxFillAttrBox(this)),
mpStyleItem(),
mpColorItem(),
mpFillGradientItem(),
@@ -113,11 +111,13 @@ AreaPropertyPanel::AreaPropertyPanel(
mbColorAvail(true)
{
get(mpColorTextFT, "filllabel");
+ get(mpLbFillType, "fillstyle");
+ get(mpLbFillAttr, "fillattr");
get(mpTrspTextFT, "transparencylabel");
get(mpToolBoxColor, "selectcolor");
get(mpLBTransType, "transtype");
- get(mpMTRTransparent, "settransparency"); // GtkSpinButton
- get(mpBTNGradient, "selectgradient"); // GtkToolbar
+ get(mpMTRTransparent, "settransparency");
+ get(mpBTNGradient, "selectgradient");
const sal_uInt16 nIdColor = mpToolBoxColor->GetItemId(UNO_SIDEBARCOLOR);
mpColorUpdater.reset(new ::svx::ToolboxButtonColorUpdater(SID_ATTR_FILL_COLOR, nIdColor, mpToolBoxColor)),
@@ -158,27 +158,6 @@ void AreaPropertyPanel::Initialize()
maGradientRect = maGradientLinear;
maGradientRect.SetGradientStyle(XGRAD_RECT);
- Size aLogicalFillSize(MBOX_WIDTH,LISTBOX_HEIGHT);
- Size aLogicalAttrSize(MBOX_WIDTH + 1,LISTBOX_HEIGHT);
-
- Point aPoint(SECTIONPAGE_MARGIN_HORIZONTAL,SECTIONPAGE_MARGIN_VERTICAL_TOP + FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL);
- Point aPoint_Picker(SECTIONPAGE_MARGIN_HORIZONTAL + MBOX_WIDTH + CONTROL_SPACING_HORIZONTAL,SECTIONPAGE_MARGIN_VERTICAL_TOP + FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL);
-
- Size aTypeSize(LogicToPixel(aLogicalFillSize, MAP_APPFONT));
- Size aAttrSize(LogicToPixel(aLogicalAttrSize, MAP_APPFONT));
-
- Point aTypePoint(LogicToPixel(aPoint, MAP_APPFONT));
- Point aAttrPoint(LogicToPixel(aPoint_Picker, MAP_APPFONT));
-
- mpLbFillType->SetPosSizePixel(aTypePoint,aTypeSize);
- mpLbFillAttr->SetPosSizePixel(aAttrPoint,aAttrSize);
-
- mpLbFillType->SetHelpId(HID_PPROPERTYPANEL_AREA_LB_FILL_TYPES);
- mpLbFillAttr->SetHelpId(HID_PPROPERTYPANEL_AREA_LB_FILL_ATTR);
-
- mpLbFillType->SetQuickHelpText(msHelpFillType);
- mpLbFillAttr->SetQuickHelpText(msHelpFillAttr);
-
mpLbFillType->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Fill"))); //wj acc
mpLbFillAttr->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Fill"))); //wj acc
@@ -195,12 +174,6 @@ void AreaPropertyPanel::Initialize()
mpToolBoxColor->SetItemBits( nIdColor, mpToolBoxColor->GetItemBits( nIdColor ) | TIB_DROPDOWNONLY );
mpToolBoxColor->SetItemText(nIdColor, msHelpFillAttr);
- long aHeightLBStyle = mpLbFillType->GetSizePixel().getHeight();
- long aLBPosY = mpLbFillType->GetPosPixel().getY();
- long aHeightTBAttr = mpToolBoxColor->GetSizePixel().getHeight();
- Point aPointTBAttr = mpToolBoxColor->GetPosPixel();
- aPointTBAttr.setY( aLBPosY + aHeightLBStyle / 2 - aHeightTBAttr / 2);
-
aLink = LINK(this, AreaPropertyPanel, ToolBoxColorDropHdl);
mpToolBoxColor->SetDropdownClickHdl ( aLink );
mpToolBoxColor->SetSelectHdl ( aLink );
@@ -221,19 +194,8 @@ void AreaPropertyPanel::Initialize()
mpBTNGradient->SetItemImage(nIdGradient,maImgLinear);
mpBTNGradient->Hide();
- long aHeightLBTrans = mpLBTransType->GetSizePixel().getHeight();
- Point aPointLB = mpLBTransType->GetPosPixel();
- long aPosY = aPointLB.getY();
-
- Point aPointMetric = mpMTRTransparent->GetPosPixel();
- Point aPointTB = mpMTRTransparent->GetPosPixel();
- long aHeightMetric = mpMTRTransparent->GetSizePixel().getHeight();
- long aHeightTool = mpBTNGradient->GetSizePixel().getHeight();
- aPointMetric.setY(aPosY+aHeightLBTrans/2-aHeightMetric/2);
- aPointTB.setY(aPosY+aHeightLBTrans/2-aHeightTool/2);
- aPointTB.setX(aPointTB.getX()+3);
mpLbFillType->SetAccessibleRelationLabeledBy(mpColorTextFT);
- mpLbFillAttr->SetAccessibleRelationLabeledBy(mpLbFillAttr.get());
+ mpLbFillAttr->SetAccessibleRelationLabeledBy(mpLbFillAttr);
mpToolBoxColor->SetAccessibleRelationLabeledBy(mpToolBoxColor);
mpLBTransType->SetAccessibleRelationLabeledBy(mpTrspTextFT);
mpMTRTransparent->SetAccessibleRelationLabeledBy(mpMTRTransparent);
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.hxx b/svx/source/sidebar/area/AreaPropertyPanel.hxx
index d0df11a500f7..39cbafca4546 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.hxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.hxx
@@ -99,14 +99,14 @@ private:
XGradient maGradientRect;
//ui controls
- FixedText* mpColorTextFT;
- ::boost::scoped_ptr< SvxFillTypeBox > mpLbFillType;
- ::boost::scoped_ptr< SvxFillAttrBox > mpLbFillAttr;
- ToolBox* mpToolBoxColor; // for new color picker
- FixedText* mpTrspTextFT;
- ListBox* mpLBTransType;
- MetricField* mpMTRTransparent;
- ToolBox* mpBTNGradient;
+ FixedText* mpColorTextFT;
+ SvxFillTypeBox* mpLbFillType;
+ SvxFillAttrBox* mpLbFillAttr;
+ ToolBox* mpToolBoxColor; // for new color picker
+ FixedText* mpTrspTextFT;
+ ListBox* mpLBTransType;
+ MetricField* mpMTRTransparent;
+ ToolBox* mpBTNGradient;
::boost::scoped_ptr< ::svx::ToolboxButtonColorUpdater > mpColorUpdater;
diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx
index dbc2ede40d91..10ec85d8781b 100644
--- a/svx/source/tbxctrls/itemwin.cxx
+++ b/svx/source/tbxctrls/itemwin.cxx
@@ -609,6 +609,11 @@ SvxFillTypeBox::SvxFillTypeBox( Window* pParent, WinBits nBits ) :
Show();
}
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxFillTypeBox(Window *pParent, VclBuilder::stringmap &)
+{
+ return new SvxFillTypeBox(pParent);
+}
+
// -----------------------------------------------------------------------
SvxFillTypeBox::~SvxFillTypeBox()
@@ -697,6 +702,11 @@ SvxFillAttrBox::SvxFillAttrBox( Window* pParent, WinBits nBits ) :
Show();
}
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxFillAttrBox(Window *pParent, VclBuilder::stringmap &)
+{
+ return new SvxFillAttrBox(pParent);
+}
+
// -----------------------------------------------------------------------
SvxFillAttrBox::~SvxFillAttrBox()
diff --git a/svx/uiconfig/ui/sidebararea.ui b/svx/uiconfig/ui/sidebararea.ui
index fe5c29bfb2b0..2b2e24788bd8 100644
--- a/svx/uiconfig/ui/sidebararea.ui
+++ b/svx/uiconfig/ui/sidebararea.ui
@@ -15,74 +15,84 @@
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
- <object class="GtkBox" id="box2">
+ <object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="orientation">vertical</property>
+ <property name="hexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
<child>
- <object class="GtkBox" id="box3">
+ <object class="GtkLabel" id="filllabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="orientation">vertical</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Fill:</property>
+ <property name="tooltip_text" translatable="yes">Fill:</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Fill:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">fillstyle</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="svxlo-SvxFillTypeBox" id="fillstyle">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Select the fill type to apply.</property>
+ <property name="tooltip_text" translatable="yes">Select the fill type to apply.</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<child>
- <object class="GtkLabel" id="filllabel">
+ <object class="GtkToolbar" id="selectcolor">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Fill:</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">_Fill:</property>
- <property name="use_underline">True</property>
+ <child>
+ <object class="GtkMenuToolButton" id="color">
+ <property name="width_request">105</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Select the color to apply.</property>
+ <property name="tooltip_text" translatable="yes">Select the color to apply.</property>
+ <property name="action_name">.uno:sidebarcolor</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkBox" id="box5">
+ <object class="svxlo-SvxFillAttrBox" id="fillattr">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_bottom">4</property>
- <child>
- <object class="GtkComboBoxText" id="fillstyle">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Select the fill type to apply.</property>
- <property name="entry_text_column">0</property>
- <property name="id_column">1</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolbar" id="selectcolor">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkMenuToolButton" id="color">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Select the color to apply.</property>
- <property name="halign">end</property>
- <property name="action_name">.uno:sidebarcolor</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>
@@ -92,24 +102,82 @@
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</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="GtkBox" id="box4">
+ <object class="GtkLabel" id="transparencylabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="orientation">vertical</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Transparency</property>
+ <property name="tooltip_text" translatable="yes">Transparency</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Transparency:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">transtype</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="transtype">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Select the type of transparence to apply.</property>
+ <property name="tooltip_text" translatable="yes">Select the type of transparence to apply.</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ <items>
+ <item translatable="yes">None</item>
+ <item translatable="yes">Solid</item>
+ <item translatable="yes">Linear</item>
+ <item translatable="yes">Axial</item>
+ <item translatable="yes">Radial</item>
+ <item translatable="yes">Ellipsoid</item>
+ <item translatable="yes">Quadratic</item>
+ <item translatable="yes">Square</item>
+ </items>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<child>
- <object class="GtkLabel" id="transparencylabel">
+ <object class="GtkToolbar" id="selectgradient">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Transparency</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">_Transparency:</property>
- <property name="use_underline">True</property>
+ <child>
+ <object class="GtkMenuToolButton" id="gradient">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Specify the variation of gradient transparency.</property>
+ <property name="tooltip_text" translatable="yes">Specify the variation of gradient transparency.</property>
+ <property name="action_name">.uno:sidebargradient</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
@@ -118,93 +186,19 @@
</packing>
</child>
<child>
- <object class="GtkBox" id="box6">
+ <object class="GtkSpinButton" id="settransparency:0%">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkComboBoxText" id="transtype">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_markup" translatable="yes">Select the type of transparence to apply.</property>
- <property name="tooltip_text" translatable="yes">Select the type of transparence to apply.</property>
- <property name="entry_text_column">0</property>
- <property name="id_column">1</property>
- <items>
- <item translatable="yes">None</item>
- <item translatable="yes">Solid</item>
- <item translatable="yes">Linear</item>
- <item translatable="yes">Axial</item>
- <item translatable="yes">Radial</item>
- <item translatable="yes">Ellipsoid</item>
- <item translatable="yes">Quadratic</item>
- <item translatable="yes">Square</item>
- </items>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="box7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkSpinButton" id="settransparency:0%">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="tooltip_markup" translatable="yes">Specify 0% for fully opaque through 100% for fully transparent.</property>
- <property name="tooltip_text" translatable="yes">Specify 0% for fully opaque through 100% for fully transparent.</property>
- <property name="halign">end</property>
- <property name="max_length">100</property>
- <property name="invisible_char">•</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="climb_rate">5</property>
- <property name="numeric">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolbar" id="selectgradient">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="margin_left">13</property>
- <child>
- <object class="GtkMenuToolButton" id="gradient">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip_markup" translatable="yes">Specify the variation of gradient transparency.</property>
- <property name="tooltip_text" translatable="yes">Specify the variation of gradient transparency.</property>
- <property name="margin_left">23</property>
- <property name="action_name">.uno:sidebargradient</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="can_focus">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Specify 0% for fully opaque through 100% for fully transparent.</property>
+ <property name="tooltip_text" translatable="yes">Specify 0% for fully opaque through 100% for fully transparent.</property>
+ <property name="hexpand">True</property>
+ <property name="max_length">100</property>
+ <property name="invisible_char">•</property>
+ <property name="invisible_char_set">True</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="climb_rate">5</property>
+ <property name="numeric">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -214,11 +208,18 @@
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</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>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="expand">False</property>