Kaydet (Commit) 5525690f authored tarafından Katarina Behrens's avatar Katarina Behrens

Simplify: group widgets and enable them all at once

Change-Id: I2140cf83886654033d8fcb2acfb651041f24fa0d
üst 618fd9d9
......@@ -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()
......
......@@ -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;
......
......@@ -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>
......@@ -190,6 +191,10 @@
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="arrowproperties">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="arrowlabel">
<property name="can_focus">False</property>
......@@ -201,7 +206,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
<property name="position">0</property>
</packing>
</child>
<child>
......@@ -215,7 +220,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
<property name="position">1</property>
</packing>
</child>
<child>
......@@ -229,7 +234,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
<property name="position">2</property>
</packing>
</child>
<child>
......@@ -318,7 +323,14 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">6</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
......
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