diff options
-rw-r--r-- | svx/source/sidebar/inspector/InspectorTextPanel.cxx | 12 | ||||
-rw-r--r-- | svx/source/sidebar/inspector/InspectorTextPanel.hxx | 5 | ||||
-rw-r--r-- | svx/uiconfig/ui/inspectortextpanel.ui | 158 |
3 files changed, 45 insertions, 130 deletions
diff --git a/svx/source/sidebar/inspector/InspectorTextPanel.cxx b/svx/source/sidebar/inspector/InspectorTextPanel.cxx index 0c719dfccb2f..6eaa6f992573 100644 --- a/svx/source/sidebar/inspector/InspectorTextPanel.cxx +++ b/svx/source/sidebar/inspector/InspectorTextPanel.cxx @@ -44,22 +44,16 @@ InspectorTextPanel::Create(vcl::Window* pParent, InspectorTextPanel::InspectorTextPanel(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame) : PanelLayout(pParent, "InspectorTextPanel", "svx/ui/inspectortextpanel.ui", rxFrame) - , mxFont(m_xBuilder->weld_toolbar("font")) - , mxFontDispatch(new ToolbarUnoDispatcher(*mxFont, *m_xBuilder, rxFrame)) - , mxFontHeight(m_xBuilder->weld_toolbar("fontheight")) - , mxFontHeightDispatch(new ToolbarUnoDispatcher(*mxFontHeight, *m_xBuilder, rxFrame)) + , mxListBoxStyles(m_xBuilder->weld_tree_view("liststore")) { + mxListBoxStyles->set_size_request(-1, mxListBoxStyles->get_height_rows(10)); } InspectorTextPanel::~InspectorTextPanel() { disposeOnce(); } void InspectorTextPanel::dispose() { - mxFontHeightDispatch.reset(); - mxFontDispatch.reset(); - - mxFontHeight.reset(); - mxFont.reset(); + mxListBoxStyles.reset(); PanelLayout::dispose(); } diff --git a/svx/source/sidebar/inspector/InspectorTextPanel.hxx b/svx/source/sidebar/inspector/InspectorTextPanel.hxx index ed8b24a52d48..0d6160dfe75e 100644 --- a/svx/source/sidebar/inspector/InspectorTextPanel.hxx +++ b/svx/source/sidebar/inspector/InspectorTextPanel.hxx @@ -42,10 +42,7 @@ public: const css::uno::Reference<css::frame::XFrame>& rxFrame); private: - std::unique_ptr<weld::Toolbar> mxFont; - std::unique_ptr<ToolbarUnoDispatcher> mxFontDispatch; - std::unique_ptr<weld::Toolbar> mxFontHeight; - std::unique_ptr<ToolbarUnoDispatcher> mxFontHeightDispatch; + std::unique_ptr<weld::TreeView> mxListBoxStyles; // To dump all the properties vcl::EnumContext maContext; }; diff --git a/svx/uiconfig/ui/inspectortextpanel.ui b/svx/uiconfig/ui/inspectortextpanel.ui index f3966cc687fd..1ebd98403eb5 100644 --- a/svx/uiconfig/ui/inspectortextpanel.ui +++ b/svx/uiconfig/ui/inspectortextpanel.ui @@ -1,150 +1,74 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.22.0 --> -<interface domain="svx"> +<!-- Generated with glade 3.20.4 --> +<interface domain="sw"> <requires lib="gtk+" version="3.18"/> + <object class="GtkTreeStore" id="liststore"> + <columns> + <!-- column-name text --> + <column type="gchararray"/> + <!-- column-name id --> + <column type="gchararray"/> + </columns> + </object> <object class="GtkGrid" id="InspectorTextPanel"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="hexpand">True</property> + <property name="row_spacing">6</property> + <property name="column_spacing">6</property> <child> - <object class="GtkBox" id="box1"> + <object class="GtkAlignment" id="alignment1"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> - <property name="border_width">6</property> - <property name="orientation">vertical</property> - <property name="spacing">3</property> + <property name="vexpand">True</property> <child> - <object class="GtkBox" id="box3"> + <object class="GtkGrid" id="grid1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="spacing">6</property> - <child> - <object class="GtkLabel" id="fontnamelabel"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xpad">10</property> - <property name="label" translatable="yes" context="inspectortextpanel|fontnamelabel">Font Name</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">font</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="row_spacing">6</property> + <property name="column_spacing">6</property> <child> - <object class="GtkToolbar" id="font"> + <object class="GtkScrolledWindow"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can_focus">True</property> <property name="hexpand">True</property> - <property name="toolbar_style">icons</property> - <property name="show_arrow">False</property> - <property name="icon_size">2</property> + <property name="vexpand">True</property> + <property name="shadow_type">in</property> <child> - <object class="GtkToolItem" id=".uno:CharFontName"> + <object class="GtkTreeView" id="listbox_fonts"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can_focus">True</property> <property name="hexpand">True</property> - <child> - <object class="GtkComboBoxText" id="fontnamecombobox"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="has_entry">True</property> - <property name="popup_fixed_width">False</property> - <child internal-child="entry"> - <object class="GtkEntry"> - <property name="can_focus">True</property> - </object> - </child> - </object> + <property name="vexpand">True</property> + <property name="model">liststore</property> + <property name="headers_visible">False</property> + <property name="headers_clickable">False</property> + <property name="search_column">0</property> + <property name="show_expanders">False</property> + <child internal-child="selection"> + <object class="GtkTreeSelection"/> </child> - </object> - <packing> - <property name="expand">True</property> - <property name="homogeneous">False</property> - </packing> - </child> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkBox" id="box2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="spacing">6</property> - <child> - <object class="GtkLabel" id="fontsizelabel"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xpad">15</property> - <property name="label" translatable="yes" context="inspectortextpanel|fontsizelabel">Font Size</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">fontheight</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkToolbar" id="fontheight"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="toolbar_style">icons</property> - <property name="show_arrow">False</property> - <property name="icon_size">2</property> - <child> - <object class="GtkToolItem" id=".uno:FontHeight"> - <property name="visible">True</property> - <property name="can_focus">False</property> <child> - <object class="GtkComboBoxText" id="fontsizecombobox"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="has_entry">True</property> - <child internal-child="entry"> - <object class="GtkEntry"> - <property name="can_focus">True</property> - </object> + <object class="GtkTreeViewColumn" id="treeviewcolumn1"> + <child> + <object class="GtkCellRendererText" id="cellrenderertext1"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> </child> </object> </child> </object> - <packing> - <property name="expand">True</property> - <property name="homogeneous">False</property> - </packing> </child> </object> <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack_type">end</property> - <property name="position">1</property> + <property name="left_attach">0</property> + <property name="top_attach">0</property> </packing> </child> </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> </child> </object> <packing> |