Page Menu
Home
Search
Configure Global Search
Log In
Files
F10179
idea169.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Shane Ambler (sambler)
Nov 13 2013, 2:11 PM
Size
1 KB
Subscribers
None
idea169.patch
View Options
Index: source/blender/editors/interface/interface_widgets.c
===================================================================
--- source/blender/editors/interface/interface_widgets.c (revision 32175)
+++ source/blender/editors/interface/interface_widgets.c (working copy)
@@ -2278,6 +2278,9 @@ static void widget_numslider(uiBut *but, uiWidgetColors *wcol, rcti *rect, int s
rect->xmax -= offs*0.75f;
}
+/* I think 3 is sufficient border to indicate keyed status */
+#define SWATCH_KEYED_BORDER 3
+
static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
{
uiWidgetBase wtb;
@@ -2302,6 +2305,19 @@ static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat
ui_get_but_vectorf(but, col);
+ if(state & (UI_BUT_ANIMATED|UI_BUT_ANIMATED_KEY|UI_BUT_DRIVEN|UI_BUT_REDALERT)) {
+ // draw based on state - colour for keyed etc
+ widgetbase_draw(&wtb, wcol);
+
+ // inset to draw swatch colour
+ rect->xmin+= SWATCH_KEYED_BORDER;
+ rect->xmax-= SWATCH_KEYED_BORDER;
+ rect->ymin+= SWATCH_KEYED_BORDER;
+ rect->ymax-= SWATCH_KEYED_BORDER;
+
+ round_box_edges(&wtb, roundboxalign, rect, 5.0f);
+ }
+
if (color_profile)
linearrgb_to_srgb_v3_v3(col, col);
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
49/17/578d434486867e44e0ad293c6a84
Event Timeline
Log In to Comment