diff options
author | Shivam Kumar Singh <shivamhere247@gmail.com> | 2020-05-31 22:55:40 +0530 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-06-02 12:00:32 +0200 |
commit | a9b47360c2af2514b1064fb179f9fb9f0b8ad225 (patch) | |
tree | 4361c7726a5509dbf8e09526df0d59295b2d3d4d /svx | |
parent | bb0039ca67f84d8c46e78f4209c17d2923790140 (diff) |
Removed the "Font.." things from the Inspector
Removed all the font related stuff and added a common property listing box
for the 'Character' Properties.
Another patch coming up for 'Paragraph' properties.
Change-Id: I71de4d4fe6536f49e0e700c850e2e714287c5e04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95228
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svx')
-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> |