summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2019-08-03 11:07:58 +0000
committerJabiertxof <jabier.arraiza@marker.es>2019-08-03 11:07:58 +0000
commit5fe87c0055ac3bb28f403475792f984af525c5db (patch)
treed689429ca6639232b61733e1f84e6e019ca52e51 /src
parentAdd custom GTK3 themes inside Inkscape (diff)
downloadinkscape-5fe87c0055ac3bb28f403475792f984af525c5db.tar.gz
inkscape-5fe87c0055ac3bb28f403475792f984af525c5db.zip
Fix coding style
Diffstat (limited to 'src')
-rw-r--r--src/inkscape.cpp14
-rw-r--r--src/ui/dialog/inkscape-preferences.cpp9
2 files changed, 13 insertions, 10 deletions
diff --git a/src/inkscape.cpp b/src/inkscape.cpp
index 71ed178b7..90cf41f05 100644
--- a/src/inkscape.cpp
+++ b/src/inkscape.cpp
@@ -541,7 +541,7 @@ Glib::ustring Application::get_symbolic_colors()
/**
* \brief Add our CSS style sheets
*/
-void Application::add_inkscape_css()
+void Application::add_inkscape_css()
{
using namespace Inkscape::IO::Resource;
auto const screen = Gdk::Screen::get_default();
@@ -565,9 +565,10 @@ void Application::add_inkscape_css()
customcssprovider->load_from_path(style);
} catch (const Gtk::CssProviderError &ex) {
g_critical("CSSProviderError::load_from_path(): failed to load '%s'\n(%s)", style.c_str(),
- ex.what().c_str());
+ ex.what().c_str());
}
- Gtk::StyleContext::add_provider_for_screen(screen, customcssprovider, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ Gtk::StyleContext::add_provider_for_screen(screen, customcssprovider,
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
}
}
Glib::ustring style = get_filename(UIS, "style.css");
@@ -622,8 +623,9 @@ void Application::add_gtk_css()
Glib::ustring gtkthemename = prefs->getString("/theme/gtkTheme");
if (gtkthemename != "") {
if (gtkthemename.find("inkscapecustom::") != -1) {
- //we use adwaita as base of all custom CSS, seems more standar than user default theme than can make unwanted results
- gtkthemename = "Adwaita";
+ // we use adwaita as base of all custom CSS, seems more standar than user default theme than can make
+ // unwanted results
+ gtkthemename = "Adwaita";
}
g_object_set(settings, "gtk-theme-name", gtkthemename.c_str(), NULL);
} else {
@@ -638,7 +640,7 @@ void Application::add_gtk_css()
g_object_get(settings, "gtk-font-name", &gtk_font_name, NULL);
}
add_inkscape_css();
-
+
Glib::ustring css_str = "";
if (!strncmp(gtk_font_name, "Cantarell", 9)) {
auto provider = Gtk::CssProvider::create();
diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp
index 66d8b39ac..02247f02b 100644
--- a/src/ui/dialog/inkscape-preferences.cpp
+++ b/src/ui/dialog/inkscape-preferences.cpp
@@ -779,8 +779,9 @@ void InkscapePreferences::themeChange()
Glib::ustring themename = prefs->getString("/theme/gtkTheme");
Glib::ustring customthemename = prefs->getString("/theme/gtkTheme");
if (customthemename.find("inkscapecustom::") != -1) {
- //we use adwaita as base of all custom CSS, seems more standar than user default theme than can make unwanted results
- themename = "Adwaita";
+ // we use adwaita as base of all custom CSS, seems more standar than user default theme than can make
+ // unwanted results
+ themename = "Adwaita";
}
Glib::ustring themeiconname = prefs->getString("/theme/iconTheme");
GtkSettings *settings = gtk_settings_get_default();
@@ -2616,7 +2617,7 @@ void InkscapePreferences::initPageSystem()
_("Location of the user’s extensions"), true);
_sys_user_themes_dir.init((char const *)IO::Resource::get_path(IO::Resource::USER, IO::Resource::THEMES, ""),
- _("Open themes folder"));
+ _("Open themes folder"));
_page_system.add_line(true, _("User themes: "), _sys_user_themes_dir, "", _("Location of the user’s themes"), true);
_sys_user_icons_dir.init((char const *)IO::Resource::get_path(IO::Resource::USER, IO::Resource::ICONS, ""),
@@ -2632,7 +2633,7 @@ void InkscapePreferences::initPageSystem()
_("Open symbols folder"));
_page_system.add_line(true, _("User symbols: "), _sys_user_symbols_dir, "", _("Location of the user’s symbols"),
true);
-
+
_sys_user_palettes_dir.init((char const *)IO::Resource::get_path(IO::Resource::USER, IO::Resource::PALETTES, ""),
_("Open palettes folder"));
_page_system.add_line(true, _("User palettes: "), _sys_user_palettes_dir, "", _("Location of the user’s palettes"),