From 0189647c738b130e866db2cb96c71eea4169bff9 Mon Sep 17 00:00:00 2001 From: Patrick Storz Date: Wed, 4 Dec 2019 21:42:39 +0100 Subject: [PATCH 1/3] CI/AppVeyor: Push link to latest build artifact of 1.0.x branch --- buildtools/appveyor.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildtools/appveyor.sh b/buildtools/appveyor.sh index e43193f0db..ebf4dfb250 100644 --- a/buildtools/appveyor.sh +++ b/buildtools/appveyor.sh @@ -104,7 +104,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 -- GitLab From 006db97671598bf775087f65e9af147b46f2fc73 Mon Sep 17 00:00:00 2001 From: Patrick Storz Date: Thu, 5 Dec 2019 01:35:25 +0100 Subject: [PATCH 2/3] CI/AppVeyor: Use same ccache across branches and increase size Separate caches didn't really reduce the number of misses and we're not fitting into the 1 GB limit for free accounts anymore with three active branches (3 x 200 MB for x86/x64 each) --- buildtools/appveyor.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/buildtools/appveyor.sh b/buildtools/appveyor.sh index ebf4dfb250..a4bf226a1c 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 -- GitLab From 6b0662f6526502934aab6f8e733ab4f4d3d5b228 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Fri, 6 Dec 2019 10:52:03 +0100 Subject: [PATCH 3/3] Working with Windows10 Theme --- CMakeScripts/InstallMSYS2.cmake | 23 +++++++++ share/themes/Windows-10/README.md | 39 +++++++++++++++ share/themes/Windows-10/index.theme | 11 ++++ share/ui/Windows-10.css | 7 +++ src/inkscape.cpp | 69 ++++++++++++++------------ src/ui/dialog/inkscape-preferences.cpp | 2 +- 6 files changed, 119 insertions(+), 32 deletions(-) create mode 100755 share/themes/Windows-10/README.md create mode 100755 share/themes/Windows-10/index.theme create mode 100644 share/ui/Windows-10.css diff --git a/CMakeScripts/InstallMSYS2.cmake b/CMakeScripts/InstallMSYS2.cmake index a4e5593679..6237a386b0 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/share/themes/Windows-10/README.md b/share/themes/Windows-10/README.md new file mode 100755 index 0000000000..fa974e1313 --- /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 0000000000..6075985bbd --- /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 0000000000..9cd8cbb37d --- /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 599ac24570..11d1b5aa62 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 5a5d114bd9..b39b2a21fc 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)); } -- GitLab