diff options
-rw-r--r-- | chart2/source/controller/sidebar/ChartLinePanel.cxx | 10 | ||||
-rw-r--r-- | include/svx/sidebar/LinePropertyPanelBase.hxx | 70 | ||||
-rw-r--r-- | include/svx/sidebar/LineWidthPopup.hxx | 33 | ||||
-rw-r--r-- | solenv/sanitizers/ui/svx.suppr | 5 | ||||
-rw-r--r-- | svx/source/sidebar/line/LinePropertyPanelBase.cxx | 423 | ||||
-rw-r--r-- | svx/source/sidebar/line/LineWidthPopup.cxx | 76 | ||||
-rw-r--r-- | svx/source/sidebar/line/LineWidthValueSet.cxx | 29 | ||||
-rw-r--r-- | svx/source/sidebar/line/LineWidthValueSet.hxx | 6 | ||||
-rw-r--r-- | svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 1 | ||||
-rw-r--r-- | svx/uiconfig/ui/floatinglineproperty.ui | 53 | ||||
-rw-r--r-- | svx/uiconfig/ui/sidebarline.ui | 181 |
11 files changed, 409 insertions, 478 deletions
diff --git a/chart2/source/controller/sidebar/ChartLinePanel.cxx b/chart2/source/controller/sidebar/ChartLinePanel.cxx index 356bd229fa24..b31c6362e234 100644 --- a/chart2/source/controller/sidebar/ChartLinePanel.cxx +++ b/chart2/source/controller/sidebar/ChartLinePanel.cxx @@ -20,7 +20,7 @@ #include <svx/unomid.hxx> #include <svx/tbcontrl.hxx> -#include <sfx2/sidebar/SidebarToolBox.hxx> +#include <sfx2/weldutils.hxx> #include <vcl/svapp.hxx> #include <com/sun/star/view/XSelectionSupplier.hpp> @@ -31,9 +31,9 @@ namespace chart { namespace sidebar { namespace { -SvxColorToolBoxControl* getColorToolBoxControl(sfx2::sidebar::SidebarToolBox* pToolBoxColor) +SvxColorToolBoxControl* getColorToolBoxControl(ToolbarUnoDispatcher& rToolBoxColor) { - css::uno::Reference<css::frame::XToolbarController> xController = pToolBoxColor->GetFirstController(); + css::uno::Reference<css::frame::XToolbarController> xController = rToolBoxColor.GetControllerForCommand(".uno:XLineColor"); SvxColorToolBoxControl* pToolBoxColorControl = dynamic_cast<SvxColorToolBoxControl*>(xController.get()); return pToolBoxColorControl; } @@ -137,7 +137,7 @@ ChartLinePanel::ChartLinePanel(vcl::Window* pParent, mxSelectionListener(new ChartSidebarSelectionListener(this)), mbUpdate(true), mbModelValid(true), - maLineColorWrapper(mxModel, getColorToolBoxControl(mpTBColor.get()), "LineColor") + maLineColorWrapper(mxModel, getColorToolBoxControl(*mxColorDispatch), "LineColor") { disableArrowHead(); std::vector<ObjectType> aAcceptedTypes { OBJECTTYPE_PAGE, OBJECTTYPE_DIAGRAM, @@ -174,7 +174,7 @@ void ChartLinePanel::Initialize() if (xSelectionSupplier.is()) xSelectionSupplier->addSelectionChangeListener(mxSelectionListener.get()); - SvxColorToolBoxControl* pToolBoxColor = getColorToolBoxControl(mpTBColor.get()); + SvxColorToolBoxControl* pToolBoxColor = getColorToolBoxControl(*mxColorDispatch); pToolBoxColor->setColorSelectFunction(maLineColorWrapper); setMapUnit(MapUnit::Map100thMM); diff --git a/include/svx/sidebar/LinePropertyPanelBase.hxx b/include/svx/sidebar/LinePropertyPanelBase.hxx index e114d7b8e9b3..c91c2dd136b6 100644 --- a/include/svx/sidebar/LinePropertyPanelBase.hxx +++ b/include/svx/sidebar/LinePropertyPanelBase.hxx @@ -19,17 +19,16 @@ #ifndef INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEPROPERTYPANELBASE_HXX #define INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEPROPERTYPANELBASE_HXX -#include <vcl/fixed.hxx> -#include <vcl/field.hxx> -#include <vcl/layout.hxx> +#include <vcl/weld.hxx> #include <memory> #include <svl/poolitem.hxx> +#include <svx/dlgctrl.hxx> #include <svx/sidebar/PanelLayout.hxx> #include <svx/xtable.hxx> #include <svx/sidebar/LineWidthPopup.hxx> #include <svx/svxdllapi.h> - +class ToolbarUnoDispatcher; class XLineStyleItem; class XLineDashItem; class XLineStartItem; @@ -40,15 +39,6 @@ class XLineJointItem; class XLineCapItem; class XLineTransparenceItem; class XDashList; -class ListBox; -class ToolBox; -class FloatingWindow; - -namespace sfx2 { namespace sidebar { - -class SidebarToolBox; - -} } namespace svx { @@ -68,6 +58,8 @@ public: void SetWidthIcon(int n); void SetWidthIcon(); + void EndLineWidthPopup(); + // constructor/destructor LinePropertyPanelBase( vcl::Window* pParent, @@ -108,23 +100,26 @@ protected: protected: - VclPtr<sfx2::sidebar::SidebarToolBox> mpTBColor; + std::unique_ptr<weld::Toolbar> mxTBColor; + std::unique_ptr<ToolbarUnoDispatcher> mxColorDispatch; private: //ui controls - VclPtr<FixedText> mpFTWidth; - VclPtr<ToolBox> mpTBWidth; - VclPtr<ListBox> mpLBStyle; - VclPtr<FixedText> mpFTTransparency; - VclPtr<MetricField> mpMFTransparent; - VclPtr<ListBox> mpLBStart; - VclPtr<ListBox> mpLBEnd; - VclPtr<FixedText> mpFTEdgeStyle; - VclPtr<ListBox> mpLBEdgeStyle; - VclPtr<FixedText> mpFTCapStyle; - VclPtr<ListBox> mpLBCapStyle; - VclPtr<VclGrid> mpGridLineProps; - VclPtr<VclVBox> mpBoxArrowProps; + std::unique_ptr<weld::Label> mxFTWidth; + std::unique_ptr<weld::Toolbar> mxTBWidth; + std::unique_ptr<SvxLineLB> mxLBStyle; + std::unique_ptr<weld::Label> mxFTTransparency; + std::unique_ptr<weld::MetricSpinButton> mxMFTransparent; + std::unique_ptr<SvxLineEndLB> mxLBStart; + std::unique_ptr<SvxLineEndLB> mxLBEnd; + std::unique_ptr<weld::Label> mxFTEdgeStyle; + std::unique_ptr<weld::ComboBox> mxLBEdgeStyle; + std::unique_ptr<weld::Label> mxFTCapStyle; + std::unique_ptr<weld::ComboBox> mxLBCapStyle; + std::unique_ptr<weld::Widget> mxGridLineProps; + std::unique_ptr<weld::Widget> mxBoxArrowProps; + //popup windows + std::unique_ptr<LineWidthPopup> mxLineWidthPopup; std::unique_ptr<XLineStyleItem> mpStyleItem; std::unique_ptr<XLineDashItem> mpDashItem; @@ -137,27 +132,24 @@ private: std::unique_ptr<XLineStartItem> mpStartItem; std::unique_ptr<XLineEndItem> mpEndItem; - //popup windows - VclPtr<LineWidthPopup> mxLineWidthPopup; - // images from resource - Image const maIMGNone; + OUString maIMGNone; // multi-images - std::unique_ptr<Image[]> mpIMGWidthIcon; + OUString maIMGWidthIcon[8]; bool mbWidthValuable : 1; bool mbArrowSupported; void Initialize(); - DECL_LINK(ChangeLineStyleHdl, ListBox&, void); - DECL_LINK(ToolboxWidthSelectHdl, ToolBox*, void); - DECL_LINK(ChangeTransparentHdl, Edit&, void ); - DECL_LINK(ChangeStartHdl, ListBox&, void); - DECL_LINK(ChangeEndHdl, ListBox&, void); - DECL_LINK(ChangeEdgeStyleHdl, ListBox&, void); - DECL_LINK(ChangeCapStyleHdl, ListBox&, void); + DECL_LINK(ChangeLineStyleHdl, weld::ComboBox&, void); + DECL_LINK(ToolboxWidthSelectHdl, const OString&, void); + DECL_LINK(ChangeTransparentHdl, weld::MetricSpinButton&, void ); + DECL_LINK(ChangeStartHdl, weld::ComboBox&, void); + DECL_LINK(ChangeEndHdl, weld::ComboBox&, void); + DECL_LINK(ChangeEdgeStyleHdl, weld::ComboBox&, void); + DECL_LINK(ChangeCapStyleHdl, weld::ComboBox&, void); }; } } // end of namespace svx::sidebar diff --git a/include/svx/sidebar/LineWidthPopup.hxx b/include/svx/sidebar/LineWidthPopup.hxx index fd36e5ea92a6..ce19baf92eb0 100644 --- a/include/svx/sidebar/LineWidthPopup.hxx +++ b/include/svx/sidebar/LineWidthPopup.hxx @@ -19,28 +19,29 @@ #ifndef INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEWIDTHPOPUP_HXX #define INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEWIDTHPOPUP_HXX -#include <vcl/floatwin.hxx> -#include <vcl/layout.hxx> +#include <tools/mapunit.hxx> +#include <vcl/customweld.hxx> +#include <vcl/image.hxx> +#include <vcl/weld.hxx> #include <array> -class Edit; -class MetricField; -class ValueSet; +class SvtValueSet; namespace svx { namespace sidebar { class LinePropertyPanelBase; class LineWidthValueSet; -class LineWidthPopup final : public FloatingWindow +class LineWidthPopup final { public: - LineWidthPopup(LinePropertyPanelBase& rParent); - virtual void dispose() override; - virtual ~LineWidthPopup() override; + LineWidthPopup(weld::Widget* pParent, LinePropertyPanelBase& rParent); + ~LineWidthPopup(); void SetWidthSelect (long lValue, bool bValuable, MapUnit eMapUnit); + weld::Container* getTopLevel() const { return m_xTopLevel.get(); } + private: LinePropertyPanelBase& m_rParent; std::array<OUString,9> maStrUnits; @@ -49,14 +50,18 @@ private: bool m_bVSFocus; bool m_bCustom; long m_nCustomWidth; - VclPtr<MetricField> m_xMFWidth; - VclPtr<VclContainer> m_xBox; - VclPtr<LineWidthValueSet> m_xVSWidth; Image const m_aIMGCus; Image const m_aIMGCusGray; - DECL_LINK(VSSelectHdl, ValueSet*, void); - DECL_LINK(MFModifyHdl, Edit&, void); + std::unique_ptr<weld::Builder> m_xBuilder; + std::unique_ptr<weld::Container> m_xTopLevel; + std::unique_ptr<weld::MetricSpinButton> m_xMFWidth; + std::unique_ptr<LineWidthValueSet> m_xVSWidth; + std::unique_ptr<weld::CustomWeld> m_xVSWidthWin; + + DECL_LINK(VSSelectHdl, SvtValueSet*, void); + DECL_LINK(MFModifyHdl, weld::MetricSpinButton&, void); + DECL_LINK(FocusHdl, weld::Widget&, void); }; } } // end of namespace svx::sidebar diff --git a/solenv/sanitizers/ui/svx.suppr b/solenv/sanitizers/ui/svx.suppr index d089305f2326..9779f86780a9 100644 --- a/solenv/sanitizers/ui/svx.suppr +++ b/solenv/sanitizers/ui/svx.suppr @@ -64,8 +64,5 @@ svx/uiconfig/ui/sidebararea.ui://GtkLabel[@id='transparencylabel'] orphan-label svx/uiconfig/ui/sidebarshadow.ui://GtkLabel[@id='transparency_label'] orphan-label svx/uiconfig/ui/sidebarshadow.ui://GtkSpinButton[@id='FIELD_TRANSPARENCY'] no-labelled-by svx/uiconfig/ui/sidebarshadow.ui://GtkScale[@id='transparency_slider'] no-labelled-by -svx/uiconfig/ui/sidebarline.ui://GtkLabel[@id='widthlabel'] orphan-label -svx/uiconfig/ui/sidebarline.ui://GtkLabel[@id='colorlabel'] orphan-label -svx/uiconfig/ui/sidebarline.ui://GtkLabel[@id='translabel'] orphan-label -svx/uiconfig/ui/sidebarline.ui://GtkSpinButton[@id='linetransparency:0%'] missing-label-for +svx/uiconfig/ui/sidebarline.ui://GtkMenuToolButton[@id='SelectWidth'] button-no-label svx/uiconfig/ui/textcharacterspacingcontrol.ui://GtkSpinButton[@id='kerning:0pt'] no-labelled-by diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx index ae583af16f4b..743a74e453ad 100644 --- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx +++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx @@ -28,6 +28,7 @@ #include <sfx2/objsh.hxx> #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> +#include <sfx2/weldutils.hxx> #include <svx/xtable.hxx> #include <svx/xdash.hxx> #include <svx/drawitem.hxx> @@ -52,119 +53,30 @@ using namespace css; using namespace css::uno; -const char UNO_SELECTWIDTH[] = ".uno:SelectWidth"; - -namespace -{ - -void FillLineEndListBox(ListBox& rListBoxStart, ListBox& rListBoxEnd, const XLineEndList& rList, const BitmapEx& rBitmapZero) -{ - const sal_uInt32 nCount(rList.Count()); - const OUString sNone(SvxResId(RID_SVXSTR_NONE)); - - rListBoxStart.SetUpdateMode(false); - rListBoxEnd.SetUpdateMode(false); - - rListBoxStart.Clear(); - rListBoxEnd.Clear(); - - for(sal_uInt32 i(0); i < nCount; i++) - { - const XLineEndEntry* pEntry = rList.GetLineEnd(i); - const BitmapEx aBitmap = const_cast< XLineEndList& >(rList).GetUiBitmap(i); - - if(!aBitmap.IsEmpty()) - { - BitmapEx aCopyStart(aBitmap); - BitmapEx aCopyEnd(aBitmap); - - const Size aBmpSize(aCopyStart.GetSizePixel()); - const tools::Rectangle aCropRectStart(Point(), Size(aBmpSize.Width() / 2, aBmpSize.Height())); - const tools::Rectangle aCropRectEnd(Point(aBmpSize.Width() / 2, 0), Size(aBmpSize.Width() / 2, aBmpSize.Height())); - - aCopyStart.Crop(aCropRectStart); - rListBoxStart.InsertEntry( - pEntry->GetName(), - Image(aCopyStart)); - - aCopyEnd.Crop(aCropRectEnd); - rListBoxEnd.InsertEntry( - pEntry->GetName(), - Image(aCopyEnd)); - } - else - { - rListBoxStart.InsertEntry(pEntry->GetName()); - rListBoxEnd.InsertEntry(pEntry->GetName()); - } - } - - // add 'none' entries - if (!rBitmapZero.IsEmpty()) - { - const Image aImg = rListBoxStart.GetEntryImage(0); - const Size aImgSize = aImg.GetSizePixel(); - - // take solid line bitmap and crop it to the size of - // line cap entries - BitmapEx aCopyZero( rBitmapZero ); - const tools::Rectangle aCropZero( Point(), aImgSize ); - aCopyZero.Crop( aCropZero ); - - // make it 1st item in list - rListBoxStart.InsertEntry( sNone, Image(aCopyZero), 0); - rListBoxEnd.InsertEntry( sNone, Image(aCopyZero), 0); - } - else - { - rListBoxStart.InsertEntry(sNone); - rListBoxEnd.InsertEntry(sNone); - } - - rListBoxStart.SetUpdateMode(true); - rListBoxEnd.SetUpdateMode(true); -} - -void FillLineStyleListBox(ListBox& rListBox, const XDashList& rList) -{ - const sal_uInt32 nCount(rList.Count()); - rListBox.SetUpdateMode(false); - - rListBox.Clear(); - - // entry for 'none' - rListBox.InsertEntry(rList.GetStringForUiNoLine()); - - // entry for solid line - rListBox.InsertEntry(rList.GetStringForUiSolidLine(), - Image( rList.GetBitmapForUISolidLine())); - - for(sal_uInt32 i(0); i < nCount; i++) - { - const XDashEntry* pEntry = rList.GetDash(i); - const BitmapEx & rBitmap = const_cast< XDashList& >(rList).GetUiBitmap(i); - - if(!rBitmap.IsEmpty()) - { - rListBox.InsertEntry(pEntry->GetName(), Image(rBitmap)); - } - else - { - rListBox.InsertEntry(pEntry->GetName()); - } - } - - rListBox.SetUpdateMode(true); -} - -} // end of anonymous namespace +const char SELECTWIDTH[] = "SelectWidth"; namespace svx { namespace sidebar { LinePropertyPanelBase::LinePropertyPanelBase( vcl::Window* pParent, const uno::Reference<css::frame::XFrame>& rxFrame) -: PanelLayout(pParent, "LinePropertyPanel", "svx/ui/sidebarline.ui", rxFrame), +: PanelLayout(pParent, "LinePropertyPanel", "svx/ui/sidebarline.ui", rxFrame, true), + mxTBColor(m_xBuilder->weld_toolbar("color")), + mxColorDispatch(new ToolbarUnoDispatcher(*mxTBColor, rxFrame)), + mxFTWidth(m_xBuilder->weld_label("widthlabel")), + mxTBWidth(m_xBuilder->weld_toolbar("width")), + mxLBStyle(new SvxLineLB(m_xBuilder->weld_combo_box("linestyle"))), + mxFTTransparency(m_xBuilder->weld_label("translabel")), + mxMFTransparent(m_xBuilder->weld_metric_spin_button("linetransparency", FieldUnit::PERCENT)), + mxLBStart(new SvxLineEndLB(m_xBuilder->weld_combo_box("beginarrowstyle"))), + mxLBEnd(new SvxLineEndLB(m_xBuilder->weld_combo_box("endarrowstyle"))), + mxFTEdgeStyle(m_xBuilder->weld_label("cornerlabel")), + mxLBEdgeStyle(m_xBuilder->weld_combo_box("edgestyle")), + mxFTCapStyle(m_xBuilder->weld_label("caplabel")), + mxLBCapStyle(m_xBuilder->weld_combo_box("linecapstyle")), + mxGridLineProps(m_xBuilder->weld_widget("lineproperties")), + mxBoxArrowProps(m_xBuilder->weld_widget("arrowproperties")), + mxLineWidthPopup(new LineWidthPopup(mxTBWidth.get(), *this)), mpStyleItem(), mpDashItem(), mnTrans(0), @@ -172,27 +84,10 @@ LinePropertyPanelBase::LinePropertyPanelBase( mnWidthCoreValue(0), mpStartItem(), mpEndItem(), - mxLineWidthPopup(VclPtr<LineWidthPopup>::Create(*this)), - maIMGNone(StockImage::Yes, BMP_NONE_ICON), - mpIMGWidthIcon(), + maIMGNone(BMP_NONE_ICON), mbWidthValuable(true), mbArrowSupported(true) { - get(mpFTWidth, "widthlabel"); - get(mpTBWidth, "width"); - get(mpTBColor, "color"); - get(mpLBStyle, "linestyle"); - get(mpFTTransparency, "translabel"); - get(mpMFTransparent, "linetransparency"); - get(mpLBStart, "beginarrowstyle"); - get(mpLBEnd, "endarrowstyle"); - get(mpFTEdgeStyle, "cornerlabel"); - get(mpLBEdgeStyle, "edgestyle"); - get(mpFTCapStyle, "caplabel"); - get(mpLBCapStyle, "linecapstyle"); - get(mpGridLineProps, "lineproperties"); - get(mpBoxArrowProps, "arrowproperties"); - Initialize(); } @@ -203,62 +98,57 @@ LinePropertyPanelBase::~LinePropertyPanelBase() void LinePropertyPanelBase::dispose() { - mxLineWidthPopup.disposeAndClear(); - mpFTWidth.clear(); - mpTBWidth.clear(); - mpTBColor.clear(); - mpLBStyle.clear(); - mpFTTransparency.clear(); - mpMFTransparent.clear(); - mpLBStart.clear(); - mpLBEnd.clear(); - mpFTEdgeStyle.clear(); - mpLBEdgeStyle.clear(); - mpFTCapStyle.clear(); - mpLBCapStyle.clear(); - mpGridLineProps.clear(); - mpBoxArrowProps.clear(); + mxLineWidthPopup.reset(); + mxFTWidth.reset(); + mxTBWidth.reset(); + mxColorDispatch.reset(); + mxTBColor.reset(); + mxLBStyle.reset(); + mxFTTransparency.reset(); + mxMFTransparent.reset(); + mxLBStart.reset(); + mxLBEnd.reset(); + mxFTEdgeStyle.reset(); + mxLBEdgeStyle.reset(); + mxFTCapStyle.reset(); + mxLBCapStyle.reset(); + mxGridLineProps.reset(); + mxBoxArrowProps.reset(); PanelLayout::dispose(); } void LinePropertyPanelBase::Initialize() { - mpIMGWidthIcon.reset(new Image[8]); - mpIMGWidthIcon[0] = Image(StockImage::Yes, BMP_WIDTH1_ICON); - mpIMGWidthIcon[1] = Image(StockImage::Yes, BMP_WIDTH2_ICON); - mpIMGWidthIcon[2] = Image(StockImage::Yes, BMP_WIDTH3_ICON); - mpIMGWidthIcon[3] = Image(StockImage::Yes, BMP_WIDTH4_ICON); - mpIMGWidthIcon[4] = Image(StockImage::Yes, BMP_WIDTH5_ICON); - mpIMGWidthIcon[5] = Image(StockImage::Yes, BMP_WIDTH6_ICON); - mpIMGWidthIcon[6] = Image(StockImage::Yes, BMP_WIDTH7_ICON); - mpIMGWidthIcon[7] = Image(StockImage::Yes, BMP_WIDTH8_ICON); + mxTBWidth->set_item_popover(SELECTWIDTH, mxLineWidthPopup->getTopLevel()); + + maIMGWidthIcon[0] = BMP_WIDTH1_ICON; + maIMGWidthIcon[1] = BMP_WIDTH2_ICON; + maIMGWidthIcon[2] = BMP_WIDTH3_ICON; + maIMGWidthIcon[3] = BMP_WIDTH4_ICON; + maIMGWidthIcon[4] = BMP_WIDTH5_ICON; + maIMGWidthIcon[5] = BMP_WIDTH6_ICON; + maIMGWidthIcon[6] = BMP_WIDTH7_ICON; + maIMGWidthIcon[7] = BMP_WIDTH8_ICON; FillLineStyleList(); SelectLineStyle(); - mpLBStyle->SetSelectHdl( LINK( this, LinePropertyPanelBase, ChangeLineStyleHdl ) ); - mpLBStyle->AdaptDropDownLineCountToMaximum(); + mxLBStyle->connect_changed( LINK( this, LinePropertyPanelBase, ChangeLineStyleHdl ) ); - const sal_uInt16 nIdWidth = mpTBWidth->GetItemId(UNO_SELECTWIDTH); - mpTBWidth->SetItemImage(nIdWidth, mpIMGWidthIcon[0]); - mpTBWidth->SetItemBits( nIdWidth, mpTBWidth->GetItemBits( nIdWidth ) | ToolBoxItemBits::DROPDOWNONLY ); - Link<ToolBox *, void> aLink2 = LINK(this, LinePropertyPanelBase, ToolboxWidthSelectHdl); - mpTBWidth->SetDropdownClickHdl ( aLink2 ); - mpTBWidth->SetSelectHdl ( aLink2 ); + mxTBWidth->set_item_icon_name(SELECTWIDTH, maIMGWidthIcon[0]); + mxTBWidth->connect_clicked(LINK(this, LinePropertyPanelBase, ToolboxWidthSelectHdl)); FillLineEndList(); SelectEndStyle(true); SelectEndStyle(false); - mpLBStart->SetSelectHdl( LINK( this, LinePropertyPanelBase, ChangeStartHdl ) ); - mpLBStart->AdaptDropDownLineCountToMaximum(); - mpLBEnd->SetSelectHdl( LINK( this, LinePropertyPanelBase, ChangeEndHdl ) ); - mpLBEnd->AdaptDropDownLineCountToMaximum(); + mxLBStart->connect_changed( LINK( this, LinePropertyPanelBase, ChangeStartHdl ) ); + mxLBEnd->connect_changed( LINK( this, LinePropertyPanelBase, ChangeEndHdl ) ); - mpMFTransparent->SetModifyHdl(LINK(this, LinePropertyPanelBase, ChangeTransparentHdl)); + mxMFTransparent->connect_value_changed(LINK(this, LinePropertyPanelBase, ChangeTransparentHdl)); - mpLBEdgeStyle->SetSelectHdl( LINK( this, LinePropertyPanelBase, ChangeEdgeStyleHdl ) ); + mxLBEdgeStyle->connect_changed( LINK( this, LinePropertyPanelBase, ChangeEdgeStyleHdl ) ); - mpLBCapStyle->SetSelectHdl( LINK( this, LinePropertyPanelBase, ChangeCapStyleHdl ) ); + mxLBCapStyle->connect_changed( LINK( this, LinePropertyPanelBase, ChangeCapStyleHdl ) ); } void LinePropertyPanelBase::DataChanged(const DataChangedEvent& /*rEvent*/) @@ -269,11 +159,11 @@ void LinePropertyPanelBase::updateLineStyle(bool bDisabled, bool bSetOrDefault, { if(bDisabled) { - mpLBStyle->Disable(); + mxLBStyle->set_sensitive(false); } else { - mpLBStyle->Enable(); + mxLBStyle->set_sensitive(true); } if(bSetOrDefault) @@ -295,11 +185,11 @@ void LinePropertyPanelBase::updateLineDash(bool bDisabled, bool bSetOrDefault, c { if(bDisabled) { - mpLBStyle->Disable(); + mxLBStyle->set_sensitive(false); } else { - mpLBStyle->Enable(); + mxLBStyle->set_sensitive(true); } if(bSetOrDefault) @@ -322,13 +212,13 @@ void LinePropertyPanelBase::updateLineTransparence(bool bDisabled, bool bSetOrDe { if(bDisabled) { - mpFTTransparency->Disable(); - mpMFTransparent->Disable(); + mxFTTransparency->set_sensitive(false); + mxMFTransparent->set_sensitive(false); } else { - mpFTTransparency->Enable(); - mpMFTransparent->Enable(); + mxFTTransparency->set_sensitive(true); + mxMFTransparent->set_sensitive(true); } if(bSetOrDefault) @@ -336,13 +226,13 @@ void LinePropertyPanelBase::updateLineTransparence(bool bDisabled, bool bSetOrDe if (const XLineTransparenceItem* pItem = dynamic_cast<const XLineTransparenceItem*>(pState)) { mnTrans = pItem->GetValue(); - mpMFTransparent->SetValue(mnTrans); + mxMFTransparent->set_value(mnTrans, FieldUnit::PERCENT); return; } } - mpMFTransparent->SetValue(0);//add - mpMFTransparent->SetText(OUString()); + mxMFTransparent->set_value(0, FieldUnit::PERCENT);//add + mxMFTransparent->set_text(OUString()); } void LinePropertyPanelBase::updateLineWidth(bool bDisabled, bool bSetOrDefault, @@ -350,13 +240,13 @@ void LinePropertyPanelBase::updateLineWidth(bool bDisabled, bool bSetOrDefault, { if(bDisabled) { - mpTBWidth->Disable(); - mpFTWidth->Disable(); + mxTBWidth->set_sensitive(false); + mxFTWidth->set_sensitive(false); } else { - mpTBWidth->Enable(); - mpFTWidth->Enable(); + mxTBWidth->set_sensitive(true); + mxFTWidth->set_sensitive(true); } if(bSetOrDefault) @@ -379,12 +269,12 @@ void LinePropertyPanelBase::updateLineStart(bool bDisabled, bool bSetOrDefault, { if(bDisabled) { - mpLBStart->Disable(); + mxLBStart->set_sensitive(false); } else { if (mbArrowSupported) - mpLBStart->Enable(); + mxLBStart->set_sensitive(true); } if(bSetOrDefault && pItem) @@ -403,12 +293,12 @@ void LinePropertyPanelBase::updateLineEnd(bool bDisabled, bool bSetOrDefault, { if(bDisabled) { - mpLBEnd->Disable(); + mxLBEnd->set_sensitive(false); } else { if (mbArrowSupported) - mpLBEnd->Enable(); + mxLBEnd->set_sensitive(true); } if(bSetOrDefault && pItem) @@ -427,13 +317,13 @@ void LinePropertyPanelBase::updateLineJoint(bool bDisabled, bool bSetOrDefault, { if(bDisabled) { - mpLBEdgeStyle->Disable(); - mpFTEdgeStyle->Disable(); + mxLBEdgeStyle->set_sensitive(false); + mxFTEdgeStyle->set_sensitive(false); } else { - mpLBEdgeStyle->Enable(); - mpFTEdgeStyle->Enable(); + mxLBEdgeStyle->set_sensitive(true); + mxFTEdgeStyle->set_sensitive(true); } if(bSetOrDefault) @@ -472,13 +362,13 @@ void LinePropertyPanelBase::updateLineJoint(bool bDisabled, bool bSetOrDefault, if(nEntryPos) { - mpLBEdgeStyle->SelectEntryPos(nEntryPos - 1); + mxLBEdgeStyle->set_active(nEntryPos - 1); return; } } } - mpLBEdgeStyle->SetNoSelection(); + mxLBEdgeStyle->set_active(-1); } void LinePropertyPanelBase::updateLineCap(bool bDisabled, bool bSetOrDefault, @@ -486,13 +376,13 @@ void LinePropertyPanelBase::updateLineCap(bool bDisabled, bool bSetOrDefault, { if(bDisabled) { - mpLBCapStyle->Disable(); - mpFTCapStyle->Disable(); + mxLBCapStyle->set_sensitive(false); + mxFTCapStyle->set_sensitive(false); } else { - mpLBCapStyle->Enable(); - mpLBCapStyle->Enable(); + mxLBCapStyle->set_sensitive(true); + mxLBCapStyle->set_sensitive(true); } if(bSetOrDefault) @@ -525,20 +415,20 @@ void LinePropertyPanelBase::updateLineCap(bool bDisabled, bool bSetOrDefault, if(nEntryPos) { - mpLBCapStyle->SelectEntryPos(nEntryPos - 1); + mxLBCapStyle->set_active(nEntryPos - 1); return; } } } - mpLBCapStyle->SetNoSelection(); + mxLBCapStyle->set_active(-1); } -IMPL_LINK_NOARG(LinePropertyPanelBase, ChangeLineStyleHdl, ListBox&, void) +IMPL_LINK_NOARG(LinePropertyPanelBase, ChangeLineStyleHdl, weld::ComboBox&, void) { - const sal_Int32 nPos(mpLBStyle->GetSelectedEntryPos()); + const sal_Int32 nPos(mxLBStyle->get_active()); - if(LISTBOX_ENTRY_NOTFOUND != nPos && mpLBStyle->IsValueChangedFromSaved()) + if (nPos != -1 && mxLBStyle->get_value_changed_from_saved()) { if(0 == nPos) { @@ -572,39 +462,39 @@ IMPL_LINK_NOARG(LinePropertyPanelBase, ChangeLineStyleHdl, ListBox&, void) ActivateControls(); } -IMPL_LINK_NOARG(LinePropertyPanelBase, ChangeStartHdl, ListBox&, void) +IMPL_LINK_NOARG(LinePropertyPanelBase, ChangeStartHdl, weld::ComboBox&, void) { - sal_Int32 nPos = mpLBStart->GetSelectedEntryPos(); - if( nPos != LISTBOX_ENTRY_NOTFOUND && mpLBStart->IsValueChangedFromSaved() ) + sal_Int32 nPos = mxLBStart->get_active(); + if (nPos != -1 && mxLBStart->get_value_changed_from_saved()) { std::unique_ptr<XLineStartItem> pItem; if( nPos == 0 ) pItem.reset(new XLineStartItem()); else if( mxLineEndList.is() && mxLineEndList->Count() > static_cast<long>( nPos - 1 ) ) - pItem.reset(new XLineStartItem( mpLBStart->GetSelectedEntry(),mxLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() )); + pItem.reset(new XLineStartItem( mxLBStart->get_active_text(),mxLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() )); setLineStartStyle(pItem.get()); } } -IMPL_LINK_NOARG(LinePropertyPanelBase, ChangeEndHdl, ListBox&, void) +IMPL_LINK_NOARG(LinePropertyPanelBase, ChangeEndHdl, weld::ComboBox&, void) { - sal_Int32 nPos = mpLBEnd->GetSelectedEntryPos(); - if( nPos != LISTBOX_ENTRY_NOTFOUND && mpLBEnd->IsValueChangedFromSaved() ) + sal_Int32 nPos = mxLBEnd->get_active(); + if (nPos != -1 && mxLBEnd->get_value_changed_from_saved()) { std::unique_ptr<XLineEndItem> pItem; if( nPos == 0 ) pItem.reset(new XLineEndItem()); else if( mxLineEndList.is() && mxLineEndList->Count() > static_cast<long>( nPos - 1 ) ) - pItem.reset(new XLineEndItem( mpLBEnd->GetSelectedEntry(), mxLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() )); + pItem.reset(new XLineEndItem( mxLBEnd->get_active_text(), mxLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() )); setLineEndStyle(pItem.get()); } } -IMPL_LINK_NOARG(LinePropertyPanelBase, ChangeEdgeStyleHdl, ListBox&, void) +IMPL_LINK_NOARG(LinePropertyPanelBase, ChangeEdgeStyleHdl, weld::ComboBox&, void) { - const sal_Int32 nPos(mpLBEdgeStyle->GetSelectedEntryPos()); + const sal_Int32 nPos(mxLBEdgeStyle->get_active()); - if(LISTBOX_ENTRY_NOTFOUND != nPos && mpLBEdgeStyle->IsValueChangedFromSaved()) + if (nPos != -1 && mxLBEdgeStyle->get_value_changed_from_saved()) { std::unique_ptr<XLineJointItem> pItem; @@ -636,11 +526,11 @@ IMPL_LINK_NOARG(LinePropertyPanelBase, ChangeEdgeStyleHdl, ListBox&, void) } } -IMPL_LINK_NOARG(LinePropertyPanelBase, ChangeCapStyleHdl, ListBox&, void) +IMPL_LINK_NOARG(LinePropertyPanelBase, ChangeCapStyleHdl, weld::ComboBox&, void) { - const sal_Int32 nPos(mpLBCapStyle->GetSelectedEntryPos()); + const sal_Int32 nPos(mxLBCapStyle->get_active()); - if(LISTBOX_ENTRY_NOTFOUND != nPos && mpLBCapStyle->IsValueChangedFromSaved()) + if (nPos != -1 && mxLBCapStyle->get_value_changed_from_saved()) { std::unique_ptr<XLineCapItem> pItem; @@ -667,18 +557,19 @@ IMPL_LINK_NOARG(LinePropertyPanelBase, ChangeCapStyleHdl, ListBox&, void) } } -IMPL_LINK(LinePropertyPanelBase, ToolboxWidthSelectHdl,ToolBox*, pToolBox, void) +IMPL_LINK_NOARG(LinePropertyPanelBase, ToolboxWidthSelectHdl, const OString&, void) { - if (pToolBox->GetItemCommand(pToolBox->GetCurItemId()) == UNO_SELECTWIDTH) - { - mxLineWidthPopup->SetWidthSelect(mnWidthCoreValue, mbWidthValuable, meMapUnit); - mxLineWidthPopup->StartPopupMode(pToolBox, FloatWinPopupFlags::GrabFocus); - } + mxTBWidth->set_menu_item_active(SELECTWIDTH, !mxTBWidth->get_menu_item_active(SELECTWIDTH)); +} + +void LinePropertyPanelBase::EndLineWidthPopup() +{ + mxTBWidth->set_menu_item_active(SELECTWIDTH, false); } -IMPL_LINK_NOARG( LinePropertyPanelBase, ChangeTransparentHdl, Edit&, void ) +IMPL_LINK_NOARG( LinePropertyPanelBase, ChangeTransparentHdl, weld::MetricSpinButton&, void ) { - sal_uInt16 nVal = static_cast<sal_uInt16>(mpMFTransparent->GetValue()); + sal_uInt16 nVal = static_cast<sal_uInt16>(mxMFTransparent->get_value(FieldUnit::PERCENT)); XLineTransparenceItem aItem( nVal ); setLineTransparency(aItem); @@ -686,41 +577,38 @@ IMPL_LINK_NOARG( LinePropertyPanelBase, ChangeTransparentHdl, Edit&, void ) void LinePropertyPanelBase::SetWidthIcon(int n) { - const sal_uInt16 nIdWidth = mpTBWidth->GetItemId(UNO_SELECTWIDTH); if (n == 0) - mpTBWidth->SetItemImage( nIdWidth, maIMGNone); + mxTBWidth->set_item_icon_name(SELECTWIDTH, maIMGNone); else - mpTBWidth->SetItemImage( nIdWidth, mpIMGWidthIcon[n-1]); + mxTBWidth->set_item_icon_name(SELECTWIDTH, maIMGWidthIcon[n-1]); } void LinePropertyPanelBase::SetWidthIcon() { if(!mbWidthValuable) { - const sal_uInt16 nIdWidth = mpTBWidth->GetItemId(UNO_SELECTWIDTH); - mpTBWidth->SetItemImage(nIdWidth, maIMGNone); + mxTBWidth->set_item_icon_name(SELECTWIDTH, maIMGNone); return; } long nVal = LogicToLogic(mnWidthCoreValue * 10, meMapUnit, MapUnit::MapPoint); - const sal_uInt16 nIdWidth = mpTBWidth->GetItemId(UNO_SELECTWIDTH); if(nVal <= 6) - mpTBWidth->SetItemImage( nIdWidth, mpIMGWidthIcon[0]); + mxTBWidth->set_item_icon_name(SELECTWIDTH, maIMGWidthIcon[0]); else if (nVal <= 9) - mpTBWidth->SetItemImage( nIdWidth, mpIMGWidthIcon[1]); + mxTBWidth->set_item_icon_name(SELECTWIDTH, maIMGWidthIcon[1]); else if (nVal <= 12) - mpTBWidth->SetItemImage( nIdWidth, mpIMGWidthIcon[2]); + mxTBWidth->set_item_icon_name(SELECTWIDTH, maIMGWidthIcon[2]); else if (nVal <= 19) - mpTBWidth->SetItemImage( nIdWidth, mpIMGWidthIcon[3]); + mxTBWidth->set_item_icon_name(SELECTWIDTH, maIMGWidthIcon[3]); else if (nVal <= 26) - mpTBWidth->SetItemImage( nIdWidth, mpIMGWidthIcon[4]); + mxTBWidth->set_item_icon_name(SELECTWIDTH, maIMGWidthIcon[4]); else if (nVal <= 37) - mpTBWidth->SetItemImage( nIdWidth, mpIMGWidthIcon[5]); + mxTBWidth->set_item_icon_name(SELECTWIDTH, maIMGWidthIcon[5]); else if (nVal <= 52) - mpTBWidth->SetItemImage( nIdWidth, mpIMGWidthIcon[6]); + mxTBWidth->set_item_icon_name(SELECTWIDTH, maIMGWidthIcon[6]); else - mpTBWidth->SetItemImage( nIdWidth, mpIMGWidthIcon[7]); + mxTBWidth->set_item_icon_name(SELECTWIDTH, maIMGWidthIcon[7]); } @@ -728,6 +616,7 @@ void LinePropertyPanelBase::SetWidth(long nWidth) { mnWidthCoreValue = nWidth; mbWidthValuable = true; + mxLineWidthPopup->SetWidthSelect(mnWidthCoreValue, mbWidthValuable, meMapUnit); } void LinePropertyPanelBase::FillLineEndList() @@ -735,26 +624,25 @@ void LinePropertyPanelBase::FillLineEndList() SfxObjectShell* pSh = SfxObjectShell::Current(); if ( pSh && pSh->GetItem( SID_LINEEND_LIST ) ) { - mpLBStart->Enable(); + mxLBStart->set_sensitive(true); mxLineEndList = pSh->GetItem( SID_LINEEND_LIST )->GetLineEndList(); if (mxLineEndList.is()) { - BitmapEx aZeroBitmap; - - if (mxLineStyleList.is()) - aZeroBitmap = mxLineStyleList->GetBitmapForUISolidLine(); - - FillLineEndListBox(*mpLBStart, *mpLBEnd, *mxLineEndList, aZeroBitmap); + OUString sNone(SvxResId(RID_SVXSTR_NONE)); + mxLBStart->append_text(sNone); + mxLBStart->Fill(mxLineEndList, true); + mxLBEnd->append_text(sNone); + mxLBEnd->Fill(mxLineEndList, false); } - mpLBStart->SelectEntryPos(0); - mpLBEnd->SelectEntryPos(0); + mxLBStart->set_active(0); + mxLBEnd->set_active(0); } else { - mpLBStart->Disable(); - mpLBEnd->Disable(); + mxLBStart->set_sensitive(false); + mxLBEnd->set_sensitive(false); } } @@ -763,19 +651,19 @@ void LinePropertyPanelBase::FillLineStyleList() SfxObjectShell* pSh = SfxObjectShell::Current(); if ( pSh && pSh->GetItem( SID_DASH_LIST ) ) { - mpLBStyle->Enable(); + mxLBStyle->set_sensitive(true); mxLineStyleList = pSh->GetItem( SID_DASH_LIST )->GetDashList(); if (mxLineStyleList.is()) { - FillLineStyleListBox(*mpLBStyle, *mxLineStyleList); + mxLBStyle->Fill(mxLineStyleList); } - mpLBStyle->SelectEntryPos(0); + mxLBStyle->set_active(0); } else { - mpLBStyle->Disable(); + mxLBStyle->set_sensitive(false); } } @@ -783,8 +671,8 @@ void LinePropertyPanelBase::SelectLineStyle() { if (!mpStyleItem || !mpDashItem) { - mpLBStyle->SetNoSelection(); - mpLBStyle->Disable(); + mxLBStyle->set_active(-1); + mxLBStyle->set_sensitive(false); return; } @@ -796,7 +684,7 @@ void LinePropertyPanelBase::SelectLineStyle() case drawing::LineStyle_NONE: break; case drawing::LineStyle_SOLID: - mpLBStyle->SelectEntryPos(1); + mxLBStyle->set_active(1); bSelected = true; break; default: @@ -809,7 +697,7 @@ void LinePropertyPanelBase::SelectLineStyle() const XDash& rEntry = pEntry->GetDash(); if(rDash == rEntry) { - mpLBStyle->SelectEntryPos(a + 2); + mxLBStyle->set_active(a + 2); bSelected = true; } } @@ -818,7 +706,7 @@ void LinePropertyPanelBase::SelectLineStyle() } if(!bSelected) - mpLBStyle->SelectEntryPos( 0 ); + mxLBStyle->set_active( 0 ); ActivateControls(); } @@ -831,8 +719,8 @@ void LinePropertyPanelBase::SelectEndStyle(bool bStart) { if (!mpStartItem) { - mpLBStart->SetNoSelection(); - mpLBStart->Disable(); + mxLBStart->set_active(-1); + mxLBStart->set_sensitive(false); return; } @@ -845,7 +733,7 @@ void LinePropertyPanelBase::SelectEndStyle(bool bStart) const basegfx::B2DPolyPolygon& rEntryPolygon = pEntry->GetLineEnd(); if(rItemPolygon == rEntryPolygon) { - mpLBStart->SelectEntryPos(a + 1); + mxLBStart->set_active(a + 1); bSelected = true; } } @@ -853,15 +741,15 @@ void LinePropertyPanelBase::SelectEndStyle(bool bStart) if(!bSelected) { - mpLBStart->SelectEntryPos( 0 ); + mxLBStart->set_active( 0 ); } } else { if (!mpEndItem) { - mpLBEnd->SetNoSelection(); - mpLBEnd->Disable(); + mxLBEnd->set_active(-1); + mxLBEnd->set_sensitive(false); return; } @@ -874,7 +762,7 @@ void LinePropertyPanelBase::SelectEndStyle(bool bStart) const basegfx::B2DPolyPolygon& rEntryPolygon = pEntry->GetLineEnd(); if(rItemPolygon == rEntryPolygon) { - mpLBEnd->SelectEntryPos(a + 1); + mxLBEnd->set_active(a + 1); bSelected = true; } } @@ -882,25 +770,26 @@ void LinePropertyPanelBase::SelectEndStyle(bool bStart) if(!bSelected) { - mpLBEnd->SelectEntryPos( 0 ); + mxLBEnd->set_active( 0 ); } } } void LinePropertyPanelBase::ActivateControls() { - const sal_Int32 nPos(mpLBStyle->GetSelectedEntryPos()); + const sal_Int32 nPos(mxLBStyle->get_active()); bool bLineStyle( nPos != 0 ); - mpGridLineProps->Enable( bLineStyle ); - mpBoxArrowProps->Enable( bLineStyle ); - mpLBStart->Enable( bLineStyle && mbArrowSupported ); - mpLBEnd->Enable( bLineStyle && mbArrowSupported ); + mxGridLineProps->set_sensitive( bLineStyle ); + mxBoxArrowProps->set_sensitive( bLineStyle ); + mxLBStart->set_sensitive( bLineStyle && mbArrowSupported ); + mxLBEnd->set_sensitive( bLineStyle && mbArrowSupported ); } void LinePropertyPanelBase::setMapUnit(MapUnit eMapUnit) { meMapUnit = eMapUnit; + mxLineWidthPopup->SetWidthSelect(mnWidthCoreValue, mbWidthValuable, meMapUnit); } void LinePropertyPanelBase::disableArrowHead() diff --git a/svx/source/sidebar/line/LineWidthPopup.cxx b/svx/source/sidebar/line/LineWidthPopup.cxx index d4964d3642e6..206d41635a12 100644 --- a/svx/source/sidebar/line/LineWidthPopup.cxx +++ b/svx/source/sidebar/line/LineWidthPopup.cxx @@ -30,9 +30,8 @@ namespace svx { namespace sidebar { -LineWidthPopup::LineWidthPopup(LinePropertyPanelBase& rParent) - : FloatingWindow(&rParent, "FloatingLineProperty", "svx/ui/floatinglineproperty.ui") - , m_rParent(rParent) +LineWidthPopup::LineWidthPopup(weld::Widget* pParent, LinePropertyPanelBase& rParent) + : m_rParent(rParent) , m_sPt(SvxResId(RID_SVXSTR_PT)) , m_eMapUnit(MapUnit::MapTwip) , m_bVSFocus(true) @@ -40,19 +39,15 @@ LineWidthPopup::LineWidthPopup(LinePropertyPanelBase& rParent) , m_nCustomWidth(0) , m_aIMGCus(StockImage::Yes, RID_SVXBMP_WIDTH_CUSTOM) , m_aIMGCusGray(StockImage::Yes, RID_SVXBMP_WIDTH_CUSTOM_GRAY) + , m_xBuilder(Application::CreateBuilder(pParent, "svx/ui/floatinglineproperty.ui")) + , m_xTopLevel(m_xBuilder->weld_container("FloatingLineProperty")) + , m_xMFWidth(m_xBuilder->weld_metric_spin_button("spin", FieldUnit::POINT)) + , m_xVSWidth(new LineWidthValueSet()) + , m_xVSWidthWin(new weld::CustomWeld(*m_xBuilder, "lineset", *m_xVSWidth)) { - get(m_xMFWidth, "spin"); + m_xTopLevel->connect_focus_in(LINK(this, LineWidthPopup, FocusHdl)); - get(m_xBox, "box"); - - m_xVSWidth = VclPtr<LineWidthValueSet>::Create(m_xBox); - - // Avoid flicker when hovering over the menu items. - if (!IsNativeControlSupported(ControlType::Pushbutton, ControlPart::Focus)) - // If NWF renders the focus rects itself, that breaks double-buffering. - m_xMFWidth->RequestDoubleBuffering(true); - - m_xVSWidth->SetStyle(m_xVSWidth->GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT); + m_xVSWidth->SetStyle(m_xVSWidth->GetStyle() | WB_3DLOOK | WB_NO_DIRECTSELECT); maStrUnits[0] = "0.5"; maStrUnits[1] = "0.8"; @@ -94,32 +89,20 @@ LineWidthPopup::LineWidthPopup(LinePropertyPanelBase& rParent) m_xVSWidth->SetSelItem(0); m_xVSWidth->SetSelectHdl(LINK(this, LineWidthPopup, VSSelectHdl)); - m_xMFWidth->SetModifyHdl(LINK(this, LineWidthPopup, MFModifyHdl)); - - m_xVSWidth->StartSelection(); - m_xVSWidth->Show(); -} - -void LineWidthPopup::dispose() -{ - m_xVSWidth.disposeAndClear(); - m_xBox.clear(); - m_xMFWidth.clear(); - FloatingWindow::dispose(); + m_xMFWidth->connect_value_changed(LINK(this, LineWidthPopup, MFModifyHdl)); } LineWidthPopup::~LineWidthPopup() { - disposeOnce(); } -IMPL_LINK(LineWidthPopup, VSSelectHdl, ValueSet*, /*pControl*/, void) +IMPL_LINK_NOARG(LineWidthPopup, VSSelectHdl, SvtValueSet*, void) { sal_uInt16 iPos = m_xVSWidth->GetSelectedItemId(); if (iPos >= 1 && iPos <= 8) { - sal_IntPtr nVal = LogicToLogic(reinterpret_cast<sal_IntPtr>(m_xVSWidth->GetItemData( iPos )), MapUnit::MapPoint, m_eMapUnit); - nVal = m_xMFWidth->Denormalize(nVal); + sal_IntPtr nVal = OutputDevice::LogicToLogic(reinterpret_cast<sal_IntPtr>(m_xVSWidth->GetItemData( iPos )), MapUnit::MapPoint, m_eMapUnit); + nVal = m_xMFWidth->denormalize(nVal); XLineWidthItem aWidthItem( nVal ); m_rParent.setLineWidth(aWidthItem); m_rParent.SetWidthIcon(iPos); @@ -130,8 +113,8 @@ IMPL_LINK(LineWidthPopup, VSSelectHdl, ValueSet*, /*pControl*/, void) //modified if (m_bCustom) { - long nVal = LogicToLogic(m_nCustomWidth , MapUnit::MapPoint, m_eMapUnit); - nVal = m_xMFWidth->Denormalize(nVal); + long nVal = OutputDevice::LogicToLogic(m_nCustomWidth , MapUnit::MapPoint, m_eMapUnit); + nVal = m_xMFWidth->denormalize(nVal); XLineWidthItem aWidthItem( nVal ); m_rParent.setLineWidth(aWidthItem); m_rParent.SetWidth(nVal); @@ -141,30 +124,27 @@ IMPL_LINK(LineWidthPopup, VSSelectHdl, ValueSet*, /*pControl*/, void) m_xVSWidth->SetNoSelection(); //add , set no selection and keep the last select item m_xVSWidth->SetFormat(); m_xVSWidth->Invalidate(); - Invalidate(); - m_xVSWidth->StartSelection(); } //modify end } + if ((iPos >= 1 && iPos <= 8) || (iPos == 9 && m_bCustom)) //add { - EndPopupMode(); + m_rParent.EndLineWidthPopup(); } } -IMPL_LINK(LineWidthPopup, MFModifyHdl, Edit&, /*rControl*/, void) +IMPL_LINK_NOARG(LineWidthPopup, MFModifyHdl, weld::MetricSpinButton&, void) { if (m_xVSWidth->GetSelItem()) { m_xVSWidth->SetSelItem(0); m_xVSWidth->SetFormat(); m_xVSWidth->Invalidate(); - Invalidate(); - m_xVSWidth->StartSelection(); } - long nTmp = static_cast<long>(m_xMFWidth->GetValue()); - long nVal = LogicToLogic( nTmp, MapUnit::MapPoint, m_eMapUnit ); - sal_Int32 nNewWidth = static_cast<short>(m_xMFWidth->Denormalize( nVal )); + long nTmp = static_cast<long>(m_xMFWidth->get_value(FieldUnit::NONE)); + long nVal = OutputDevice::LogicToLogic( nTmp, MapUnit::MapPoint, m_eMapUnit ); + sal_Int32 nNewWidth = static_cast<short>(m_xMFWidth->denormalize( nVal )); XLineWidthItem aWidthItem(nNewWidth); m_rParent.setLineWidth(aWidthItem); } @@ -203,15 +183,15 @@ void LineWidthPopup::SetWidthSelect(long lValue, bool bValuable, MapUnit eMapUni if (bValuable) { sal_Int64 nVal = OutputDevice::LogicToLogic(lValue, eMapUnit, MapUnit::Map100thMM ); - nVal = m_xMFWidth->Normalize(nVal); - m_xMFWidth->SetValue( nVal, FieldUnit::MM_100TH ); + nVal = m_xMFWidth->normalize(nVal); + m_xMFWidth->set_value( nVal, FieldUnit::MM_100TH ); } else { - m_xMFWidth->SetText( "" ); + m_xMFWidth->set_text( "" ); } - OUString strCurrValue = m_xMFWidth->GetText(); + OUString strCurrValue = m_xMFWidth->get_text(); sal_uInt16 i = 0; for(; i < 8; i++) { @@ -230,12 +210,14 @@ void LineWidthPopup::SetWidthSelect(long lValue, bool bValuable, MapUnit eMapUni m_xVSWidth->SetFormat(); m_xVSWidth->Invalidate(); - m_xVSWidth->StartSelection(); +} +IMPL_LINK_NOARG(LineWidthPopup, FocusHdl, weld::Widget&, void) +{ if (m_bVSFocus) m_xVSWidth->GrabFocus(); else - m_xMFWidth->GrabFocus(); + m_xMFWidth->grab_focus(); } } } // end of namespace svx::sidebar diff --git a/svx/source/sidebar/line/LineWidthValueSet.cxx b/svx/source/sidebar/line/LineWidthValueSet.cxx index 0de8c3637a09..ce3a6ca7b1e1 100644 --- a/svx/source/sidebar/line/LineWidthValueSet.cxx +++ b/svx/source/sidebar/line/LineWidthValueSet.cxx @@ -19,13 +19,14 @@ #include "LineWidthValueSet.hxx" #include <i18nlangtag/mslangid.hxx> -#include <vcl/settings.hxx> #include <vcl/event.hxx> +#include <vcl/settings.hxx> +#include <vcl/svapp.hxx> namespace svx { namespace sidebar { -LineWidthValueSet::LineWidthValueSet(vcl::Window* pParent) - : ValueSet(pParent, WB_TABSTOP) +LineWidthValueSet::LineWidthValueSet() + : SvtValueSet(nullptr) , nSelItem(0) , bCusEnable(false) { @@ -35,12 +36,11 @@ void LineWidthValueSet::Resize() { SetColCount(); SetLineCount(9); - ValueSet::Resize(); + SvtValueSet::Resize(); } LineWidthValueSet::~LineWidthValueSet() { - disposeOnce(); } void LineWidthValueSet::SetUnit(std::array<OUString,9> const & strUnits) @@ -97,19 +97,19 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) Point aLineStart(aBLPos.X() + 5, aBLPos.Y() + ( nRectHeight - nItemId )/2); Point aLineEnd(aBLPos.X() + nRectWidth * 7 / 9 - 10, aBLPos.Y() + ( nRectHeight - nItemId )/2); - if(nItemId == 9) + if (nItemId == 9) { Point aImgStart(aBLPos.X() + 5, aBLPos.Y() + ( nRectHeight - 23 ) / 2); pDev->DrawImage(aImgStart, imgCus); - // Point aStart(aImgStart.X() + 14 + 20 , aBLPos.Y() + nRectHeight/6); + tools::Rectangle aStrRect = aRect; aStrRect.AdjustTop(nRectHeight/6 ); aStrRect.AdjustBottom( -(nRectHeight/6) ); aStrRect.AdjustLeft(imgCus.GetSizePixel().Width() + 20 ); if(bCusEnable) - aFont.SetColor(GetSettings().GetStyleSettings().GetFieldTextColor()); + aFont.SetColor(Application::GetSettings().GetStyleSettings().GetFieldTextColor()); else - aFont.SetColor(GetSettings().GetStyleSettings().GetDisableColor()); + aFont.SetColor(Application::GetSettings().GetStyleSettings().GetDisableColor()); pDev->SetFont(aFont); pDev->DrawText(aStrRect, maStrUnits[ nItemId - 1 ], DrawTextFlags::EndEllipsis); @@ -134,7 +134,7 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) if(nSelItem == nItemId ) aFont.SetColor(COL_WHITE); else - aFont.SetColor(GetSettings().GetStyleSettings().GetFieldTextColor()); + aFont.SetColor(Application::GetSettings().GetStyleSettings().GetFieldTextColor()); pDev->SetFont(aFont); Point aStart(aBLPos.X() + nRectWidth * 7 / 9 , aBLPos.Y() + nRectHeight/6); pDev->DrawText(aStart, maStrUnits[ nItemId - 1 ]); //can't set DrawTextFlags::EndEllipsis here ,or the text will disappear @@ -143,7 +143,7 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) if( nSelItem == nItemId ) pDev->SetLineColor(COL_WHITE); else - pDev->SetLineColor(GetSettings().GetStyleSettings().GetFieldTextColor()); + pDev->SetLineColor(Application::GetSettings().GetStyleSettings().GetFieldTextColor()); for(sal_uInt16 i = 1; i <= nItemId; i++) { @@ -159,9 +159,12 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) pDev->SetFont(aOldFont); } -Size LineWidthValueSet::GetOptimalSize() const +void LineWidthValueSet::SetDrawingArea(weld::DrawingArea* pDrawingArea) { - return LogicToPixel(Size(80, 12 * 9), MapMode(MapUnit::MapAppFont)); + SvtValueSet::SetDrawingArea(pDrawingArea); + Size aSize(pDrawingArea->get_ref_device().LogicToPixel(Size(80, 12 * 9), MapMode(MapUnit::MapAppFont))); + pDrawingArea->set_size_request(aSize.Width(), aSize.Height()); + SetOutputSizePixel(aSize); } } } // end of namespace svx::sidebar diff --git a/svx/source/sidebar/line/LineWidthValueSet.hxx b/svx/source/sidebar/line/LineWidthValueSet.hxx index 7912b2476be5..67998ce204c5 100644 --- a/svx/source/sidebar/line/LineWidthValueSet.hxx +++ b/svx/source/sidebar/line/LineWidthValueSet.hxx @@ -25,10 +25,10 @@ namespace svx { namespace sidebar { -class LineWidthValueSet final : public ValueSet +class LineWidthValueSet final : public SvtValueSet { public: - explicit LineWidthValueSet(vcl::Window* pParent); + explicit LineWidthValueSet(); virtual ~LineWidthValueSet() override; void SetUnit(std::array<OUString,9> const & strUnits); @@ -39,7 +39,7 @@ public: virtual void UserDraw( const UserDrawEvent& rUDEvt ) override; virtual void Resize() override; - virtual Size GetOptimalSize() const override; + virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override; private: sal_uInt16 nSelItem; diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 681a6db6284c..a06ecc0c7395 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -31,6 +31,7 @@ #include <sfx2/viewsh.hxx> #include <sfx2/objsh.hxx> #include <sfx2/viewfrm.hxx> +#include <sfx2/weldutils.hxx> #include <svx/dialcontrol.hxx> #include <svx/dlgutil.hxx> #include <unotools/localedatawrapper.hxx> diff --git a/svx/uiconfig/ui/floatinglineproperty.ui b/svx/uiconfig/ui/floatinglineproperty.ui index 955499ce27a2..b017b2ed8a50 100644 --- a/svx/uiconfig/ui/floatinglineproperty.ui +++ b/svx/uiconfig/ui/floatinglineproperty.ui @@ -1,23 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.19.0 --> +<!-- Generated with glade 3.22.1 --> <interface domain="svx"> <requires lib="gtk+" version="3.18"/> - <object class="GtkAdjustment" id="adjustment1"> - <property name="upper">500</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> - </object> - <object class="GtkWindow" id="FloatingLineProperty:border"> - <property name="can_focus">True</property> - <property name="has_focus">True</property> - <property name="hexpand">True</property> - <property name="vexpand">True</property> - <property name="border_width">6</property> - <property name="resizable">False</property> - <property name="destroy_with_parent">True</property> - <property name="type_hint">popup-menu</property> - <property name="skip_pager_hint">True</property> - <property name="deletable">False</property> + <object class="GtkPopover" id="FloatingLineProperty"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="border_width">4</property> <child> <object class="GtkGrid" id="grid1"> <property name="visible">True</property> @@ -26,14 +14,28 @@ <property name="vexpand">True</property> <property name="row_spacing">6</property> <child> - <object class="GtkBox" id="box"> + <object class="GtkScrolledWindow" id="valuesetwin"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can_focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="orientation">vertical</property> + <property name="hscrollbar_policy">never</property> + <property name="vscrollbar_policy">never</property> + <property name="shadow_type">in</property> <child> - <placeholder/> + <object class="GtkViewport"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkDrawingArea" id="lineset"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + </object> + </child> + </object> </child> </object> <packing> @@ -52,7 +54,7 @@ <property name="can_focus">False</property> <property name="label" translatable="yes" context="floatinglineproperty|label1">Custom Line Width:</property> <property name="use_underline">True</property> - <property name="mnemonic_widget">spin:0.0pt</property> + <property name="mnemonic_widget">spin</property> <property name="ellipsize">end</property> </object> <packing> @@ -61,7 +63,7 @@ </packing> </child> <child> - <object class="GtkSpinButton" id="spin:0.0pt"> + <object class="GtkSpinButton" id="spin"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="adjustment">adjustment1</property> @@ -81,4 +83,9 @@ </object> </child> </object> + <object class="GtkAdjustment" id="adjustment1"> + <property name="upper">500</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> </interface> diff --git a/svx/uiconfig/ui/sidebarline.ui b/svx/uiconfig/ui/sidebarline.ui index 855fae19aaf5..d18b522417f7 100644 --- a/svx/uiconfig/ui/sidebarline.ui +++ b/svx/uiconfig/ui/sidebarline.ui @@ -1,13 +1,48 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.20.0 --> +<!-- Generated with glade 3.22.1 --> <interface domain="svx"> <requires lib="gtk+" version="3.18"/> - <requires lib="LibreOffice" version="1.0"/> <object class="GtkAdjustment" id="adjustment1"> <property name="upper">100</property> <property name="step_increment">10</property> <property name="page_increment">20</property> </object> + <object class="GtkListStore" id="liststore4"> + <columns> + <!-- column-name text --> + <column type="gchararray"/> + <!-- column-name id --> + <column type="gchararray"/> + <!-- column-name image --> + <column type="GdkPixbuf"/> + <!-- column-name surface --> + <column type="CairoSurface"/> + </columns> + </object> + <object class="GtkListStore" id="liststore5"> + <columns> + <!-- column-name text --> + <column type="gchararray"/> + <!-- column-name id --> + <column type="gchararray"/> + <!-- column-name image --> + <column type="GdkPixbuf"/> + <!-- column-name surface --> + <column type="CairoSurface"/> + </columns> + </object> + <object class="GtkListStore" id="liststore6"> + <columns> + <!-- column-name text --> + <column type="gchararray"/> + <!-- column-name id --> + <column type="gchararray"/> + <!-- column-name image --> + <column type="GdkPixbuf"/> + <!-- column-name surface --> + <column type="CairoSurface"/> + </columns> + </object> <object class="GtkGrid" id="LinePropertyPanel"> <property name="visible">True</property> <property name="can_focus">False</property> @@ -29,16 +64,30 @@ <object class="GtkBox" id="box1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="halign">center</property> + <property name="orientation">vertical</property> <property name="spacing">3</property> <child> - <object class="GtkComboBoxText" id="beginarrowstyle"> + <object class="GtkComboBox" id="beginarrowstyle"> <property name="width_request">65</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="has_tooltip">True</property> + <property name="can_focus">False</property> <property name="tooltip_text" translatable="yes" context="sidebarline|beginarrowstyle|tooltip_text">Select the style of the beginning arrowhead.</property> <property name="hexpand">True</property> + <property name="model">liststore4</property> + <property name="entry_text_column">0</property> + <property name="id_column">1</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext1"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + <child> + <object class="GtkCellRendererPixbuf" id="cellrenderertext2"/> + <attributes> + <attribute name="surface">3</attribute> + </attributes> + </child> <child internal-child="accessible"> <object class="AtkObject" id="beginarrowstyle-atkobject"> <property name="AtkObject::accessible-name" translatable="yes" context="sidebarline|beginarrowstyle-atkobject">Beginning Style</property> @@ -52,13 +101,27 @@ </packing> </child> <child> - <object class="GtkComboBoxText" id="linestyle"> + <object class="GtkComboBox" id="linestyle"> <property name="width_request">105</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="has_tooltip">True</property> + <property name="can_focus">False</property> <property name="tooltip_text" translatable="yes" context="sidebarline|linestyle|tooltip_text">Select the style of the line.</property> <property name="hexpand">True</property> + <property name="model">liststore5</property> + <property name="entry_text_column">0</property> + <property name="id_column">1</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext7"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + <child> + <object class="GtkCellRendererPixbuf" id="cellrenderertext11"/> + <attributes> + <attribute name="surface">3</attribute> + </attributes> + </child> <child internal-child="accessible"> <object class="AtkObject" id="linestyle-atkobject"> <property name="AtkObject::accessible-name" translatable="yes" context="sidebarline|linestyle-atkobject">Style</property> @@ -72,14 +135,27 @@ </packing> </child> <child> - <object class="GtkComboBoxText" id="endarrowstyle"> + <object class="GtkComboBox" id="endarrowstyle"> <property name="width_request">65</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="has_tooltip">True</property> + <property name="can_focus">False</property> + <property name="model">liststore6</property> <property name="tooltip_text" translatable="yes" context="sidebarline|endarrowstyle|tooltip_text">Select the style of the ending arrowhead.</property> - <property name="margin_right">6</property> + <property name="entry_text_column">0</property> <property name="hexpand">True</property> + <property name="id_column">1</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext5"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + <child> + <object class="GtkCellRendererPixbuf" id="cellrenderertext6"/> + <attributes> + <attribute name="surface">3</attribute> + </attributes> + </child> <child internal-child="accessible"> <object class="AtkObject" id="endarrowstyle-atkobject"> <property name="AtkObject::accessible-name" translatable="yes" context="sidebarline|endarrowstyle-atkobject">Ending Style</property> @@ -103,7 +179,7 @@ <object class="GtkGrid" id="lineproperties"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="hexpand">True</property> + <property name="halign">start</property> <property name="row_spacing">6</property> <property name="column_spacing">6</property> <child> @@ -112,44 +188,39 @@ <property name="can_focus">False</property> <property name="label" translatable="yes" context="sidebarline|widthlabel">_Width:</property> <property name="use_underline">True</property> + <property name="mnemonic_widget">width</property> <property name="xalign">0</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="GtkToolbar" id="width"> - <property name="width_request">120</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="has_tooltip">True</property> <property name="tooltip_text" translatable="yes" context="sidebarline|width|tooltip_text">Select the width of the line.</property> + <property name="hexpand">True</property> + <property name="toolbar_style">icons</property> + <property name="show_arrow">False</property> + <property name="icon_size">2</property> <child> - <object class="GtkMenuToolButton" id="setwidth"> - <property name="width_request">105</property> + <object class="GtkMenuToolButton" id="SelectWidth"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="action_name">.uno:SelectWidth</property> + <property name="hexpand">True</property> <property name="use_underline">True</property> </object> - <accessibility> - <relation type="labelled-by" target="widthlabel"/> - </accessibility> <packing> <property name="expand">True</property> - <property name="homogeneous">True</property> + <property name="homogeneous">False</property> </packing> </child> </object> <packing> <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> @@ -158,43 +229,40 @@ <property name="can_focus">False</property> <property name="label" translatable="yes" context="sidebarline|colorlabel">_Color:</property> <property name="use_underline">True</property> + <property name="mnemonic_widget">color</property> <property name="xalign">0</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="sfxlo-SidebarToolBox" id="color"> + <object class="GtkToolbar" id="color"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="has_tooltip">True</property> <property name="tooltip_text" translatable="yes" context="sidebarline|color|tooltip_text">Select the color of the line.</property> + <property name="hexpand">True</property> + <property name="toolbar_style">icons</property> + <property name="show_arrow">False</property> + <property name="icon_size">2</property> <child> - <object class="GtkMenuToolButton" id="setcolor"> - <property name="width_request">105</property> + <object class="GtkMenuToolButton" id=".uno:XLineColor"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="has_tooltip">True</property> <property name="tooltip_text" translatable="yes" context="sidebarline|setcolor|tooltip_text">Select the color of the line.</property> - <property name="margin_left">20</property> - <property name="action_name">.uno:XLineColor</property> + <property name="hexpand">True</property> <property name="use_underline">True</property> </object> <packing> <property name="expand">True</property> - <property name="homogeneous">True</property> + <property name="homogeneous">False</property> </packing> </child> </object> <packing> <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> @@ -203,28 +271,23 @@ <property name="can_focus">False</property> <property name="label" translatable="yes" context="sidebarline|translabel">_Transparency:</property> <property name="use_underline">True</property> + <property name="mnemonic_widget">linetransparency</property> <property name="xalign">0</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="GtkSpinButton" id="linetransparency:0%"> + <object class="GtkSpinButton" id="linetransparency"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="has_tooltip">True</property> <property name="tooltip_text" translatable="yes" context="sidebarline|linetransparency|tooltip_text">Specify the transparency of the line.</property> <property name="halign">start</property> <property name="adjustment">adjustment1</property> - <accessibility> - <relation type="labelled-by" target="translabel"/> - </accessibility> <child internal-child="accessible"> - <object class="AtkObject" id="linetransparency:0%-atkobject"> + <object class="AtkObject" id="linetransparency-atkobject"> <property name="AtkObject::accessible-name" translatable="yes" context="sidebarline|linetransparency-atkobject">Transparency</property> </object> </child> @@ -232,8 +295,6 @@ <packing> <property name="left_attach">1</property> <property name="top_attach">2</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> </object> @@ -247,9 +308,11 @@ <object class="GtkBox" id="arrowproperties"> <property name="can_focus">False</property> <property name="orientation">vertical</property> + <property name="visible">True</property> <child> <object class="GtkGrid" id="grid5"> <property name="can_focus">False</property> + <property name="visible">True</property> <property name="row_spacing">6</property> <property name="column_spacing">6</property> <property name="column_homogeneous">True</property> @@ -265,15 +328,12 @@ <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="GtkComboBoxText" id="edgestyle"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="has_tooltip">True</property> <property name="tooltip_text" translatable="yes" context="sidebarline|edgestyle|tooltip_text">Select the style of the edge connections.</property> <items> <item translatable="yes" context="sidebarline|edgestyle">Rounded</item> @@ -290,8 +350,6 @@ <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> @@ -306,15 +364,12 @@ <packing> <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="GtkComboBoxText" id="linecapstyle"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="has_tooltip">True</property> <property name="tooltip_text" translatable="yes" context="sidebarline|linecapstyle|tooltip_text">Select the style of the line caps.</property> <items> <item translatable="yes" context="sidebarline|linecapstyle">Flat</item> @@ -330,8 +385,6 @@ <packing> <property name="left_attach">1</property> <property name="top_attach">1</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> </object> @@ -352,17 +405,19 @@ <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> </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> </object> + <object class="GtkSizeGroup"> + <widgets> + <widget name="width"/> + <widget name="color"/> + </widgets> + </object> </interface> |