diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2015-07-28 11:17:28 +0200 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2015-07-28 11:23:41 +0200 |
commit | 5525690f0e1111df22c3ce96f50d8ecd6931e912 (patch) | |
tree | f191865ccd61f072df2dd621aaaffcaf4ff3da93 /svx | |
parent | 618fd9d91a87113a1fbb5f829bd0d61207ff78af (diff) |
Simplify: group widgets and enable them all at once
Change-Id: I2140cf83886654033d8fcb2acfb651041f24fa0d
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sidebar/line/LinePropertyPanel.cxx | 38 | ||||
-rw-r--r-- | svx/source/sidebar/line/LinePropertyPanel.hxx | 3 | ||||
-rw-r--r-- | svx/uiconfig/ui/sidebarline.ui | 206 |
3 files changed, 118 insertions, 129 deletions
diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx index 7890bcaa79ab..8f6a2efc4918 100644 --- a/svx/source/sidebar/line/LinePropertyPanel.cxx +++ b/svx/source/sidebar/line/LinePropertyPanel.cxx @@ -190,6 +190,8 @@ LinePropertyPanel::LinePropertyPanel( get(mpLBEdgeStyle, "edgestyle"); get(mpFTCapStyle, "caplabel"); get(mpLBCapStyle, "linecapstyle"); + get(mpGridLineProps, "lineproperties"); + get(mpBoxArrowProps, "arrowproperties"); Initialize(); } @@ -783,38 +785,10 @@ VclPtr<PopupControl> LinePropertyPanel::CreateLineWidthPopupControl (PopupContai void LinePropertyPanel::ActivateControls() { const sal_Int32 nPos(mpLBStyle->GetSelectEntryPos()); - if( 0 == nPos ) - { - mpFTWidth->Disable(); - mpTBWidth->Disable(); - mpFTColor->Disable(); - mpLBColor->Disable(); - mpFTTransparency->Disable(); - mpMFTransparent->Disable(); - mpFTArrow->Disable(); - mpLBStart->Disable(); - mpLBEnd->Disable(); - mpFTEdgeStyle->Disable(); - mpLBEdgeStyle->Disable(); - mpFTCapStyle->Disable(); - mpLBCapStyle->Disable(); - } - else - { - mpFTWidth->Enable(); - mpTBWidth->Enable(); - mpFTColor->Enable(); - mpLBColor->Enable(); - mpFTTransparency->Enable(); - mpMFTransparent->Enable(); - mpFTArrow->Enable(); - mpLBStart->Enable(); - mpLBEnd->Enable(); - mpFTEdgeStyle->Enable(); - mpLBEdgeStyle->Enable(); - mpFTCapStyle->Enable(); - mpLBCapStyle->Enable(); - } + bool bLineStyle( nPos != 0 ); + + mpGridLineProps->Enable( bLineStyle ); + mpBoxArrowProps->Enable( bLineStyle ); } void LinePropertyPanel::EndLineWidthPopupMode() diff --git a/svx/source/sidebar/line/LinePropertyPanel.hxx b/svx/source/sidebar/line/LinePropertyPanel.hxx index f86a205b837f..3e7938ff341f 100644 --- a/svx/source/sidebar/line/LinePropertyPanel.hxx +++ b/svx/source/sidebar/line/LinePropertyPanel.hxx @@ -25,6 +25,7 @@ #include <sfx2/sidebar/ControllerItem.hxx> #include <vcl/fixed.hxx> #include <vcl/field.hxx> +#include <vcl/layout.hxx> #include <memory> #include <svx/sidebar/PanelLayout.hxx> #include <svx/xtable.hxx> @@ -108,6 +109,8 @@ private: VclPtr<ListBox> mpLBEdgeStyle; VclPtr<FixedText> mpFTCapStyle; VclPtr<ListBox> mpLBCapStyle; + VclPtr<VclGrid> mpGridLineProps; + VclPtr<VclVBox> mpBoxArrowProps; //ControllerItem sfx2::sidebar::ControllerItem maStyleControl; diff --git a/svx/uiconfig/ui/sidebarline.ui b/svx/uiconfig/ui/sidebarline.ui index e8506dbe2e68..52ab635261e0 100644 --- a/svx/uiconfig/ui/sidebarline.ui +++ b/svx/uiconfig/ui/sidebarline.ui @@ -2,6 +2,7 @@ <!-- Generated with glade 3.18.3 --> <interface> <requires lib="gtk+" version="3.0"/> + <requires lib="LibreOffice" version="1.0"/> <object class="GtkAdjustment" id="adjustment1"> <property name="upper">100</property> <property name="step_increment">5</property> @@ -64,7 +65,7 @@ </packing> </child> <child> - <object class="GtkGrid" id="grid4"> + <object class="GtkGrid" id="lineproperties"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> @@ -191,134 +192,145 @@ </packing> </child> <child> - <object class="GtkLabel" id="arrowlabel"> + <object class="GtkBox" id="arrowproperties"> <property name="can_focus">False</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">_Arrow:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">beginarrowstyle</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">3</property> - </packing> - </child> - <child> - <object class="GtkComboBoxText" id="beginarrowstyle"> - <property name="can_focus">False</property> - <property name="has_tooltip">True</property> - <property name="tooltip_markup" translatable="yes">Select the style of the beginning arrowhead.</property> - <property name="tooltip_text" translatable="yes">Select the style of the beginning arrowhead.</property> - <property name="hexpand">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">4</property> - </packing> - </child> - <child> - <object class="GtkComboBoxText" id="endarrowstyle"> - <property name="can_focus">False</property> - <property name="has_tooltip">True</property> - <property name="tooltip_markup" translatable="yes">Select the style of the ending arrowhead.</property> - <property name="tooltip_text" translatable="yes">Select the style of the ending arrowhead.</property> - <property name="hexpand">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">5</property> - </packing> - </child> - <child> - <object class="GtkGrid" id="grid5"> - <property name="can_focus">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">6</property> - <property name="column_homogeneous">True</property> + <property name="orientation">vertical</property> <child> - <object class="GtkLabel" id="cornerlabel"> - <property name="visible">True</property> + <object class="GtkLabel" id="arrowlabel"> <property name="can_focus">False</property> <property name="xalign">0</property> - <property name="label" translatable="yes">_Corner style:</property> + <property name="label" translatable="yes">_Arrow:</property> <property name="use_underline">True</property> - <property name="mnemonic_widget">edgestyle</property> + <property name="mnemonic_widget">beginarrowstyle</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> </packing> </child> <child> - <object class="GtkComboBoxText" id="edgestyle"> - <property name="visible">True</property> + <object class="GtkComboBoxText" id="beginarrowstyle"> <property name="can_focus">False</property> <property name="has_tooltip">True</property> - <property name="tooltip_markup" translatable="yes">Select the style of the edge connections.</property> - <property name="tooltip_text" translatable="yes">Select the style of the edge connections.</property> - <items> - <item translatable="yes">Rounded</item> - <item translatable="yes">- none -</item> - <item translatable="yes">Mitered</item> - <item translatable="yes">Beveled</item> - </items> - <style> - <class name="Rounded"/> - <class name="- none -"/> - <class name="Mitered"/> - <class name="Beveled"/> - </style> + <property name="tooltip_markup" translatable="yes">Select the style of the beginning arrowhead.</property> + <property name="tooltip_text" translatable="yes">Select the style of the beginning arrowhead.</property> + <property name="hexpand">True</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> </packing> </child> <child> - <object class="GtkLabel" id="caplabel"> - <property name="visible">True</property> + <object class="GtkComboBoxText" id="endarrowstyle"> <property name="can_focus">False</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Ca_p style:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">linecapstyle</property> + <property name="has_tooltip">True</property> + <property name="tooltip_markup" translatable="yes">Select the style of the ending arrowhead.</property> + <property name="tooltip_text" translatable="yes">Select the style of the ending arrowhead.</property> + <property name="hexpand">True</property> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> </packing> </child> <child> - <object class="GtkComboBoxText" id="linecapstyle"> - <property name="visible">True</property> + <object class="GtkGrid" id="grid5"> <property name="can_focus">False</property> - <property name="has_tooltip">True</property> - <property name="tooltip_markup" translatable="yes">Select the style of the line caps.</property> - <property name="tooltip_text" translatable="yes">Select the style of the line caps.</property> - <items> - <item translatable="yes">Flat</item> - <item translatable="yes">Round</item> - <item translatable="yes">Square</item> - </items> - <style> - <class name="Flat"/> - <class name="Round"/> - <class name="Square"/> - </style> + <property name="row_spacing">6</property> + <property name="column_spacing">6</property> + <property name="column_homogeneous">True</property> + <child> + <object class="GtkLabel" id="cornerlabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Corner style:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">edgestyle</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText" id="edgestyle"> + <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 style of the edge connections.</property> + <property name="tooltip_text" translatable="yes">Select the style of the edge connections.</property> + <items> + <item translatable="yes">Rounded</item> + <item translatable="yes">- none -</item> + <item translatable="yes">Mitered</item> + <item translatable="yes">Beveled</item> + </items> + <style> + <class name="Rounded"/> + <class name="- none -"/> + <class name="Mitered"/> + <class name="Beveled"/> + </style> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="caplabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Ca_p style:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">linecapstyle</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText" id="linecapstyle"> + <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 style of the line caps.</property> + <property name="tooltip_text" translatable="yes">Select the style of the line caps.</property> + <items> + <item translatable="yes">Flat</item> + <item translatable="yes">Round</item> + <item translatable="yes">Square</item> + </items> + <style> + <class name="Flat"/> + <class name="Round"/> + <class name="Square"/> + </style> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + </packing> + </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> </packing> </child> </object> <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">6</property> + <property name="position">2</property> </packing> </child> </object> |