diff --git a/CMakeLists.txt b/CMakeLists.txt index 2fb79b801b8ef4aec94234ec97140e667cc77af8..5dcbf95ed79eb3226d3191ce7b7539994f75e1d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,6 +123,7 @@ option(WITH_LIBCDR "Compile with support of libcdr for CorelDRAW Diagrams" ON) option(WITH_LIBVISIO "Compile with support of libvisio for Microsoft Visio Diagrams" ON) option(WITH_LIBWPG "Compile with support of libwpg for WordPerfect Graphics" ON) option(WITH_GSPELL "Compile with support of gspell" ON) +option(WITH_GSOURCEVIEW "Compile with support of gsourceview (text syntax coloring)" ON) option(WITH_NLS "Compile with Native Language Support (using gettext)" ON) option(WITH_JEMALLOC "Compile with JEMALLOC support" OFF) option(WITH_ASAN "Compile with Clang's AddressSanitizer (for debugging purposes)" OFF) @@ -282,6 +283,7 @@ message("ENABLE_POPPLER: ${ENABLE_POPPLER}") message("ENABLE_POPPLER_CAIRO: ${ENABLE_POPPLER_CAIRO}") message("WITH_GNU_READLINE: ${WITH_GNU_READLINE}") message("WITH_GSPELL: ${WITH_GSPELL}") +message("WITH_GSOURCEVIEW: ${WITH_GSOURCEVIEW}") message("WITH_IMAGE_MAGICK: ${WITH_IMAGE_MAGICK}") message("WITH_GRAPHICS_MAGICK: ${WITH_GRAPHICS_MAGICK}") message("WITH_LIBCDR: ${WITH_LIBCDR}") diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake index ee4ca22582e3d4a02176ff08a71b4a35728077b3..de815251bf4f45662a067bbef51b14ecf30a3cb8 100644 --- a/CMakeScripts/DefineDependsandFlags.cmake +++ b/CMakeScripts/DefineDependsandFlags.cmake @@ -283,6 +283,18 @@ if(WITH_GSPELL) endif() endif() +if(WITH_GSOURCEVIEW) + pkg_check_modules(GSOURCEVIEW gtksourceview-4) + if("${GSOURCEVIEW_FOUND}") + message(STATUS "Using gtksourceview-4") + list(APPEND INKSCAPE_INCS_SYS ${GSOURCEVIEW_INCLUDE_DIRS}) + sanitize_ldflags_for_libs(GSOURCEVIEW_LDFLAGS) + list(APPEND INKSCAPE_LIBS ${GSOURCEVIEW_LDFLAGS}) + else() + set(WITH_GSOURCEVIEW OFF) + endif() +endif() + find_package(Boost 1.19.0 REQUIRED COMPONENTS filesystem) if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9) diff --git a/CMakeScripts/InstallMSYS2.cmake b/CMakeScripts/InstallMSYS2.cmake index 2d732ac6af8500aa04fc0c3e7298b539494717a4..99d74b26211eddb7ab034082976435617b474d4f 100644 --- a/CMakeScripts/InstallMSYS2.cmake +++ b/CMakeScripts/InstallMSYS2.cmake @@ -59,6 +59,7 @@ if(WIN32) ${MINGW_BIN}/libgspell-1-[0-9]*.dll ${MINGW_BIN}/libgtk-3-[0-9]*.dll ${MINGW_BIN}/libgtkmm-3.0-[0-9]*.dll + ${MINGW_BIN}/libgtksourceview-4-[0-9]*.dll ${MINGW_BIN}/libharfbuzz-[0-9]*.dll ${MINGW_BIN}/libheif.dll ${MINGW_BIN}/libiconv-[0-9]*.dll @@ -200,6 +201,9 @@ if(WIN32) install(DIRECTORY ${MINGW_PATH}/share/glib-2.0/schemas DESTINATION share/glib-2.0) + install(DIRECTORY ${MINGW_PATH}/share/gtksourceview-4 + DESTINATION share) + # fontconfig install(DIRECTORY ${MINGW_PATH}/etc/fonts DESTINATION etc diff --git a/buildtools/msys2installdeps.sh b/buildtools/msys2installdeps.sh index 98dd4c562396c4cd3fffda91f4b2b3a1f237ee46..7d68e3d640bbe5f598d745abc8b1c7f4a8ba0b44 100644 --- a/buildtools/msys2installdeps.sh +++ b/buildtools/msys2installdeps.sh @@ -66,6 +66,7 @@ $ARCH-libwpg \ $ARCH-aspell \ $ARCH-aspell-en \ $ARCH-gspell \ +$ARCH-gtksourceview4 \ $ARCH-graphicsmagick \ $ARCH-libjxl diff --git a/config.h.cmake b/config.h.cmake index 29a5826e4a3514e4d10dab6ac3f6d256dc207a2f..5035015589be963fef1c86e2167f2f06a4b0b5bd 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -71,6 +71,9 @@ /* enable gtk spelling widget and built-in spellchecker */ #cmakedefine WITH_GSPELL 1 +/* enable gtk syntax coloring text view widget */ +#cmakedefine WITH_GSOURCEVIEW 1 + /* Image/Graphics Magick++ support for bitmap effects */ #cmakedefine WITH_MAGICK 1 diff --git a/po/POTFILES.ui.in b/po/POTFILES.ui.in index 493cdb5b4708ad6b4dc05d7122e1bf02da41412a..7eea602a5c2e44ee18c0040e7a9f42d1ed70fb55 100644 --- a/po/POTFILES.ui.in +++ b/po/POTFILES.ui.in @@ -1,3 +1,4 @@ +../share/ui/attribute-edit-component.glade ../share/ui/color-palette.glade ../share/ui/command-palette-operation.glade ../share/ui/completion-box.glade diff --git a/share/icons/hicolor/scalable/actions/rounding.svg b/share/icons/hicolor/scalable/actions/rounding.svg new file mode 100644 index 0000000000000000000000000000000000000000..233d16fa00eeda36555ab48c834c51359dc395ef --- /dev/null +++ b/share/icons/hicolor/scalable/actions/rounding.svg @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + diff --git a/share/icons/hicolor/symbolic/actions/rounding-symbolic.svg b/share/icons/hicolor/symbolic/actions/rounding-symbolic.svg new file mode 100644 index 0000000000000000000000000000000000000000..233d16fa00eeda36555ab48c834c51359dc395ef --- /dev/null +++ b/share/icons/hicolor/symbolic/actions/rounding-symbolic.svg @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + diff --git a/share/icons/multicolor/symbolic/actions/rounding-symbolic.svg b/share/icons/multicolor/symbolic/actions/rounding-symbolic.svg new file mode 100644 index 0000000000000000000000000000000000000000..233d16fa00eeda36555ab48c834c51359dc395ef --- /dev/null +++ b/share/icons/multicolor/symbolic/actions/rounding-symbolic.svg @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + diff --git a/share/ui/CMakeLists.txt b/share/ui/CMakeLists.txt index 4e1843894dab8b7201b159ccf098b5e1ec9afa6d..2a4627b68b7f7dfb9a03b123c6ed0e38d82ed9a0 100644 --- a/share/ui/CMakeLists.txt +++ b/share/ui/CMakeLists.txt @@ -1,6 +1,9 @@ # SPDX-License-Identifier: GPL-2.0-or-later -file(GLOB _FILES "*.xml" "*.rc" "*.css" "*.ui" "*.glade" "*.svg" "*.ini") +file(GLOB _FILES "*.xml" "*.rc" "*.css" "*.ui" "*.glade" "*.svg" "*.ini" "*.lang") install(FILES ${_FILES} DESTINATION ${INKSCAPE_SHARE_INSTALL}/ui) file(GLOB _RESOURCES "resources/*.png" "resources/*.svg") install(FILES ${_RESOURCES} DESTINATION ${INKSCAPE_SHARE_INSTALL}/ui/resources) + +file(GLOB _SYNTAX_THEMES "syntax-themes/*.xml") +install(FILES ${_SYNTAX_THEMES} DESTINATION ${INKSCAPE_SHARE_INSTALL}/ui/syntax-themes) diff --git a/share/ui/attribute-edit-component.glade b/share/ui/attribute-edit-component.glade new file mode 100644 index 0000000000000000000000000000000000000000..e4537d611ad8a522048ba4e2c0de8588418f2cb3 --- /dev/null +++ b/share/ui/attribute-edit-component.glade @@ -0,0 +1,335 @@ + + + + + + + True + False + rounding + + + True + False + vertical + + + True + True + in + + + True + False + False + False + True + True + + + + + + + + True + True + 0 + + + + + True + True + in + + + + + + + True + True + 1 + + + + + True + False + + + 1 + True + False + start + center + True + True + + + + True + True + 0 + + + + + False + True + 2 + end + 2 + + + + + True + False + False + + + True + False + N + True + + + + + True + False + N.N + True + + + + + True + False + N.NN + True + + + + + True + False + N.NNN + True + + + + + True + False + N.NNNN + True + + + + + True + False + N.NNNNN + True + + + + + False + tree-view + bottom + + + True + False + vertical + + + True + True + 3 + 3 + 3 + 4 + True + True + + + + + + + False + True + 0 + + + + + True + False + 5 + 5 + 4 + 6 + + + True + False + 5 + + + True + True + True + Round selected numbers to N digits + image1 + True + + + False + True + 0 + + + + + True + True + False + True + 2 + none + menu1 + + + True + False + + + True + False + N.NNNNN + + + False + True + 0 + + + + + True + False + pan-down-symbolic + + + False + True + 1 + + + + + + + + False + True + 1 + + + + + False + True + 9 + + + + + True + False + Shift+Return to close + center + True + 2 + 0.5 + + + False + True + 0 + + + + + OK + True + True + True + True + + + False + True + end + 1 + + + + + Cancel + True + True + True + True + + + False + True + end + 2 + + + + + + False + True + 1 + + + + + + + + + + + + + + + + + + + + + + diff --git a/share/ui/inline-css.lang b/share/ui/inline-css.lang new file mode 100644 index 0000000000000000000000000000000000000000..29a04df24718c4421ff643fb0e5f4d0a1afc30fd --- /dev/null +++ b/share/ui/inline-css.lang @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/share/ui/style.css b/share/ui/style.css index b19b8078b8ae618e5e898e96826a1629b59f488f..45c04cab7db42b56e824fd4d1159aac80caade2a 100644 --- a/share/ui/style.css +++ b/share/ui/style.css @@ -168,9 +168,8 @@ notebook.blink > header > tabs > tab:checked { color: inherit; } -/* attribute dialog popup size */ -.attrpop textview { - font-size: 13px; +.mono-font { + /* note: monospaced font is set by ThemeContext::adjust_global_font_scale() */ } /* @@ -225,12 +224,12 @@ iconview *:hover { } .menu-category { - font-size: small; + font-size: smaller; font-weight: bold; } .small-heading { - font-size: small; + font-size: smaller; font-weight: bold; opacity: 0.5; } @@ -250,7 +249,7 @@ iconview *:hover { } -/* Selector and XML dialog */ +/* Selector dialog */ #SelectorsAndStyleDialog button { padding: 4px; min-height: 16px; @@ -266,14 +265,12 @@ iconview *:hover { padding-bottom: 0; } -#XMLAndAttributesDialog .radio.image-button, #SelectorsAndStyleDialog .radio.image-button { margin: 0; padding: 0px; border-radius: 2px 0 0 2px; } -#XMLAndAttributesDialog .radio.image-button:last-child, #SelectorsAndStyleDialog .radio.image-button:last-child { border-radius: 0 2px 2px 0; border-left-width: 0; @@ -455,7 +452,7 @@ SPCanvas { #Objects .search { padding: 2px 4px; min-height: 16px; - font-size: small; + font-size: smaller; } #SimpleFilterModifier #InkSpinScale { @@ -595,7 +592,7 @@ scale.tight-slider { /* add .small-marks class to Gtk::Scale to have smaller font used, since markup didn't work there */ scale.small-marks.marks-after { - font-size: small; + font-size: smaller; } /* Square toolbar buttons: request square buttons for all toolbars. */ @@ -617,7 +614,7 @@ button.square-button image { } #StyleSwatch label { - font-size: small; + font-size: smaller; } #DocumentProperties #NotebookPage { @@ -646,7 +643,7 @@ button.square-button image { } .small-font { - font-size: small; + font-size: smaller; } .toolbar-separator { diff --git a/share/ui/svgd.lang b/share/ui/svgd.lang new file mode 100644 index 0000000000000000000000000000000000000000..0c86bd8b660817f4de923ef02b69d7911fdbda07 --- /dev/null +++ b/share/ui/svgd.lang @@ -0,0 +1,229 @@ + + + + +