From 6b65f5514fcb2ef41de9eb53e2c31867213db501 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Mon, 23 Sep 2019 07:57:09 +0200 Subject: fix tooggled value and po glade fila added --- po/POTFILES.ui.in | 1 + share/ui/dialog-livepatheffect-add.glade | 133 +++++++++++++++---------------- share/ui/style.css | 10 ++- src/ui/dialog/livepatheffect-add.cpp | 25 ++---- 4 files changed, 77 insertions(+), 92 deletions(-) diff --git a/po/POTFILES.ui.in b/po/POTFILES.ui.in index 89101d608..6c475ecca 100644 --- a/po/POTFILES.ui.in +++ b/po/POTFILES.ui.in @@ -1,4 +1,5 @@ ../share/ui/dialog-css.glade ../share/ui/dialog-livepatheffect-add.glade +../share/ui/dialog-livepatheffect-effect.glade ../share/ui/dialog-trace.glade ../share/ui/inkscape-application.glade diff --git a/share/ui/dialog-livepatheffect-add.glade b/share/ui/dialog-livepatheffect-add.glade index a04954378..28ab7d2dd 100644 --- a/share/ui/dialog-livepatheffect-add.glade +++ b/share/ui/dialog-livepatheffect-add.glade @@ -107,7 +107,7 @@ False - LPESelectorEffectFavShowImage + LPESelectorEffectPackLessImage True False center @@ -115,15 +115,12 @@ 22 pack-less 2 - - True - True + False + False 0 True @@ -139,7 +136,7 @@ LPESelectorEffectRadioPackLess - LPESelectorEffectFavShowImage + LPESelectorEffectPackMoreImage True False center @@ -147,15 +144,12 @@ 22 pack-more 2 - - True - True + False + False 1 True @@ -171,7 +165,7 @@ LPESelectorEffectRadioPackLess - LPESelectorEffectFavShowImage + LPESelectorEffectListImage True False center @@ -179,16 +173,14 @@ 22 hamburger-menu 2 - False - True + False 2 + True @@ -196,6 +188,7 @@ False False 2 + True @@ -357,7 +350,7 @@ - + LPESelectorEffectInfoPop False True @@ -367,41 +360,75 @@ False False - - LPESelectorEffectInfoEventBox - True - False - - + + LPESelectorEffectInfoEventBox True False - vertical True False + vertical - - LPESelectorEffectInfoIcon + True False - start - 40 - align-vertical-baseline - 6 + + + LPESelectorEffectInfoIcon + True + False + start + 40 + align-vertical-baseline + 6 + + + False + False + 0 + + + + + LPESelectorEffectInfoName + True + False + Name + center + True + 20 + + + False + True + 1 + + False - False + True 0 - - LPESelectorEffectInfoName + + True + False + + + False + True + 1 + + + + + LPESelectorEffectInfoDescription True False - Name + Description center True 20 @@ -409,47 +436,13 @@ False True - 1 + 2 - - False - True - 0 - - - - - True - False - - - False - True - 1 - - - - - LPESelectorEffectInfoDescription - True - False - Description - center - True - 20 - - - False - True - 2 - - - diff --git a/share/ui/style.css b/share/ui/style.css index 380b66078..bc931bb00 100644 --- a/share/ui/style.css +++ b/share/ui/style.css @@ -91,6 +91,10 @@ image { -gtk-icon-style: regular; } +.regular .symbolic image { + -gtk-icon-style: symbolic; +} + .inverted, .dark .forcebright, .bright .forcedark { @@ -288,14 +292,14 @@ spinbutton undershoot { color: @theme_fg_color; } -#LPEDialogSelector.LPEPackLess flowboxchild { +#LPEDialogSelector.LPEPackMore flowboxchild { margin:5px 1px 0px; padding:3px 3px 10px 3px; } -#LPEDialogSelector.LPEPackLess flowboxchild label { +#LPEDialogSelector.LPEPackMore flowboxchild label { font-size:14px; } -#LPEDialogSelector.LPEPackLess #LPESelectorEffectInfoPop label{ +#LPEDialogSelector.LPEPackMore #LPESelectorEffectInfoPop label{ font-size:13px; } diff --git a/src/ui/dialog/livepatheffect-add.cpp b/src/ui/dialog/livepatheffect-add.cpp index c89a0fe7e..fa1571be6 100644 --- a/src/ui/dialog/livepatheffect-add.cpp +++ b/src/ui/dialog/livepatheffect-add.cpp @@ -97,10 +97,9 @@ LivePathEffectAdd::LivePathEffectAdd() _builder->get_widget("LPEScrolled", _LPEScrolled); _builder->get_widget("LPESelectorEffectEventFavShow", _LPESelectorEffectEventFavShow); _builder->get_widget("LPESelectorEffectInfoEventBox", _LPESelectorEffectInfoEventBox); - _builder->get_widget("LPESelectorEffectRadioList", _LPESelectorEffectRadioList); _builder->get_widget("LPESelectorEffectRadioPackLess", _LPESelectorEffectRadioPackLess); _builder->get_widget("LPESelectorEffectRadioPackMore", _LPESelectorEffectRadioPackMore); - + _builder->get_widget("LPESelectorEffectRadioList", _LPESelectorEffectRadioList); _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 | @@ -203,12 +202,12 @@ LivePathEffectAdd::LivePathEffectAdd() _LPESelectorFlowBox->set_activate_on_single_click(false); _visiblelpe = _LPESelectorFlowBox->get_children().size(); _LPEInfo->set_visible(false); - _LPESelectorEffectRadioList->signal_clicked().connect( - sigc::bind(sigc::mem_fun(*this, &LivePathEffectAdd::viewChanged), 2)); _LPESelectorEffectRadioPackLess->signal_clicked().connect( - sigc::bind(sigc::mem_fun(*this, &LivePathEffectAdd::viewChanged), 1)); - _LPESelectorEffectRadioPackMore->signal_clicked().connect( sigc::bind(sigc::mem_fun(*this, &LivePathEffectAdd::viewChanged), 0)); + _LPESelectorEffectRadioPackMore->signal_clicked().connect( + sigc::bind(sigc::mem_fun(*this, &LivePathEffectAdd::viewChanged), 1)); + _LPESelectorEffectRadioList->signal_clicked().connect( + sigc::bind(sigc::mem_fun(*this, &LivePathEffectAdd::viewChanged), 2)); _LPESelectorEffectEventFavShow->signal_enter_notify_event().connect(sigc::bind( sigc::mem_fun(*this, &LivePathEffectAdd::mouseover), GTK_WIDGET(_LPESelectorEffectEventFavShow->gobj()))); _LPESelectorEffectEventFavShow->signal_leave_notify_event().connect(sigc::bind( @@ -247,7 +246,6 @@ LivePathEffectAdd::LivePathEffectAdd() _LPESelectorEffectRadioList->set_active(); viewChanged(2); } - // viewChanged(); } const LivePathEffect::EnumEffectData *LivePathEffectAdd::getActiveData() { @@ -259,36 +257,25 @@ void LivePathEffectAdd::viewChanged(gint mode) Inkscape::Preferences *prefs = Inkscape::Preferences::get(); bool changed = false; if (mode == 2 && !_LPEDialogSelector->get_style_context()->has_class("LPEList")) { - prefs->setInt("/dialogs/livepatheffect/dialogmode", 2); _LPEDialogSelector->get_style_context()->add_class("LPEList"); _LPEDialogSelector->get_style_context()->remove_class("LPEPackLess"); _LPEDialogSelector->get_style_context()->remove_class("LPEPackMore"); - _LPESelectorEffectRadioList->get_style_context()->add_class("active"); - _LPESelectorEffectRadioPackLess->get_style_context()->remove_class("active"); - _LPESelectorEffectRadioPackMore->get_style_context()->remove_class("active"); _LPESelectorFlowBox->set_max_children_per_line(1); changed = true; } else if (mode == 1 && !_LPEDialogSelector->get_style_context()->has_class("LPEPackMore")) { - prefs->setInt("/dialogs/livepatheffect/dialogmode", 1); - _LPESelectorEffectRadioList->get_style_context()->remove_class("active"); - _LPESelectorEffectRadioPackLess->get_style_context()->remove_class("active"); - _LPESelectorEffectRadioPackMore->get_style_context()->add_class("active"); _LPEDialogSelector->get_style_context()->remove_class("LPEList"); _LPEDialogSelector->get_style_context()->remove_class("LPEPackLess"); _LPEDialogSelector->get_style_context()->add_class("LPEPackMore"); _LPESelectorFlowBox->set_max_children_per_line(30); changed = true; } else if (mode == 0 && !_LPEDialogSelector->get_style_context()->has_class("LPEPackLess")) { - prefs->setInt("/dialogs/livepatheffect/dialogmode", 0); - _LPESelectorEffectRadioList->get_style_context()->remove_class("active"); - _LPESelectorEffectRadioPackLess->get_style_context()->add_class("active"); - _LPESelectorEffectRadioPackMore->get_style_context()->remove_class("active"); _LPEDialogSelector->get_style_context()->remove_class("LPEList"); _LPEDialogSelector->get_style_context()->add_class("LPEPackLess"); _LPEDialogSelector->get_style_context()->remove_class("LPEPackMore"); _LPESelectorFlowBox->set_max_children_per_line(30); changed = true; } + prefs->setInt("/dialogs/livepatheffect/dialogmode", mode); if (changed) { _LPESelectorFlowBox->unset_sort_func(); _LPESelectorFlowBox->set_sort_func(sigc::mem_fun(this, &LivePathEffectAdd::on_sort)); -- cgit v1.2.3