Inkscape.org
Beyond the Basics Inkscape 1.0 Theming Guide
  1. #1
    bananakid bananakid @bananakid
    *

    Inkscape 1.0 Theming Guide

    Quick write-up for Windows users who may want to develop or tweak Inkscape themes using GTK and Sass. This may work similarly for Linux and macOS

    Note: Better formatted version at GitHub

    Note: Inkscape installation directory is meant to be C:\Program Files\Inkscape (bin, share and other folders go to this folder)

    1. View C:\Program Files\Inkscape\lib\gtk-3.0\immodules.cache using your web browser
    2. Take note of GTK version in # Created by (...) from gtk+-3.24.14 line (3.24.14 for Inkscape 1.0RC1, 3.24.17 for Inkscape 1.0)
    3. Go to GitHub and download corresponding release of GTK, i.e. GTK 3.24.14 or GTK 3.24.17
    4. Unzip downloaded archive and navigate to %Unzip_Destination_Folder%\gtk-3.24.14\gtk-3.24.14\gtk\theme\Adwaita
    5. Adwaita folder contains sources for compiling Adwaita theme used by Inkscape, copy this folder to your working folder, i.e. %UserProfile%\Documents\%YourThemeProjectFolder%. Adwaita is the default and the most complete GTK 3 theme to date and it's quite common to modify it to get different appearance for OS or application 
    6. Inside your working folder rename _colors.scss, _colors-public.scss, _common.scss, _drawing.scss to colors.scss, colors-public.scss, common.scss, drawing.scss and rename gtk-contained.scss to gtk.scss, gtk-contained-dark.scss to gtk-dark.scss
    7. You may delete all files in your working Adwaita folder except:
      - assets folder
      - colors.scss
      - colors-public.scss
      - common.scss
      - drawing.scss
      - gtk.scss
      - gtk-dark.scss
    8. Download command-line Dart Sass compiler for SCSS files from GitHub (some releases come without Windows-compatible executables, find and download one with -windows-ia32.zip or -windows-x64.zip in file name)
    9. Unzip downloaded archive to C:\Program Files\Dart Sass (make sure file sass.bat and folder src go directly in Dart Sass folder with no sub-folders)
    10. Right-click your Computer in Windows Explorer sidebar > click Properties > click Advanced system settings (on the left) > click Environment Variables > Select Path variable > click Edit > click New > type in C:\Program Files\Dart Sass > click OK in every dialog. This makes sure you will be able to use sass command in Command Prompt with no extra steps
    11. Create destination theme folders for your theme so Inkscape would recognize it at C:\Program Files\Inkscape\share\themes\%YourThemeName%\GTK-3.0\*.* or at %UserProfile%\AppData\Local\Themes\%YourThemeName%\GTK-3.0\*.*
    12. Copy assets folder from your working Adwaita folder to C:\Program Files\Inkscape\share\themes\%YourThemeName%\GTK-3.0\assets (or %UserProfile%\AppData\Local\Themes\%YourThemeName%\GTK-3.0\assets)
    13. Compile SCSS files of Adwaita using Command Prompt command (use right-click on folder > Copy as path to get paths):
      sass "%UserProfile\Documents\%YourThemeProjectFolder%\gtk.scss" "%ProgramFiles%\Inkscape\share\themes\%YourThemeName%\GTK-3.0\gtk.css"
    14. Run Inkscape and select %YourThemeName% in Preferences. It should look exactly as default theme.
    15. Close Inkscape; modify SCSS files in %YourThemeProjectFolder% folder; recompile it using sass command from Command Prompt (press up arrow on keyboard); open Inkscape to see changes.
    16. To test if everything is set up correctly, edit common.scss on line 15 and set theme to be 'compact' (smaller buttons, etc.) — you should notice difference right away.

    Reference: Inkscape Wiki Theming Help

  2. #2
    Xav Xav @Xav👹
    bananakid

    and gayOS

    The information you posted is detailed and very useful - but it's undermined by this childish comment. Assuming it's a reference to MacOS, it's insulting to MacOS users (who may have legitimate reasons for preferring is as an OS, or may have no choice in the matter, such as with a work machine). Even more importantly, it's not acceptable to use the word "gay" as an implied insult on this forum. The Inkscape project is open and inclusive to everyone, regardless of their race, religion, sexuality or any other characteristic. I hope you will continue to contribute, but please consider other users' feelings and sensibilities when you do so.

     

  3. #3
    bananakid bananakid @bananakid

    Sorry for the typo, that's what it's usually called here even at Apple Stores (basically because everyone knows macOS is inferior to other mainstream OS). I'm simply too used to calling it this way just for fun. I have nothing against gay or transgender people, I do have many friends among them. This quick guide is meant for everybody, no matter what skin color, religion, sexual preference or gender they are. Not meant to be offensive.

    P.S. I'm literally writing this using my $4000+ MacBook Pro running Windows 10 via Boot Camp. Seriously.

  4. #4
    Martin Owens Martin Owens @doctormo🌹🧀

    The guide is really great. Thanks bananakid.

    I've fixed the code of conduct violation, I think it's an honest mistake/cultural faux pas. No further action.