From b515997d1b2af5271b18448f9fafd0600d3c5b16 Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Thu, 29 Aug 2019 18:38:32 +0200 Subject: Fixes on UX inb CSS dialog --- src/style-internal.cpp | 2 +- src/ui/dialog/selectorsdialog.cpp | 13 ++++--------- src/ui/dialog/selectorsdialog.h | 4 ++-- src/ui/dialog/styledialog.cpp | 13 +++++++------ src/ui/dialog/styledialog.h | 1 + 5 files changed, 15 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/style-internal.cpp b/src/style-internal.cpp index 6c66e44b6..15c080d62 100644 --- a/src/style-internal.cpp +++ b/src/style-internal.cpp @@ -2850,7 +2850,7 @@ const Glib::ustring SPIVectorEffect::get_value() const if (ret.empty()) { ret += "none"; } else { - ret.erase(0,1); + ret.erase(0, 1); } return ret; } diff --git a/src/ui/dialog/selectorsdialog.cpp b/src/ui/dialog/selectorsdialog.cpp index f66876475..375d2d89b 100644 --- a/src/ui/dialog/selectorsdialog.cpp +++ b/src/ui/dialog/selectorsdialog.cpp @@ -25,8 +25,8 @@ #include "verbs.h" #include "xml/attribute-record.h" -#include "xml/sp-css-attr.h" #include "xml/node-observer.h" +#include "xml/sp-css-attr.h" #include #include @@ -395,10 +395,7 @@ void SelectorsDialog::_panedresized(Gtk::Allocation allocation) _resized(); } -void SelectorsDialog::_panedrealized() -{ - _style_dialog->readStyleElement(); -} +void SelectorsDialog::_panedrealized() { _style_dialog->readStyleElement(); } void SelectorsDialog::_childresized() { @@ -877,10 +874,8 @@ void SelectorsDialog::_addToSelector(Gtk::TreeModel::Row row) sp_repr_css_attr_add_from_string(css, obj->getRepr()->attribute("style")); Glib::ustring selprops = row[_mColumns._colProperties]; sp_repr_css_attr_add_from_string(css_selector, selprops.c_str()); - for ( List iter = css_selector->attributeList() ; - iter ; ++iter ) - { - gchar const * key = g_quark_to_string(iter->key); + for (List iter = css_selector->attributeList(); iter; ++iter) { + gchar const *key = g_quark_to_string(iter->key); css->setAttribute(key, nullptr); } sp_repr_css_write_string(css, css_str); diff --git a/src/ui/dialog/selectorsdialog.h b/src/ui/dialog/selectorsdialog.h index d304ccfad..1039b1e4d 100644 --- a/src/ui/dialog/selectorsdialog.h +++ b/src/ui/dialog/selectorsdialog.h @@ -56,7 +56,7 @@ class SelectorsDialog : public Widget::Panel { SelectorsDialog(SelectorsDialog const &d) = delete; SelectorsDialog operator=(SelectorsDialog const &d) = delete; static SelectorsDialog &getInstance() { return *new SelectorsDialog(); } - + private: // Monitor