diff options
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/dialog/dialog-manager.cpp | 1 | ||||
| -rw-r--r-- | src/ui/dialog/inkscape-preferences.cpp | 52 | ||||
| -rw-r--r-- | src/ui/dialog/inkscape-preferences.h | 2 | ||||
| -rw-r--r-- | src/ui/icon-loader.cpp | 2 |
4 files changed, 27 insertions, 30 deletions
diff --git a/src/ui/dialog/dialog-manager.cpp b/src/ui/dialog/dialog-manager.cpp index 5bb0575c0..66a682de6 100644 --- a/src/ui/dialog/dialog-manager.cpp +++ b/src/ui/dialog/dialog-manager.cpp @@ -34,7 +34,6 @@ #include "ui/dialog/prototype.h" #include "ui/dialog/symbols.h" #include "ui/dialog/tile.h" -#include "style.h" #if HAVE_POTRACE # include "ui/dialog/tracedialog.h" diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index f711db03e..826ecd316 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -632,34 +632,25 @@ void InkscapePreferences::symbolicThemeCheck() void InkscapePreferences::symbolicChangeCustom() { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - if (!prefs->getBool("/theme/symbolicIconsDefaultColor", true)) - { - Gdk::RGBA normal_color =_symbolic_color.get_style_context()->get_color(); - Gdk::RGBA success_color =_symbolic_success_color.get_style_context()->get_color(); - Gdk::RGBA warning_color =_symbolic_warning_color.get_style_context()->get_color(); - Gdk::RGBA error_color =_symbolic_error_color.get_style_context()->get_color(); - SPColor normal_color_sp(normal_color.get_red(), - normal_color.get_green(), - normal_color.get_blue()); + if (!prefs->getBool("/theme/symbolicIconsDefaultColor", true)) { + Gdk::RGBA normal_color = _symbolic_color.get_style_context()->get_color(); + Gdk::RGBA success_color = _symbolic_success_color.get_style_context()->get_color(); + Gdk::RGBA warning_color = _symbolic_warning_color.get_style_context()->get_color(); + Gdk::RGBA error_color = _symbolic_error_color.get_style_context()->get_color(); + SPColor normal_color_sp(normal_color.get_red(), normal_color.get_green(), normal_color.get_blue()); _symbolic_color.setRgba32(normal_color_sp.toRGBA32(normal_color.get_alpha())); - SPColor success_color_sp(success_color.get_red(), - success_color.get_green(), - success_color.get_blue()); + SPColor success_color_sp(success_color.get_red(), success_color.get_green(), success_color.get_blue()); _symbolic_success_color.setRgba32(success_color_sp.toRGBA32(success_color.get_alpha())); - SPColor warning_color_sp(warning_color.get_red(), - warning_color.get_green(), - warning_color.get_blue()); + SPColor warning_color_sp(warning_color.get_red(), warning_color.get_green(), warning_color.get_blue()); _symbolic_warning_color.setRgba32(warning_color_sp.toRGBA32(warning_color.get_alpha())); - SPColor error_color_sp(error_color.get_red(), - error_color.get_green(), - error_color.get_blue()); + SPColor error_color_sp(error_color.get_red(), error_color.get_green(), error_color.get_blue()); _symbolic_error_color.setRgba32(error_color_sp.toRGBA32(error_color.get_alpha())); _symbolic_color.setSensitive(false); _symbolic_success_color.setSensitive(false); _symbolic_warning_color.setSensitive(false); _symbolic_error_color.setSensitive(false); symbolicDefaultColor(); - } else if (prefs->getBool("/theme/symbolicIcons", true)){ + } else if (prefs->getBool("/theme/symbolicIcons", true)) { _symbolic_color.setSensitive(true); _symbolic_success_color.setSensitive(true); _symbolic_warning_color.setSensitive(true); @@ -689,10 +680,11 @@ void InkscapePreferences::symbolicDefaultColor() Gtk::StyleContext::remove_provider_for_screen(screen, INKSCAPE.colorizeprovider); } } -void InkscapePreferences::symbolicCustomColorsReset() { +void InkscapePreferences::symbolicCustomColorsReset() +{ Inkscape::Preferences *prefs = Inkscape::Preferences::get(); Glib::ustring themeiconname = prefs->getString("/theme/iconTheme"); - prefs->setInt("/theme/" + themeiconname + "/symbolicSuccessColor",0); + prefs->setInt("/theme/" + themeiconname + "/symbolicSuccessColor", 0); prefs->setInt("/theme/" + themeiconname + "/symbolicErrorColor", 0); prefs->setInt("/theme/" + themeiconname + "/symbolicWaringColor", 0); symbolicCustomColors(); @@ -1018,9 +1010,12 @@ void InkscapePreferences::initPageUI() _symbolic_colors.signal_clicked().connect(sigc::mem_fun(*this, &InkscapePreferences::symbolicChangeCustom)); _page_theme.add_line(true, "", _symbolic_colors, "", "", true); _symbolic_color.init(_("Color for symbolic icons:"), "/theme/" + themeiconname + "/symbolicColor", 0x2E3436ff); - _symbolic_success_color.init(_("Color for symbolic success icons:"), "/theme/" + themeiconname + "/symbolicSuccessColor", 0x4AD589ff); - _symbolic_warning_color.init(_("Color for symbolic warning icons:"), "/theme/" + themeiconname + "/symbolicWarningColor", 0xF57900ff); - _symbolic_error_color.init(_("Color for symbolic error icons:"), "/theme/" + themeiconname + "/symbolicErrorColor", 0xcc0000ff); + _symbolic_success_color.init(_("Color for symbolic success icons:"), + "/theme/" + themeiconname + "/symbolicSuccessColor", 0x4AD589ff); + _symbolic_warning_color.init(_("Color for symbolic warning icons:"), + "/theme/" + themeiconname + "/symbolicWarningColor", 0xF57900ff); + _symbolic_error_color.init(_("Color for symbolic error icons:"), "/theme/" + themeiconname + "/symbolicErrorColor", + 0xcc0000ff); _symbolic_color.get_style_context()->add_class("system_normal_color"); _symbolic_success_color.get_style_context()->add_class("system_success_color"); _symbolic_warning_color.get_style_context()->add_class("system_warning_color"); @@ -1038,16 +1033,19 @@ void InkscapePreferences::initPageUI() } Gtk::Box *icon_buttons = Gtk::manage(new Gtk::Box()); icon_buttons->pack_start(_symbolic_color, true, true, 4); - _page_theme.add_line(false,_("Change icon color:"), *icon_buttons, "", _("Color for symbolic icons. Some icons changes need reload"), false); + _page_theme.add_line(false, _("Change icon color:"), *icon_buttons, "", + _("Color for symbolic icons. Some icons changes need reload"), false); Gtk::Box *icon_buttons_hight = Gtk::manage(new Gtk::Box()); icon_buttons_hight->pack_start(_symbolic_success_color, true, true, 4); icon_buttons_hight->pack_start(_symbolic_warning_color, true, true, 4); icon_buttons_hight->pack_start(_symbolic_error_color, true, true, 4); - _page_theme.add_line(false,_("Change icon highlights:"), *icon_buttons_hight, "", _("HSet the predefined colors fro the creator of icon set"), false); + _page_theme.add_line(false, _("Change icon highlights:"), *icon_buttons_hight, "", + _("HSet the predefined colors fro the creator of icon set"), false); Gtk::Button *theme_decide_color = Gtk::manage(new Gtk::Button(_("Theme defaults"))); theme_decide_color->set_tooltip_text(_("Defaul colors from theme)")); theme_decide_color->signal_clicked().connect(sigc::mem_fun(*this, &InkscapePreferences::symbolicCustomColorsReset)); - _page_theme.add_line(false,_("Defaul colors:"), *icon_buttons_hight, "", _("Set the predefined colors fro the creator of icon set"), false); + _page_theme.add_line(false, _("Defaul colors:"), *icon_buttons_hight, "", + _("Set the predefined colors fro the creator of icon set"), false); symbolicChangeCustom(); { Glib::ustring sizeLabels[] = { C_("Icon size", "Larger"), C_("Icon size", "Large"), C_("Icon size", "Small"), diff --git a/src/ui/dialog/inkscape-preferences.h b/src/ui/dialog/inkscape-preferences.h index 036d77215..09113dfa7 100644 --- a/src/ui/dialog/inkscape-preferences.h +++ b/src/ui/dialog/inkscape-preferences.h @@ -594,7 +594,7 @@ private: void symbolicDefaultColor(); void symbolicChangeCustom(); void symbolicCustomColorsReset(); - void symbolicChangeColor(guint32 /*color*/){symbolicChangeCustom();} + void symbolicChangeColor(guint32 /*color*/) { symbolicChangeCustom(); } InkscapePreferences(); InkscapePreferences(InkscapePreferences const &d); diff --git a/src/ui/icon-loader.cpp b/src/ui/icon-loader.cpp index f452b1771..fff312d31 100644 --- a/src/ui/icon-loader.cpp +++ b/src/ui/icon-loader.cpp @@ -13,9 +13,9 @@ #include "icon-loader.h" #include "inkscape.h" +#include "io/resource.h" #include "svg/svg-color.h" #include "widgets/toolbox.h" -#include "io/resource.h" #include <fstream> #include <gdkmm/display.h> #include <gdkmm/screen.h> |
