summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2019-02-19 13:08:49 +0000
committerJabiertxof <jabier.arraiza@marker.es>2019-02-19 13:08:49 +0000
commit1f44f38dcf77bd9312d1818fccc333b0e31773a0 (patch)
tree0b5aec5bc148cbe0ff20f1e4c86a0e7af7796489
parentFix code to avoid error message "descr without font family". (diff)
downloadinkscape-1f44f38dcf77bd9312d1818fccc333b0e31773a0.tar.gz
inkscape-1f44f38dcf77bd9312d1818fccc333b0e31773a0.zip
Fixes LPE Dialog search focus and window sice improvements pointed by Patrick
-rw-r--r--share/ui/dialog-livepatheffect-add.ui16
-rw-r--r--src/ui/dialog/livepatheffect-add.cpp12
-rw-r--r--src/ui/dialog/livepatheffect-add.h1
3 files changed, 13 insertions, 16 deletions
diff --git a/share/ui/dialog-livepatheffect-add.ui b/share/ui/dialog-livepatheffect-add.ui
index 0598cb454..fe1e9555a 100644
--- a/share/ui/dialog-livepatheffect-add.ui
+++ b/share/ui/dialog-livepatheffect-add.ui
@@ -5,14 +5,10 @@
<object class="GtkDialog" id="LPEDialogSelector">
<property name="name">LPEDialogSelector</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="can_default">True</property>
+ <property name="can_focus">False</property>
<property name="title" translatable="yes">Live Path Effects Selector</property>
<property name="modal">True</property>
<property name="window_position">center-always</property>
- <property name="default_width">999</property>
- <property name="default_height">999</property>
<property name="destroy_with_parent">True</property>
<property name="type_hint">dialog</property>
<property name="skip_taskbar_hint">True</property>
@@ -25,7 +21,7 @@
<object class="GtkBox">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
- <property name="spacing">2</property>
+ <property name="baseline_position">top</property>
<child internal-child="action_area">
<object class="GtkButtonBox">
<property name="can_focus">False</property>
@@ -64,6 +60,11 @@
<property name="width_request">400</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="has_focus">True</property>
+ <property name="is_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="activates_default">True</property>
<property name="primary_icon_name">edit-find-symbolic</property>
<property name="primary_icon_activatable">False</property>
<property name="primary_icon_sensitive">False</property>
@@ -231,9 +232,6 @@
<property name="position">0</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
</object>
</child>
<style>
diff --git a/src/ui/dialog/livepatheffect-add.cpp b/src/ui/dialog/livepatheffect-add.cpp
index 452c72eeb..ce9e7464d 100644
--- a/src/ui/dialog/livepatheffect-add.cpp
+++ b/src/ui/dialog/livepatheffect-add.cpp
@@ -83,6 +83,7 @@ LivePathEffectAdd::LivePathEffectAdd()
: converter(Inkscape::LivePathEffect::LPETypeConverter)
, _applied(false)
, _showfavs(false)
+ , _started(true)
{
Glib::ustring gladefile = get_filename(Inkscape::IO::Resource::UIS, "dialog-livepatheffect-add.ui");
try {
@@ -554,14 +555,11 @@ void LivePathEffectAdd::show(SPDesktop *desktop)
}
}
}
- int width;
- int height;
- int width_2;
- int height_2;
- dial._LPEDialogSelector->get_default_size(width_2, height_2);
- dial._LPEDialogSelector->get_size(width, height);
- if (width == width_2 && height == height_2) {
+ if (dial._started) {
+ dial._started = false;
Gtk::Window *window = desktop->getToplevel();
+ int width;
+ int height;
window->get_size(width, height);
dial._LPEDialogSelector->resize(std::min(width - 300, 1440), std::min(height - 300, 900));
}
diff --git a/src/ui/dialog/livepatheffect-add.h b/src/ui/dialog/livepatheffect-add.h
index d1767ca3e..69c1da421 100644
--- a/src/ui/dialog/livepatheffect-add.h
+++ b/src/ui/dialog/livepatheffect-add.h
@@ -107,6 +107,7 @@ private:
const LivePathEffect::EnumEffectData<LivePathEffect::EffectType> *_to_add;
bool _showfavs;
bool _applied;
+ bool _started;
class Effect;
const LivePathEffect::EnumEffectDataConverter<LivePathEffect::EffectType> &converter;
static LivePathEffectAdd &instance()