svx: Switch to weld::TreeView in LineWidthPopup

Instead of using a custom ValueSet subclass to
draw images and text next to them for selection
in the line width popup, use a weld::TreeView with
two columns: one for the image, and one for the text.

This is similar to what

      commit b185d34642
      Author: Michael Weghorn <m.weghorn@posteo.de>
      Date:   Fri Nov 28 14:12:04 2025 +0100

          tdf#168120 sc: Switch to weld::TreeView in CellLineStyleControl

did elswhere.

Adjust indices used to account for the fact that
weld::TreeView indices are 0-based while the ValueSet ones
are 1-based.

The special "Last custom value" entry so far was
using two separate images, depending on whether
or not it was enabled/sensitive or not: If it is
disabled, a greyed out variant of the image was used.
With the switch to weld::TreeView, leave that up
to the TreeView by simply enabling/disabling the
corresponding row using weld::TreeView::set_sensitive
for the corresponding row.

Drop the now unused LineWidthValueSet.

This switch to weld::TreeView reduces custom widget
logic and custom drawing and makes this more consistent
with other widgets used elsewhere (e.g. like for the
one mentioned in the commit above, the usual font
is used now as well, and it also aligns the behavior
more with that one.)

The popup for configuring the line thickness that uses
this code can be triggered like this:

* start Writer
* insert a chart using "Insert" -> "Chart..."
* select the chart wall in the chart
* open the "Properties" sidebar deck
* in the "Line" section of that sidebar deck, click on the
  "Thickness" button/combobox

