diff options
| author | Jabiertxof <jabier.arraiza@marker.es> | 2019-09-17 19:36:07 +0000 |
|---|---|---|
| committer | Jabiertxof <jabier.arraiza@marker.es> | 2019-09-18 12:35:42 +0000 |
| commit | 06ff374812299f9fad7bc8d74ce6af543419c00d (patch) | |
| tree | 88ca83fb15b4a6747098d3196e400164e7152437 | |
| parent | Process actions after new file created when Inkscape is opened. (diff) | |
| download | inkscape-06ff374812299f9fad7bc8d74ce6af543419c00d.tar.gz inkscape-06ff374812299f9fad7bc8d74ce6af543419c00d.zip | |
Lpe dialog listable
| -rw-r--r-- | share/icons/Tango/scalable/actions/hamburger-menu.svg | 10 | ||||
| -rw-r--r-- | share/icons/hicolor/scalable/actions/hamburger-menu.svg | 10 | ||||
| -rw-r--r-- | share/icons/hicolor/symbolic/actions/hamburger-menu-symbolic.svg | 10 | ||||
| -rw-r--r-- | share/ui/dialog-livepatheffect-add.ui | 42 | ||||
| -rw-r--r-- | src/ui/dialog/livepatheffect-add.cpp | 16 | ||||
| -rw-r--r-- | src/ui/dialog/livepatheffect-add.h | 2 |
6 files changed, 90 insertions, 0 deletions
diff --git a/share/icons/Tango/scalable/actions/hamburger-menu.svg b/share/icons/Tango/scalable/actions/hamburger-menu.svg new file mode 100644 index 000000000..0dc95e58d --- /dev/null +++ b/share/icons/Tango/scalable/actions/hamburger-menu.svg @@ -0,0 +1,10 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!-- Created with Inkscape (http://www.inkscape.org/) and export_objects.py --> +<svg xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg1" width="16" height="16" viewBox="0 0 16 16" sodipodi:docname="distribute-remove-overlaps-symbolic.svg"><sodipodi:namedview objecttolerance="10" gridtolerance="10" guidetolerance="10" id="namedview" showgrid="true" inkscape:zoom="0.6002936" inkscape:cx="732.67439" inkscape:cy="-567.94603" inkscape:window-width="1920" inkscape:window-height="1016" inkscape:window-x="0" inkscape:window-y="27" inkscape:window-maximized="1" inkscape:current-layer="layer1"> + <inkscape:grid type="xygrid" id="grid"/> + </sodipodi:namedview> + <g transform="matrix(0.727273,0,0,0.666667,-840.72727,-548.90812)" inkscape:label="00292" id="distribute-remove-overlaps"> + <path inkscape:connector-curvature="0" id="rect19455" d="m 1156,823.36218 h 22 v 24 h -22 z" style="opacity:0;fill:none"/> + <path inkscape:connector-curvature="0" id="rect19457" d="m 1159.9273,827.852 c -0.3407,0 -0.6152,0.27449 -0.6152,0.61523 v 2.53906 c 0,0.34075 0.2745,0.61524 0.6152,0.61524 h 14.1445 c 0.3408,0 0.6153,-0.27449 0.6153,-0.61524 v -2.53906 c 0,-0.34074 -0.2745,-0.61523 -0.6153,-0.61523 z m 0,5.625 c -0.3407,0 -0.6152,0.27449 -0.6152,0.61523 v 2.53906 c 0,0.34075 0.2745,0.61524 0.6152,0.61524 h 14.1445 c 0.3408,0 0.6153,-0.27449 0.6153,-0.61524 v -2.53906 c 0,-0.34074 -0.2745,-0.61523 -0.6153,-0.61523 z m 0,5.625 c -0.3407,0 -0.6152,0.27449 -0.6152,0.61523 v 2.53906 c 0,0.34074 0.2745,0.61524 0.6152,0.61524 h 14.1445 c 0.3408,0 0.6153,-0.2745 0.6153,-0.61524 v -2.53906 c 0,-0.34074 -0.2745,-0.61523 -0.6153,-0.61523 z" style="opacity:1"/> + </g> + </svg> diff --git a/share/icons/hicolor/scalable/actions/hamburger-menu.svg b/share/icons/hicolor/scalable/actions/hamburger-menu.svg new file mode 100644 index 000000000..0dc95e58d --- /dev/null +++ b/share/icons/hicolor/scalable/actions/hamburger-menu.svg @@ -0,0 +1,10 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!-- Created with Inkscape (http://www.inkscape.org/) and export_objects.py --> +<svg xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg1" width="16" height="16" viewBox="0 0 16 16" sodipodi:docname="distribute-remove-overlaps-symbolic.svg"><sodipodi:namedview objecttolerance="10" gridtolerance="10" guidetolerance="10" id="namedview" showgrid="true" inkscape:zoom="0.6002936" inkscape:cx="732.67439" inkscape:cy="-567.94603" inkscape:window-width="1920" inkscape:window-height="1016" inkscape:window-x="0" inkscape:window-y="27" inkscape:window-maximized="1" inkscape:current-layer="layer1"> + <inkscape:grid type="xygrid" id="grid"/> + </sodipodi:namedview> + <g transform="matrix(0.727273,0,0,0.666667,-840.72727,-548.90812)" inkscape:label="00292" id="distribute-remove-overlaps"> + <path inkscape:connector-curvature="0" id="rect19455" d="m 1156,823.36218 h 22 v 24 h -22 z" style="opacity:0;fill:none"/> + <path inkscape:connector-curvature="0" id="rect19457" d="m 1159.9273,827.852 c -0.3407,0 -0.6152,0.27449 -0.6152,0.61523 v 2.53906 c 0,0.34075 0.2745,0.61524 0.6152,0.61524 h 14.1445 c 0.3408,0 0.6153,-0.27449 0.6153,-0.61524 v -2.53906 c 0,-0.34074 -0.2745,-0.61523 -0.6153,-0.61523 z m 0,5.625 c -0.3407,0 -0.6152,0.27449 -0.6152,0.61523 v 2.53906 c 0,0.34075 0.2745,0.61524 0.6152,0.61524 h 14.1445 c 0.3408,0 0.6153,-0.27449 0.6153,-0.61524 v -2.53906 c 0,-0.34074 -0.2745,-0.61523 -0.6153,-0.61523 z m 0,5.625 c -0.3407,0 -0.6152,0.27449 -0.6152,0.61523 v 2.53906 c 0,0.34074 0.2745,0.61524 0.6152,0.61524 h 14.1445 c 0.3408,0 0.6153,-0.2745 0.6153,-0.61524 v -2.53906 c 0,-0.34074 -0.2745,-0.61523 -0.6153,-0.61523 z" style="opacity:1"/> + </g> + </svg> diff --git a/share/icons/hicolor/symbolic/actions/hamburger-menu-symbolic.svg b/share/icons/hicolor/symbolic/actions/hamburger-menu-symbolic.svg new file mode 100644 index 000000000..0dc95e58d --- /dev/null +++ b/share/icons/hicolor/symbolic/actions/hamburger-menu-symbolic.svg @@ -0,0 +1,10 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!-- Created with Inkscape (http://www.inkscape.org/) and export_objects.py --> +<svg xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg1" width="16" height="16" viewBox="0 0 16 16" sodipodi:docname="distribute-remove-overlaps-symbolic.svg"><sodipodi:namedview objecttolerance="10" gridtolerance="10" guidetolerance="10" id="namedview" showgrid="true" inkscape:zoom="0.6002936" inkscape:cx="732.67439" inkscape:cy="-567.94603" inkscape:window-width="1920" inkscape:window-height="1016" inkscape:window-x="0" inkscape:window-y="27" inkscape:window-maximized="1" inkscape:current-layer="layer1"> + <inkscape:grid type="xygrid" id="grid"/> + </sodipodi:namedview> + <g transform="matrix(0.727273,0,0,0.666667,-840.72727,-548.90812)" inkscape:label="00292" id="distribute-remove-overlaps"> + <path inkscape:connector-curvature="0" id="rect19455" d="m 1156,823.36218 h 22 v 24 h -22 z" style="opacity:0;fill:none"/> + <path inkscape:connector-curvature="0" id="rect19457" d="m 1159.9273,827.852 c -0.3407,0 -0.6152,0.27449 -0.6152,0.61523 v 2.53906 c 0,0.34075 0.2745,0.61524 0.6152,0.61524 h 14.1445 c 0.3408,0 0.6153,-0.27449 0.6153,-0.61524 v -2.53906 c 0,-0.34074 -0.2745,-0.61523 -0.6153,-0.61523 z m 0,5.625 c -0.3407,0 -0.6152,0.27449 -0.6152,0.61523 v 2.53906 c 0,0.34075 0.2745,0.61524 0.6152,0.61524 h 14.1445 c 0.3408,0 0.6153,-0.27449 0.6153,-0.61524 v -2.53906 c 0,-0.34074 -0.2745,-0.61523 -0.6153,-0.61523 z m 0,5.625 c -0.3407,0 -0.6152,0.27449 -0.6152,0.61523 v 2.53906 c 0,0.34074 0.2745,0.61524 0.6152,0.61524 h 14.1445 c 0.3408,0 0.6153,-0.2745 0.6153,-0.61524 v -2.53906 c 0,-0.34074 -0.2745,-0.61523 -0.6153,-0.61523 z" style="opacity:1"/> + </g> + </svg> diff --git a/share/ui/dialog-livepatheffect-add.ui b/share/ui/dialog-livepatheffect-add.ui index 5d385ec3a..97f63886e 100644 --- a/share/ui/dialog-livepatheffect-add.ui +++ b/share/ui/dialog-livepatheffect-add.ui @@ -159,6 +159,48 @@ <property name="position">5</property> </packing> </child> + <child> + <object class="GtkSeparator"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">4</property> + <property name="position">6</property> + </packing> + </child> + <child> + <object class="GtkEventBox" id="LPESelectorEffectEventHamburgerTooggle"> + <property name="name">LPESelectorEffectEventFavShow</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="halign">center</property> + <property name="valign">center</property> + <child> + <object class="GtkImage" id="LPESelectorEffectEventHamburgerToggleImage"> + <property name="name">LPESelectorEffectFavShowImage</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="pixel_size">27</property> + <property name="icon_name">hamburger-menu</property> + <property name="icon_size">2</property> + <style> + <class name="fab"/> + </style> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">7</property> + </packing> + </child> </object> </child> <style> diff --git a/src/ui/dialog/livepatheffect-add.cpp b/src/ui/dialog/livepatheffect-add.cpp index e9c23763d..06cde1e12 100644 --- a/src/ui/dialog/livepatheffect-add.cpp +++ b/src/ui/dialog/livepatheffect-add.cpp @@ -96,7 +96,9 @@ LivePathEffectAdd::LivePathEffectAdd() _builder->get_widget("LPEExperimental", _LPEExperimental); _builder->get_widget("LPEScrolled", _LPEScrolled); _builder->get_widget("LPESelectorEffectEventFavShow", _LPESelectorEffectEventFavShow); + _builder->get_widget("LPESelectorEffectEventHamburgerTooggle", _LPESelectorEffectEventHamburgerTooggle); _builder->get_widget("LPESelectorEffectInfoEventBox", _LPESelectorEffectInfoEventBox); + _LPEFilter->signal_search_changed().connect(sigc::mem_fun(*this, &LivePathEffectAdd::on_search)); _LPEDialogSelector->add_events(Gdk::POINTER_MOTION_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::ENTER_NOTIFY_MASK | Gdk::LEAVE_NOTIFY_MASK | Gdk::KEY_PRESS_MASK); @@ -188,6 +190,8 @@ LivePathEffectAdd::LivePathEffectAdd() _LPESelectorFlowBox->set_activate_on_single_click(false); _visiblelpe = _LPESelectorFlowBox->get_children().size(); _LPEInfo->set_visible(false); + _LPESelectorEffectEventHamburgerTooggle->signal_button_press_event().connect( + sigc::mem_fun(*this, &LivePathEffectAdd::togglelist)); _LPESelectorEffectEventFavShow->signal_enter_notify_event().connect(sigc::bind<GtkWidget *>( sigc::mem_fun(*this, &LivePathEffectAdd::mouseover), GTK_WIDGET(_LPESelectorEffectEventFavShow->gobj()))); _LPESelectorEffectEventFavShow->signal_leave_notify_event().connect(sigc::bind<GtkWidget *>( @@ -217,6 +221,18 @@ const LivePathEffect::EnumEffectData<LivePathEffect::EffectType> *LivePathEffect return instance()._to_add; } +bool LivePathEffectAdd::togglelist(GdkEventButton *evt) +{ + if (_LPEDialogSelector->get_style_context()->has_class("LPElist")) { + _LPEDialogSelector->get_style_context()->remove_class("LPElist"); + _LPESelectorFlowBox->set_max_children_per_line(1); + } else { + _LPEDialogSelector->get_style_context()->add_class("LPElist"); + _LPESelectorFlowBox->set_max_children_per_line(30); + } + return true; +} + void LivePathEffectAdd::on_focus(Gtk::Widget *widget) { Gtk::FlowBoxChild *child = dynamic_cast<Gtk::FlowBoxChild *>(widget); diff --git a/src/ui/dialog/livepatheffect-add.h b/src/ui/dialog/livepatheffect-add.h index 2dfd0ce71..89f834dbe 100644 --- a/src/ui/dialog/livepatheffect-add.h +++ b/src/ui/dialog/livepatheffect-add.h @@ -75,6 +75,7 @@ class LivePathEffectAdd { const LivePathEffect::EnumEffectData<LivePathEffect::EffectType> *to_add); bool expand(GdkEventButton *evt, Glib::RefPtr<Gtk::Builder> builder_effect); bool show_fav_toggler(GdkEventButton *evt); + bool togglelist(GdkEventButton *evt); bool mouseover(GdkEventCrossing *evt, GtkWidget *wdg); bool mouseout(GdkEventCrossing *evt, GtkWidget *wdg); void reload_effect_list(); @@ -100,6 +101,7 @@ private: Gtk::Popover *_LPESelectorEffectInfoPop; Gtk::EventBox *_LPESelectorEffectEventFavShow; Gtk::EventBox *_LPESelectorEffectInfoEventBox; + Gtk::EventBox *_LPESelectorEffectEventHamburgerTooggle; Gtk::Switch *_LPEExperimental; Gtk::SearchEntry *_LPEFilter; Gtk::ScrolledWindow *_LPEScrolled; |
