Commit 95e03c77 authored by Jabier Arraiza's avatar Jabier Arraiza

Add @doctormo UX improvements

parent c3bcdae2
......@@ -5,7 +5,6 @@
<object class="GtkBox" id="CSSSelectorContainer">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
<property name="orientation">vertical</property>
<property name="baseline_position">top</property>
<child>
......@@ -67,7 +66,8 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="has_tooltip">True</property>
<property name="valign">start</property>
<property name="hscroll_policy">natural</property>
<property name="vscroll_policy">natural</property>
<property name="headers_visible">False</property>
<property name="enable_search">False</property>
<property name="fixed_height_mode">True</property>
......
This diff is collapsed.
......@@ -1347,16 +1347,11 @@ void SelectorsDialog::_selectRow()
if (!row->parent() && row->children().size() < 2) {
_del.show();
}
if (!row->parent() && row->children().size() > 1) {
if (!row->parent()) {
_style_dialog->setCurrentSelector(row[_mColumns._colSelector]);
} else {
_style_dialog->setCurrentSelector("");
}
} else if (selectedrows.size() == 0) {
_style_dialog->setCurrentSelector("");
_del.show();
} else {
_style_dialog->setCurrentSelector("");
}
if (_updating || !getDesktop()) return; // Avoid updating if we have set row via dialog.
if (SP_ACTIVE_DESKTOP != getDesktop()) {
......@@ -1370,6 +1365,8 @@ void SelectorsDialog::_selectRow()
SPObject *obj = nullptr;
if (!selection->isEmpty()) {
obj = selection->objects().back();
} else {
_style_dialog->setCurrentSelector("");
}
for (auto row : children) {
......
This diff is collapsed.
......@@ -128,6 +128,8 @@ class StyleDialog : public Widget::Panel {
void _onPropDelete(Glib::ustring path, Glib::RefPtr<Gtk::TreeStore> store);
void _nameEdited(const Glib::ustring &path, const Glib::ustring &name, Glib::RefPtr<Gtk::TreeStore> store,
Gtk::TreeView *css_tree);
bool _onNameKeyReleased(GdkEventKey *event, Gtk::CellEditable *cell);
bool _onValueKeyReleased(GdkEventKey *event, Gtk::CellEditable *cell);
void _valueEdited(const Glib::ustring &path, const Glib::ustring &value, Glib::RefPtr<Gtk::TreeStore> store);
void _startNameEdit(Gtk::CellEditable *cell, const Glib::ustring &path);
......@@ -147,7 +149,7 @@ class StyleDialog : public Widget::Panel {
// Manipulate Tree
std::vector<SPObject *> _getObjVec(Glib::ustring selector);
std::map<Glib::ustring, Glib::ustring> parseStyle(Glib::ustring style_string);
std::map<Glib::ustring, Glib::ustring> _ownerStyle;
std::map<Glib::ustring, Glib::ustring> _owner_style;
void _addOwnerStyle(Glib::ustring name, Glib::ustring selector);
// Variables
Inkscape::XML::Node *_textNode; // Track so we know when to add a NodeObserver.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment