Splash: use red heart icon for development fund
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 10 Jul 2019 10:40:18 +0000 (12:40 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 10 Jul 2019 12:51:30 +0000 (14:51 +0200)
Now that the development fund image will disappear from the splash, this
draws a little more attention to this link.

release/datafiles/blender_icons.svg
release/datafiles/blender_icons16/icon16_fund.dat [new file with mode: 0644]
release/datafiles/blender_icons32/icon32_fund.dat [new file with mode: 0644]
release/scripts/startup/bl_operators/wm.py
release/scripts/startup/bl_ui/space_topbar.py
source/blender/editors/include/UI_icons.h
source/blender/editors/include/UI_resources.h
source/blender/editors/interface/interface_icons.c
source/blender/editors/interface/resources.c

index ecbf6af70e00936b950f731f0d7d2a6cc3c7ca03..3ed2da387acf5d6f96ce286d31eeaf4015e73f90 100644 (file)
         <path style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers stroke fill;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:new" d="m 226.5,-289 a 0.50005,0.50005 0 0 0 -0.5,0.5 v 13 a 0.50005,0.50005 0 0 0 0.5,0.5 h 3 a 0.50005,0.50005 0 0 0 0.5,-0.5 v -13 a 0.50005,0.50005 0 0 0 -0.5,-0.5 z m 0.5,1 h 2 v 12 h -2 z" id="path10532" inkscape:connector-curvature="0"/>
       </g>
     </g>
+    <path
+       inkscape:connector-curvature="0"
+       id="path5001"
+       d="m 408.48148,452.0625 c -1.71014,0.0728 -3.32227,1.4838 -3.32227,3.9375 0,2.05278 1.07076,4.01178 2.38672,5.71289 1.31595,1.70111 2.90024,3.15481 4.03125,4.16016 0.0914,0.0816 0.20954,0.12673 0.33203,0.12695 h 0.5 c 0.12249,-2.2e-4 0.24064,-0.0454 0.33203,-0.12695 1.13101,-1.00535 2.7153,-2.45905 4.03125,-4.16016 1.31596,-1.70111 2.38672,-3.66011 2.38672,-5.71289 0,-2.4537 -1.61213,-3.86473 -3.32227,-3.9375 -1.52139,-0.0647 -3.0532,0.927 -3.67773,2.69727 -0.62453,-1.77027 -2.15634,-2.76201 -3.67773,-2.69727 z"
+       style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;paint-order:fill markers stroke;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       sodipodi:nodetypes="csccccccsccc" />
   </g>
   <g inkscape:groupmode="layer" id="layer2" inkscape:label="EMPTY ICON TRACKING" style="display:none">
     <g id="g16331" style="fill:#ffcc00">
diff --git a/release/datafiles/blender_icons16/icon16_fund.dat b/release/datafiles/blender_icons16/icon16_fund.dat
new file mode 100644 (file)
index 0000000..4e303bf
Binary files /dev/null and b/release/datafiles/blender_icons16/icon16_fund.dat differ
diff --git a/release/datafiles/blender_icons32/icon32_fund.dat b/release/datafiles/blender_icons32/icon32_fund.dat
new file mode 100644 (file)
index 0000000..5243d94
Binary files /dev/null and b/release/datafiles/blender_icons32/icon32_fund.dat differ
index 04a9a83e712728caff30e8d96c14653e736e1c0c..f2b885d0064a10f2131a70fdd1537f5834cdd587 100644 (file)
@@ -1789,7 +1789,7 @@ class WM_MT_splash(Menu):
             "wm.url_open", text="Release Notes", icon='URL',
         ).url = "https://www.blender.org/download/releases/%d-%d/" % bpy.app.version[:2]
         col2.operator(
-            "wm.url_open", text="Development Fund", icon='URL'
+            "wm.url_open", text="Development Fund", icon='FUND'
         ).url = "https://fund.blender.org"
 
         layout.separator()
index cd0ef52e9813e85e1b0bebc736f4e9481470e79d..382e421eecd199f536e779f63d361888342f8384 100644 (file)
@@ -368,7 +368,7 @@ class TOPBAR_MT_app_support(Menu):
         layout = self.layout
 
         layout.operator(
-            "wm.url_open", text="Development Fund", icon='URL',
+            "wm.url_open", text="Development Fund", icon='FUND',
         ).url = "https://fund.blender.org"
 
         layout.separator()
index 3d2052f1fa911db5175d2aca77776b59a82c4522..47cf827ed66246d47964ec6bee9daa48a0791826 100644 (file)
@@ -45,6 +45,9 @@
 #ifndef DEF_ICON_COLOR
 #  define DEF_ICON_COLOR DEF_ICON
 #endif
+#ifndef DEF_ICON_FUND
+#  define DEF_ICON_FUND DEF_ICON
+#endif
 
 /* ICON_ prefix added */
 DEF_ICON_COLOR(NONE)
@@ -289,7 +292,7 @@ DEF_ICON(DECORATE_LIBRARY_OVERRIDE)
 DEF_ICON(DECORATE_UNLOCKED)
 DEF_ICON(DECORATE_LOCKED)
 DEF_ICON(DECORATE_OVERRIDE)
-DEF_ICON_BLANK(111)
+DEF_ICON_FUND(FUND)
 DEF_ICON(TRACKER_DATA)
 DEF_ICON(HEART)
 DEF_ICON(ORPHAN_DATA)
@@ -1033,4 +1036,5 @@ DEF_ICON_COLOR(EVENT_RETURN)
 #undef DEF_ICON_SHADING
 #undef DEF_ICON_VECTOR
 #undef DEF_ICON_COLOR
+#undef DEF_ICON_FUND
 #undef DEF_ICON_BLANK
index db6bb35560db652bcd4efda5fe202e2a1501d6d1..3b080b6df95c96acec9479c9b2bac884e2ed4570 100644 (file)
@@ -272,6 +272,7 @@ typedef enum ThemeColorID {
   TH_ICON_OBJECT_DATA,
   TH_ICON_MODIFIER,
   TH_ICON_SHADING,
+  TH_ICON_FUND,
 
   TH_SCROLL_TEXT,
 
index 59889e74230bb134dbf32c548441c624ef0a1a49..ea5ef94d90da690387986c95af027cbeeca414e5 100644 (file)
@@ -169,6 +169,7 @@ static const IconType icontypes[] = {
 #  define DEF_ICON_OBJECT_DATA(name) {ICON_TYPE_MONO_TEXTURE, TH_ICON_OBJECT_DATA},
 #  define DEF_ICON_MODIFIER(name) {ICON_TYPE_MONO_TEXTURE, TH_ICON_MODIFIER},
 #  define DEF_ICON_SHADING(name) {ICON_TYPE_MONO_TEXTURE, TH_ICON_SHADING},
+#  define DEF_ICON_FUND(name) {ICON_TYPE_MONO_TEXTURE, TH_ICON_FUND},
 #  define DEF_ICON_VECTOR(name) {ICON_TYPE_VECTOR, 0},
 #  define DEF_ICON_COLOR(name) {ICON_TYPE_COLOR_TEXTURE, 0},
 #  define DEF_ICON_BLANK(name) {ICON_TYPE_BLANK, 0},
index e281c6c9e9cfa0a4ca30acfadfbe20d17e58520a..25116934b06c14234998d5b163c64ac18826880d 100644 (file)
@@ -901,6 +901,12 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
         case TH_ICON_SHADING:
           cp = btheme->tui.icon_shading;
           break;
+        case TH_ICON_FUND: {
+          /* Development fund icon color is not part of theme. */
+          static const char red[4] = {204, 48, 72, 255};
+          cp = red;
+          break;
+        }
 
         case TH_SCROLL_TEXT:
           cp = btheme->tui.wcol_scroll.text;
@@ -1377,12 +1383,14 @@ bool UI_GetIconThemeColor4ubv(int colorid, uchar col[4])
   if (colorid == 0) {
     return false;
   }
-
-  /* Only colored icons in outliner and popups, overall UI is intended
-   * to stay monochrome and out of the way except a few places where it
-   * is important to communicate different data types. */
-  if (!((theme_spacetype == SPACE_OUTLINER && theme_regionid == RGN_TYPE_WINDOW) ||
-        (theme_spacetype == SPACE_PROPERTIES && theme_regionid == RGN_TYPE_NAV_BAR))) {
+  else if (colorid == TH_ICON_FUND) {
+    /* Always color development fund icon. */
+  }
+  else if (!((theme_spacetype == SPACE_OUTLINER && theme_regionid == RGN_TYPE_WINDOW) ||
+             (theme_spacetype == SPACE_PROPERTIES && theme_regionid == RGN_TYPE_NAV_BAR))) {
+    /* Only colored icons in outliner and popups, overall UI is intended
+     * to stay monochrome and out of the way except a few places where it
+     * is important to communicate different data types. */
     return false;
   }