Change-Id: I423e80bba9e81a98e80652f6486970d40286362e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211735
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
Michael Weghorn
2026-10-05 22:59:44 +02:00
parent 19ed84a1d5
commit 9a61140c32
9 changed files with 122 additions and 295 deletions
-6
View File
@@ -90,12 +90,6 @@ bool MoveParam::VisitCXXOperatorCallExpr(const CXXOperatorCallExpr* callExpr)
if (!loplugin::TypeCheck(parmVarDecl->getType()).LvalueReference().Const())
return true;
StringRef aFileName = getFilenameOfLocation(
compiler.getSourceManager().getSpellingLoc(parmVarDecl->getBeginLoc()));
if (loplugin::hasPathnamePrefix(aFileName,
SRCDIR "/svx/source/sidebar/line/LineWidthValueSet.cxx"))
return true;
report(DiagnosticsEngine::Warning, "rather use move && param1", callExpr->getBeginLoc());
return true;
+7 -7
View File
@@ -22,7 +22,7 @@
#include <vcl/image.hxx>
#include <vcl/weld/Container.hxx>
#include <vcl/weld/MetricSpinButton.hxx>
#include <vcl/weld/customweld.hxx>
#include <vcl/weld/TreeView.hxx>
#include <svtools/toolbarmenu.hxx>
#include <array>
@@ -31,7 +31,6 @@ class ValueSet;
namespace svx::sidebar
{
class LinePropertyPanelBase;
class LineWidthValueSet;
class LineWidthPopup final : public WeldToolbarPopup
{
@@ -50,17 +49,18 @@ private:
std::array<OUString, 9> maStrUnits;
OUString m_sPt;
MapUnit m_eMapUnit;
bool m_bVSFocus;
bool m_bTreeViewFocus;
bool m_bCustom;
tools::Long m_nCustomWidth;
Image m_aIMGCus;
Image m_aIMGCusGray;
std::unique_ptr<weld::MetricSpinButton> m_xMFWidth;
std::unique_ptr<LineWidthValueSet> m_xVSWidth;
std::unique_ptr<weld::CustomWeld> m_xVSWidthWin;
std::unique_ptr<weld::TreeView> m_xWidthTreeView;
DECL_LINK(VSSelectHdl, ValueSet*, void);
ScopedVclPtr<VirtualDevice> CreateImage(int nIndex);
void UnselectTreeViewItems();
DECL_LINK(TreeViewItemActivatedHdl, const weld::TreeIter&, bool);
DECL_LINK(MFModifyHdl, weld::MetricSpinButton&, void);
};
-2
View File
@@ -11357,8 +11357,6 @@ svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
svx/source/sidebar/line/LinePropertyPanel.cxx
svx/source/sidebar/line/LinePropertyPanel.hxx
svx/source/sidebar/line/LinePropertyPanelBase.cxx
svx/source/sidebar/line/LineWidthValueSet.cxx
svx/source/sidebar/line/LineWidthValueSet.hxx
svx/source/sidebar/media/MediaPlaybackPanel.cxx
svx/source/sidebar/media/MediaPlaybackPanel.hxx
svx/source/sidebar/nbdtmg.cxx
-1
View File
@@ -244,7 +244,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
svx/source/sidebar/graphic/GraphicPropertyPanel \
svx/source/sidebar/line/LinePropertyPanel \
svx/source/sidebar/line/LinePropertyPanelBase \
svx/source/sidebar/line/LineWidthValueSet \
svx/source/sidebar/line/LineWidthPopup \
$(call gb_Helper_optional,AVMEDIA,svx/source/sidebar/media/MediaPlaybackPanel) \
svx/source/sidebar/possize/PosSizePropertyPanel \
-1
View File
@@ -126,7 +126,6 @@ inline constexpr OUString RID_SVXBMP_GALLERY_SOUND_7 = u"svx/res/galsnd7.png"_us
inline constexpr OUString BMP_NONE_ICON = u"svx/res/symphony/blank.png"_ustr;
inline constexpr OUString RID_SVXBMP_WIDTH_CUSTOM = u"svx/res/symphony/last_custom_common.png"_ustr;
inline constexpr OUString RID_SVXBMP_WIDTH_CUSTOM_GRAY = u"svx/res/symphony/last_custom_common_grey.png"_ustr;
inline constexpr OUString BMP_AXIAL = u"svx/res/symphony/axial.png"_ustr;
inline constexpr OUString BMP_ELLI = u"svx/res/symphony/ellipsoid.png"_ustr;
+78 -59
View File
@@ -27,8 +27,9 @@
#include <unotools/localedatawrapper.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
#include <vcl/virdev.hxx>
#include <vcl/weld/Builder.hxx>
#include "LineWidthValueSet.hxx"
#include <vcl/weld/weldutils.hxx>
#include <bitmaps.hlst>
namespace svx::sidebar
@@ -39,17 +40,13 @@ LineWidthPopup::LineWidthPopup(weld::Widget* pParent, LinePropertyPanelBase& rPa
, m_rParent(rParent)
, m_sPt(SvxResId(RID_SVXSTR_PT))
, m_eMapUnit(MapUnit::MapTwip)
, m_bVSFocus(true)
, m_bTreeViewFocus(true)
, m_bCustom(false)
, m_nCustomWidth(0)
, m_aIMGCus(StockImage::Yes, RID_SVXBMP_WIDTH_CUSTOM)
, m_aIMGCusGray(StockImage::Yes, RID_SVXBMP_WIDTH_CUSTOM_GRAY)
, m_xMFWidth(m_xBuilder->weld_metric_spin_button(u"spin"_ustr, FieldUnit::POINT))
, m_xVSWidth(new LineWidthValueSet())
, m_xVSWidthWin(new weld::CustomWeld(*m_xBuilder, u"lineset"_ustr, *m_xVSWidth))
, m_xWidthTreeView(m_xBuilder->weld_tree_view("linetreeview"))
{
m_xVSWidth->SetStyle(m_xVSWidth->GetStyle() | WB_3DLOOK | WB_NO_DIRECTSELECT);
maStrUnits = { u"0.5"_ustr, u"0.8"_ustr, u"1.0"_ustr,
u"1.5"_ustr, u"2.3"_ustr, u"3.0"_ustr,
u"4.5"_ustr, u"6.0"_ustr, SvxResId(RID_SVXSTR_WIDTH_LAST_CUSTOM) };
@@ -64,46 +61,78 @@ LineWidthPopup::LineWidthPopup(weld::Widget* pParent, LinePropertyPanelBase& rPa
maStrUnits[i] += m_sPt;
}
for (sal_uInt16 i = 1; i <= 9; ++i)
for (int i = 0; i < 9; ++i)
{
m_xVSWidth->InsertItem(i);
m_xVSWidth->SetItemText(i, maStrUnits[i - 1]);
m_xWidthTreeView->insert(i);
ScopedVclPtr<VirtualDevice> pImage = CreateImage(i);
m_xWidthTreeView->set_image(i, *pImage, 0);
m_xWidthTreeView->set_text(i, maStrUnits.at(i), 1);
m_xWidthTreeView->set_sensitive(i, true);
}
m_xWidthTreeView->columns_autosize();
m_xVSWidth->SetUnit(maStrUnits);
m_xVSWidth->SetItemData(1, reinterpret_cast<void*>(5));
m_xVSWidth->SetItemData(2, reinterpret_cast<void*>(8));
m_xVSWidth->SetItemData(3, reinterpret_cast<void*>(10));
m_xVSWidth->SetItemData(4, reinterpret_cast<void*>(15));
m_xVSWidth->SetItemData(5, reinterpret_cast<void*>(23));
m_xVSWidth->SetItemData(6, reinterpret_cast<void*>(30));
m_xVSWidth->SetItemData(7, reinterpret_cast<void*>(45));
m_xVSWidth->SetItemData(8, reinterpret_cast<void*>(60));
m_xVSWidth->SetImage(m_aIMGCusGray);
m_xWidthTreeView->set_id(0, OUString::number(5));
m_xWidthTreeView->set_id(1, OUString::number(8));
m_xWidthTreeView->set_id(2, OUString::number(10));
m_xWidthTreeView->set_id(3, OUString::number(15));
m_xWidthTreeView->set_id(4, OUString::number(23));
m_xWidthTreeView->set_id(5, OUString::number(30));
m_xWidthTreeView->set_id(6, OUString::number(45));
m_xWidthTreeView->set_id(7, OUString::number(60));
m_xVSWidth->UnselectItems();
UnselectTreeViewItems();
m_xVSWidth->SetSelectHdl(LINK(this, LineWidthPopup, VSSelectHdl));
m_xWidthTreeView->connect_item_activated(LINK(this, LineWidthPopup, TreeViewItemActivatedHdl));
m_xMFWidth->connect_value_changed(LINK(this, LineWidthPopup, MFModifyHdl));
}
LineWidthPopup::~LineWidthPopup() {}
IMPL_LINK_NOARG(LineWidthPopup, VSSelectHdl, ValueSet*, void)
ScopedVclPtr<VirtualDevice> LineWidthPopup::CreateImage(int nIndex)
{
sal_uInt16 iPos = m_xVSWidth->GetSelectedItemId();
if (iPos >= 1 && iPos <= 8)
ScopedVclPtr<VirtualDevice> pDev = m_xWidthTreeView->create_virtual_device();
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
pDev->SetBackground(rStyleSettings.GetFieldColor());
pDev->SetLineColor(rStyleSettings.GetFieldTextColor());
pDev->SetFillColor(pDev->GetLineColor());
pDev->SetOutputSizePixel(Size(50, 26));
if (nIndex >= 0 && nIndex <= 7)
{
sal_IntPtr nVal = OutputDevice::LogicToLogic(
reinterpret_cast<sal_IntPtr>(m_xVSWidth->GetItemData(iPos)), MapUnit::MapPoint,
m_eMapUnit);
pDev->DrawRect(tools::Rectangle(5, 10, 40, 11 + nIndex));
}
else
{
assert(nIndex == 8 && "Invalid index");
const Point aStartPoint(
(pDev->GetOutputWidthPixel() - m_aIMGCus.GetSizePixel().getWidth()) / 2,
(pDev->GetOutputHeightPixel() - m_aIMGCus.GetSizePixel().getHeight()) / 2);
pDev->DrawImage(aStartPoint, m_aIMGCus);
}
return pDev;
}
void LineWidthPopup::UnselectTreeViewItems()
{
m_xWidthTreeView->unselect_all();
m_xWidthTreeView->set_cursor(-1);
}
IMPL_LINK(LineWidthPopup, TreeViewItemActivatedHdl, const weld::TreeIter&, rIter, bool)
{
const int nPos = m_xWidthTreeView->get_iter_index_in_parent(rIter);
if (nPos >= 0 && nPos <= 7)
{
sal_Int64 nVal = OutputDevice::LogicToLogic(m_xWidthTreeView->get_id(rIter).toInt64(),
MapUnit::MapPoint, m_eMapUnit);
nVal = m_xMFWidth->denormalize(nVal);
XLineWidthItem aWidthItem(nVal);
m_rParent.setLineWidth(aWidthItem);
m_rParent.SetWidthIcon(iPos);
m_rParent.SetWidthIcon(nPos + 1);
m_rParent.SetWidth(nVal);
}
else if (iPos == 9)
else if (nPos == 8)
{ //last custom
//modified
if (m_bCustom)
@@ -117,27 +146,23 @@ IMPL_LINK_NOARG(LineWidthPopup, VSSelectHdl, ValueSet*, void)
}
else
{
m_xVSWidth->SetNoSelection(); // add: set no selection and keep the last selected item
m_xVSWidth->SetFormat();
m_xVSWidth->Invalidate();
// add: set no selection and keep the last selected item
m_xWidthTreeView->unselect_all();
}
//modify end
}
if ((iPos >= 1 && iPos <= 8) || (iPos == 9 && m_bCustom)) //add
if ((nPos >= 0 && nPos <= 7) || (nPos == 8 && m_bCustom)) //add
{
m_rParent.EndLineWidthPopup();
}
return true;
}
IMPL_LINK_NOARG(LineWidthPopup, MFModifyHdl, weld::MetricSpinButton&, void)
{
if (!m_xVSWidth->IsNoSelection() && m_xVSWidth->GetSelectedItemId() != 0)
{
m_xVSWidth->UnselectItems();
m_xVSWidth->SetFormat();
m_xVSWidth->Invalidate();
}
UnselectTreeViewItems();
tools::Long nTmp = static_cast<tools::Long>(m_xMFWidth->get_value(FieldUnit::NONE));
tools::Long nVal = OutputDevice::LogicToLogic(nTmp, MapUnit::MapPoint, m_eMapUnit);
sal_Int32 nNewWidth = static_cast<short>(m_xMFWidth->denormalize(nVal));
@@ -147,8 +172,8 @@ IMPL_LINK_NOARG(LineWidthPopup, MFModifyHdl, weld::MetricSpinButton&, void)
void LineWidthPopup::SetWidthSelect(tools::Long lValue, bool bValuable, MapUnit eMapUnit)
{
m_bVSFocus = true;
m_xVSWidth->UnselectItems();
m_bTreeViewFocus = true;
UnselectTreeViewItems();
m_eMapUnit = eMapUnit;
SvtViewOptions aWinOpt(EViewType::Window, u"PopupPanel_LineWidth"_ustr);
if (aWinOpt.Exists())
@@ -161,18 +186,16 @@ void LineWidthPopup::SetWidthSelect(tools::Long lValue, bool bValuable, MapUnit
OUString aWinData(aTmp);
m_nCustomWidth = aWinData.toInt32();
m_bCustom = true;
m_xVSWidth->SetImage(m_aIMGCus);
m_xVSWidth->SetCusEnable(true);
m_xWidthTreeView->set_sensitive(8, true);
OUString aStrTip = OUString::number(static_cast<double>(m_nCustomWidth) / 10) + m_sPt;
m_xVSWidth->SetItemText(9, aStrTip);
m_xWidthTreeView->set_text(8, aStrTip);
}
else
{
m_bCustom = false;
m_xVSWidth->SetImage(m_aIMGCusGray);
m_xVSWidth->SetCusEnable(false);
m_xVSWidth->SetItemText(9, maStrUnits[8]);
m_xWidthTreeView->set_sensitive(8, false);
m_xWidthTreeView->set_text(8, maStrUnits.at(8));
}
if (bValuable)
@@ -187,32 +210,28 @@ void LineWidthPopup::SetWidthSelect(tools::Long lValue, bool bValuable, MapUnit
}
OUString strCurrValue = m_xMFWidth->get_text();
sal_uInt16 i = 0;
int i = 0;
for (; i < 8; i++)
{
if (strCurrValue == maStrUnits[i])
{
m_xVSWidth->SelectItem(i + 1);
m_xVSWidth->GrabFocus();
m_xWidthTreeView->select(i);
m_xWidthTreeView->grab_focus();
break;
}
}
if (i >= 8)
{
m_bVSFocus = false;
m_xVSWidth->UnselectItems();
m_bTreeViewFocus = false;
UnselectTreeViewItems();
}
m_xVSWidth->SetFormat();
m_xVSWidth->Invalidate();
}
void LineWidthPopup::GrabFocus()
{
if (m_bVSFocus)
m_xVSWidth->GrabFocus();
if (m_bTreeViewFocus)
m_xWidthTreeView->grab_focus();
else
m_xMFWidth->grab_focus();
}
@@ -1,150 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "LineWidthValueSet.hxx"
#include <i18nlangtag/mslangid.hxx>
#include <tools/mapunit.hxx>
#include <unotools/fontdefs.hxx>
#include <vcl/event.hxx>
#include <vcl/rendercontext/GetDefaultFontFlags.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld/ScrolledWindow.hxx>
namespace svx::sidebar {
LineWidthValueSet::LineWidthValueSet()
: ValueSet(nullptr)
, bCusEnable(false)
{
}
void LineWidthValueSet::Resize()
{
SetColCount();
SetLineCount(9);
ValueSet::Resize();
}
LineWidthValueSet::~LineWidthValueSet()
{
}
void LineWidthValueSet::SetUnit(std::array<OUString,9> const & strUnits)
{
maStrUnits = strUnits;
}
void LineWidthValueSet::UnselectItems()
{
SelectItem(1); // ,false); // 'false' nut supported by AOO
SetNoSelection();
}
void LineWidthValueSet::SetImage(const Image& img)
{
imgCus = img;
}
void LineWidthValueSet::SetCusEnable(bool bEnable)
{
bCusEnable = bEnable;
}
void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt )
{
tools::Rectangle aRect = rUDEvt.GetRect();
vcl::RenderContext* pDev = rUDEvt.GetRenderContext();
sal_uInt16 nItemId = rUDEvt.GetItemId();
tools::Long nRectHeight = aRect.GetHeight();
const tools::Long nRectWidth = aRect.GetWidth();
Point aBLPos = aRect.TopLeft();
auto popIt = pDev->ScopedPush(vcl::PushFlags::FONT | vcl::PushFlags::LINECOLOR | vcl::PushFlags::FILLCOLOR);
vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, MsLangId::getConfiguredSystemLanguage(), GetDefaultFontFlags::OnlyOne));
Size aSize = aFont.GetFontSize();
aSize.setHeight( nRectHeight*3/5 );
aFont.SetFontSize( aSize );
Point aLineStart(aBLPos.X() + 5, aBLPos.Y() + ( nRectHeight - nItemId )/2);
if (nItemId == 9)
{
Point aImgStart(aBLPos.X() + 5, aBLPos.Y() + ( nRectHeight - 23 ) / 2);
pDev->DrawImage(aImgStart, imgCus);
tools::Rectangle aStrRect = aRect;
aStrRect.AdjustTop(nRectHeight/6 );
aStrRect.AdjustBottom( -(nRectHeight/6) );
aStrRect.AdjustLeft(imgCus.GetSizePixel().Width() + 20 );
if(bCusEnable)
aFont.SetColor(Application::GetSettings().GetStyleSettings().GetFieldTextColor());
else
aFont.SetColor(Application::GetSettings().GetStyleSettings().GetDisableColor());
pDev->SetFont(aFont);
pDev->DrawText(aStrRect, maStrUnits[ nItemId - 1 ], DrawTextFlags::EndEllipsis);
}
else
{
if (IsItemSelected(nItemId))
{
tools::Rectangle aBackRect = aRect;
aBackRect.AdjustTop(3 );
aBackRect.AdjustBottom( -2 );
pDev->SetFillColor(Color(50,107,197));
pDev->DrawRect(aBackRect);
}
//draw text
if (IsItemSelected(nItemId))
aFont.SetColor(COL_WHITE);
else
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
//draw line
const Color aLineColor
= IsItemSelected(nItemId)
? COL_WHITE
: Application::GetSettings().GetStyleSettings().GetFieldTextColor();
pDev->SetLineColor(aLineColor);
pDev->SetFillColor(aLineColor);
const sal_Int32 nLineWidth = nRectWidth * 7 / 9 - 15;
pDev->DrawRect(tools::Rectangle(aLineStart, Size(nLineWidth, nItemId)));
}
Invalidate( aRect );
}
void LineWidthValueSet::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{
ValueSet::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);
SetColor(Application::GetSettings().GetStyleSettings().GetListBoxWindowBackgroundColor());
}
} // end of namespace svx::sidebar
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@@ -1,53 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEWIDTHVALUESET_HXX
#define INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEWIDTHVALUESET_HXX
#include <svtools/valueset.hxx>
#include <vcl/image.hxx>
#include <array>
namespace svx::sidebar {
class LineWidthValueSet final : public ValueSet
{
public:
explicit LineWidthValueSet();
virtual ~LineWidthValueSet() override;
void SetUnit(std::array<OUString,9> const & strUnits);
void UnselectItems();
void SetImage(const Image& img);
void SetCusEnable(bool bEnable);
virtual void UserDraw( const UserDrawEvent& rUDEvt ) override;
virtual void Resize() override;
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
private:
std::array<OUString,9> maStrUnits;
Image imgCus;
bool bCusEnable;
};
} // end of namespace svx::sidebar
#endif // INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEWIDTHVALUESET_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+37 -16
View File
@@ -7,6 +7,20 @@
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkListStore" id="linetreeview_model">
<columns>
<!-- column-name pixbuf -->
<column type="GdkPixbuf"/>
<!-- column-name text -->
<column type="gchararray"/>
<!-- column-name id -->
<column type="gchararray"/>
<!-- column-name weight -->
<column type="gint"/>
<!-- column-name sensitive -->
<column type="gboolean"/>
</columns>
</object>
<object class="GtkPopover" id="FloatingLineProperty">
<property name="can-focus">False</property>
<property name="no-show-all">True</property>
@@ -21,26 +35,33 @@
<property name="vexpand">True</property>
<property name="row-spacing">6</property>
<child>
<object class="GtkScrolledWindow" id="valuesetwin">
<object class="GtkTreeView" id="linetreeview">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="hscrollbar-policy">never</property>
<property name="vscrollbar-policy">never</property>
<property name="shadow-type">in</property>
<property name="model">linetreeview_model</property>
<property name="headers-visible">False</property>
<property name="enable-search">False</property>
<property name="show-expanders">False</property>
<property name="activate-on-single-click">True</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can-focus">False</property>
<object class="GtkTreeViewColumn">
<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>
<object class="GtkCellRendererPixbuf"/>
<attributes>
<attribute name="sensitive">4</attribute>
<attribute name="pixbuf">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="sensitive">4</attribute>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>