diff --git a/CMakeScripts/InstallMSYS2.cmake b/CMakeScripts/InstallMSYS2.cmake index a4e55936796bae59084b4316da7878e3d0a4e237..6237a386b02b755d2f8975531b0a734acce08562 100644 --- a/CMakeScripts/InstallMSYS2.cmake +++ b/CMakeScripts/InstallMSYS2.cmake @@ -144,8 +144,31 @@ if(WIN32) install(DIRECTORY ${MINGW_PATH}/share/icons/Adwaita DESTINATION share/icons) + install(CODE "execute_process(COMMAND gtk-update-icon-cache \${CMAKE_INSTALL_PREFIX}/share/icons/Adwaita)") + # Get the Windows 10 theme + find_package(Git) + if(GIT_FOUND) + message("git found: ${GIT_EXECUTABLE}") + execute_process(COMMAND ${GIT_EXECUTABLE} clone https://github.com/B00merang-Project/Windows-10 Windows-10-master + WORKING_DIRECTORY share/themes/ + TIMEOUT 300 + OUTPUT_VARIABLE out + ERROR_VARIABLE err) + install(FILES share/themes/Windows-10-master/LICENSE.md + DESTINATION share/themes/Windows-10) + install(FILES share/themes/Windows-10-master/CREDITS + DESTINATION share/themes/Windows-10) + install(DIRECTORY share/themes/Windows-10-master/gtk-3.20 + DESTINATION share/themes/Windows-10) + execute_process(COMMAND rmdir /q /s Windows-10-master + WORKING_DIRECTORY share/themes/ + ) + message( "OUTPUT: ${out}" ) + message( "ERROR: ${err}" ) + endif() + # translations for libraries (we usually shouldn't need many) file(GLOB inkscape_translations RELATIVE ${CMAKE_SOURCE_DIR}/po/ ${CMAKE_SOURCE_DIR}/po/*.po) foreach(translation ${inkscape_translations}) diff --git a/buildtools/appveyor.sh b/buildtools/appveyor.sh index e43193f0db8cf782c2b43ad05063edf3033f7dd5..a4bf226a1c26988eb271a698c891b3d62e9a3598 100644 --- a/buildtools/appveyor.sh +++ b/buildtools/appveyor.sh @@ -40,7 +40,11 @@ wget -nv https://github.com/dejavu-fonts/dejavu-fonts/releases/download/version_ message "--- Installing dependencies" source ../buildtools/msys2installdeps.sh pacman -S $MINGW_PACKAGE_PREFIX-{ccache,gtest,ntldd-git} $PACMAN_OPTIONS +<<<<<<< HEAD +======= + +>>>>>>> CI/AppVeyor: Use same ccache across branches and increase size export CCACHE_DIR=$(cygpath -a ccache) ccache --max-size=500M ccache --set-config=sloppiness=include_file_ctime,include_file_mtime @@ -104,7 +108,7 @@ HTMLNAME=latest_${BRANCH}_x${MSYSTEM#MINGW}.html sed -e "s#\${FILENAME}#${FILENAME}#" -e "s#\${URL}#${URL}#" -e "s#\${BRANCH}#${BRANCH}#" ../buildtools/appveyor_redirect_template.html > $HTMLNAME # upload redirect to http://alpha.inkscape.org/snapshots/ if [ "${APPVEYOR_REPO_NAME}" == "inkscape/inkscape" ] && [ -n "${SSH_KEY}" ]; then - if [ "$BRANCH" == "master" ] || [ "$BRANCH" == "0.92.x" ]; then + if [ "$BRANCH" == "1.0.x" ]; then echo -e "-----BEGIN RSA PRIVATE KEY-----\n${SSH_KEY}\n-----END RSA PRIVATE KEY-----" > ssh_key scp -oStrictHostKeyChecking=no -i ssh_key $HTMLNAME appveyor-ci@alpha.inkscape.org:/var/www/alpha.inkscape.org/public_html/snapshots/ rm -f ssh_key diff --git a/share/themes/Windows-10/README.md b/share/themes/Windows-10/README.md new file mode 100755 index 0000000000000000000000000000000000000000..fa974e131376288189c0651486222f315e6cbf45 --- /dev/null +++ b/share/themes/Windows-10/README.md @@ -0,0 +1,39 @@ +[![built-with-azurra-framework](https://github.com/Elbullazul/Azurra_framework/raw/assets/azurra_framework_smaller.png)](https://github.com/Elbullazul/Azurra_framework) + +# Windows 10 Theme for Linux + +GTK theme based on the appearance of Win32 apps on the Windows 10 platform using the default color scheme + +![Windows-10](http://b00merang.weebly.com/uploads/1/6/8/1/16813022/screenshot-2016-11-01-10-35-43_orig.png) + +### [Dark available theme here](https://github.com/B00merang-Project/Windows-10-Dark) ### + +**Maintainer :** [Elbullazul](https://github.com/Elbullazul) - since September of 2015 + +**Distributor :** [B00merang Theming](https://github.com/B00merang-Project) + +**License :** GPL v3 + +**More info :** http://b00merang.weebly.com/windows-10.html + +For the moment, this theme works with the following Desktop environments : +- Cinnamon 3.x and 4.x (beta) +- GNOME-SHELL 3.14 and higher +- XFCE 4.x +- MATE 1.8 and higher +- LXDE 0.8/0.10 and higher +- Unity 7.x +- Openbox 3 + +### Manual installation + +Extract the zip file to the themes directory i.e. `/home/USERNAME/.themes` + +### Requirements + +- GTK+ 3.6 or above +- Murrine and Pixmap theme engines + +### Contribute + +Contact us @ http://b00merang.weebly.com/contact.html diff --git a/share/themes/Windows-10/index.theme b/share/themes/Windows-10/index.theme new file mode 100755 index 0000000000000000000000000000000000000000..6075985bbdbcd4376706a794324a0d4b2c5c7b4b --- /dev/null +++ b/share/themes/Windows-10/index.theme @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=X-GNOME-Metatheme +Name=Windows-10 +Comment=Windows 10 Light +Comment=Author : Christian Medel (Elbullazul); Adapted for Inkscape by Adam Bellis and Jabiertxof see /inkscape/share/ui/Windows10.css for complementary file +Version=v2.0 +Encoding=UTF-8 + +[X-GNOME-Metatheme] +GtkTheme=Windows-10 +ButtonLayout=menu:minimize,maximize,close diff --git a/share/ui/Windows-10.css b/share/ui/Windows-10.css new file mode 100644 index 0000000000000000000000000000000000000000..9cd8cbb37d2aa2de8debabf98f26539e6df11324 --- /dev/null +++ b/share/ui/Windows-10.css @@ -0,0 +1,7 @@ +/* WINDOWS 10 THEME SPECIFIC STYLE */ + + +/* + * Keep as small as possible + */ + diff --git a/src/inkscape.cpp b/src/inkscape.cpp index 599ac245703fafccf581fd9f791dc09326bd4927..11d1b5aa62c0ab604a50002378fcf40373231d4f 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -418,6 +418,44 @@ Application::Application(bool use_gui) : /* Load the preferences and menus */ load_menus(); Inkscape::DeviceManager::getManager().loadConfig(); + gchar *gtkIconThemeName = nullptr; + Glib::ustring themeiconname; + gboolean gtkApplicationPreferDarkTheme; + gchar *gtkThemeName = nullptr; + GtkSettings *settings = gtk_settings_get_default(); + if (settings) { + g_object_get(settings, "gtk-icon-theme-name", >kIconThemeName, NULL); + g_object_get(settings, "gtk-application-prefer-dark-theme", >kApplicationPreferDarkTheme, NULL); + g_object_set(settings, "gtk-application-prefer-dark-theme", + prefs->getBool("/theme/preferDarkTheme", gtkApplicationPreferDarkTheme), NULL); + g_object_get(settings, "gtk-theme-name", >kThemeName, NULL); + prefs->setString("/theme/defaultTheme", Glib::ustring(gtkThemeName)); + Glib::ustring gtkthemename = prefs->getString("/theme/gtkTheme"); + if (gtkthemename != "") { + g_object_set(settings, "gtk-theme-name", gtkthemename.c_str(), NULL); + } else { +#ifdef _WIN32 + prefs->setString("/theme/defaultTheme", Glib::ustring("Windows-10")); + prefs->setString("/theme/gtkTheme", Glib::ustring("Windows-10")); +#else +#ifdef GDK_WINDOWING_QUARTZ + //want a OSX bundled? + prefs->setString("/theme/gtkTheme", Glib::ustring(gtkThemeName)); +#else + prefs->setString("/theme/gtkTheme", Glib::ustring(gtkThemeName)); +#endif +#endif + } + prefs->setString("/theme/defaultIconTheme", Glib::ustring(gtkIconThemeName)); + themeiconname = prefs->getString("/theme/iconTheme"); + if (themeiconname != "") { + g_object_set(settings, "gtk-icon-theme-name", themeiconname.c_str(), NULL); + } else { + prefs->setString("/theme/iconTheme", Glib::ustring(gtkIconThemeName)); + } + } + g_free(gtkThemeName); + g_free(gtkIconThemeName); } Inkscape::ResourceManager::getManager(); @@ -558,37 +596,6 @@ void Application::add_gtk_css() // Add style sheet (GTK3) auto const screen = Gdk::Screen::get_default(); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - gchar *gtkThemeName = nullptr; - gchar *gtkIconThemeName = nullptr; - Glib::ustring themeiconname; - gboolean gtkApplicationPreferDarkTheme; - GtkSettings *settings = gtk_settings_get_default(); - if (settings) { - g_object_get(settings, "gtk-icon-theme-name", >kIconThemeName, NULL); - g_object_get(settings, "gtk-theme-name", >kThemeName, NULL); - g_object_get(settings, "gtk-application-prefer-dark-theme", >kApplicationPreferDarkTheme, NULL); - g_object_set(settings, "gtk-application-prefer-dark-theme", - prefs->getBool("/theme/preferDarkTheme", gtkApplicationPreferDarkTheme), NULL); - prefs->setString("/theme/defaultTheme", Glib::ustring(gtkThemeName)); - prefs->setString("/theme/defaultIconTheme", Glib::ustring(gtkIconThemeName)); - Glib::ustring gtkthemename = prefs->getString("/theme/gtkTheme"); - if (gtkthemename != "") { - g_object_set(settings, "gtk-theme-name", gtkthemename.c_str(), NULL); - } else { - prefs->setString("/theme/gtkTheme", Glib::ustring(gtkThemeName)); - } - themeiconname = prefs->getString("/theme/iconTheme"); - if (themeiconname != "") { - g_object_set(settings, "gtk-icon-theme-name", themeiconname.c_str(), NULL); - } else { - prefs->setString("/theme/iconTheme", Glib::ustring(gtkIconThemeName)); - } - - } - - g_free(gtkThemeName); - g_free(gtkIconThemeName); - Glib::ustring style = get_filename(UIS, "style.css"); if (!style.empty()) { auto provider = Gtk::CssProvider::create(); diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index 5a5d114bd9fb4bb981fea84c1b1157f9009beb15..b39b2a21fc4db4e104d104622d11e4e90f6c126d 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -1103,7 +1103,7 @@ void InkscapePreferences::initPageUI() g_list_free(list); g_hash_table_destroy(t); - _gtk_theme.init("/theme/gtkTheme", labels, values, "Adwaita"); + _gtk_theme.init("/theme/gtkTheme", labels, values, prefs->getString("/theme/defaultTheme")); _page_theme.add_line(false, _("Change Gtk theme:"), _gtk_theme, "", "", false); _gtk_theme.signal_changed().connect(sigc::mem_fun(*this, &InkscapePreferences::themeChange)); }