GiD - The personal pre and post processor

Creating new themes

Create themes are only for modules that distribute they own package including GiD, or for GiD developers.


If you have created a theme for GiD and want that the theme will be distributed with GiD, just contact us at: gid@cimne.upc.edu


An example of a customized theme is GiD classic renewed, which can be found in GiD's Data --> Problem type --> Internet retrieve:

After downloading it, go to the Preferences window, select Graphical --> Appearance in the left tree and select the GiD classic renewed under GiD theme. GiD will ask you to restart the program for the changes to take effect.
Look of the GiD classic renewed theme:

This theme is a work in progress and new version will be released with new icons.


For creating a new theme you must know.


Inside (GiD_Folder)/themes:
Each folder represent a theme (Example (GiD_Folder)/themes/GiD_black)
Inside each folder must be a configuration.xml
This file must contain the following information:

<GID_THEME name="GiD_black">
  <info>   theme name is the same as its folder name
             images folder is always "GiD/themes/(name of theme)/images/"
             cursors folder is always "GiD/themes/(name of theme)/cursors/"
	if it does not find a folder it will use the alternative definition
	size folder start inside "images" theme folder
             alternative folder start from "GiD/themes/" folder
  </info>
  <label>GiD Black</label>
  <version>1.1</version>
  <alternative_theme>GiD_classic</alternative_theme>

  <SizeDefinitions>
    <SizeDefinition name='small_size'>
      <label>small size</label>
      <folder>size16</folder>
      <alternative_folder>GiD_classic/images/small_size(16andmore)</alternative_folder>
    </SizeDefinition>

    <SizeDefinition name='large_size'>
      <label>large size</label>
      <folder>size20</folder>
      <alternative_folder>GiD_classic/images/large_size(24andmore)</alternative_folder>      
    </SizeDefinition>
  </SizeDefinitions>

  <IconCategories>
    <IconCategory name='menu'>size16</IconCategory>
    <IconCategory name='toolbar'>size20</IconCategory>
    <IconCategory name='small_icons'>size16</IconCategory>
    <IconCategory name='large_icons'>size20</IconCategory>
  </IconCategories>

  <OnlyDefineColorsOnMainGiDFrame>false</OnlyDefineColorsOnMainGiDFrame>
  <TtkTheme>newgid</TtkTheme>
  <TkFromTheme>true</TkFromTheme>

  <BackgroundColor> 000#000#000 </BackgroundColor>
  <BackColorType> 1 </BackColorType>             
  <BackColorTop> #000000 </BackColorTop>               
  <BackColorBottom> #323c4b </BackColorBottom>               
  <BackColorSense> d </BackColorSense>
  <ColorPoints> 220#220#220 </ColorPoints>
  <ColorNodes> 220#220#220 </ColorNodes>

  <ColorLines> 091#094#225 </ColorLines>           
  <ColorPolyLines> 000#143#039 </ColorPolyLines>           
  <ColorSurfaces> 218#036#220 </ColorSurfaces>          
  <ColorSurfsIsoparametric> 220#218#036 </ColorSurfsIsoparametric>
  <ColorVolumes> 086#217#216 </ColorVolumes>
  <ColorElements> 153#153#153 </ColorElements>
</GID_THEME>


This file configure colors of entities and background, also which images to display and where to find images, but for total different look of GiD, you must understand this 3 lines:


<OnlyDefineColorsOnMainGiDFrame>false</OnlyDefineColorsOnMainGiDFrame>
<TtkTheme>newgid</TtkTheme>
<TkFromTheme>true</TkFromTheme>


If option OnlyDefineColorsOnMainGiDFrame is true, only GiD's main frame will be modified with the visual aspects, windows and other elements will remain in native look (as GiD_classic does)


The second option associate a ttk theme in this case is <TtkTheme>newgid</TtkTheme>, the configuration of ttk themes can be found on: (GiD_Folder)\scripts\gid_themes\ttk_themes\ by changing the ttk configuration, we can achieve any look of GiD.


The last option TkFromTheme its important to obtain a complet integrated look, tk colors will be adapted with ttk colors, we recomment oposite value of OnlyDefineColorsOnMainGiDFrame (true=> false, false=>true)

COPYRIGHT © 2022 · GID · CIMNE