Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2009-05-20 18:32:15 +0400
committerTon Roosendaal <ton@blender.org>2009-05-20 18:32:15 +0400
commit8f620ea5f0881eaf3a88516030037371aa397443 (patch)
treeda99ba3e23dc0fca5b02bd93a98d2e98c42194f3 /source/blender/editors/interface/interface_regions.c
parent2e91f1b1555b54784eda5d133d8a3b594d0b8797 (diff)
2.5
- Made Normal (Sphere) button draw with nice AA (check in node editor) - Bugfix in alignment code, collumns were not drawing OK - Picker buttons draw swatches again, and made them work.
Diffstat (limited to 'source/blender/editors/interface/interface_regions.c')
-rw-r--r--source/blender/editors/interface/interface_regions.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 57644e5decc..8474ee17ee0 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -1054,18 +1054,17 @@ static void ui_update_block_buts_hex(uiBlock *block, char *hexcol)
/* callback to copy from/to palette */
static void do_palette_cb(bContext *C, void *bt1, void *col1)
{
+ wmWindow *win= CTX_wm_window(C);
uiBut *but1= (uiBut *)bt1;
float *col= (float *)col1;
float *fp, hsv[3];
fp= (float *)but1->poin;
- /* XXX 2.50 bad access, how to solve?
- *
- if( (get_qual() & LR_CTRLKEY) ) {
+ if(win->eventstate->ctrl) {
VECCOPY(fp, col);
}
- else*/ {
+ else {
VECCOPY(col, fp);
}
@@ -1205,8 +1204,6 @@ void uiBlockPickerButtons(uiBlock *block, float *col, float *hsv, float *old, ch
// palette
- uiBlockSetEmboss(block, UI_EMBOSSP);
-
bt=uiDefButF(block, COL, retval, "", FPICK+DPICK, 0, BPICK,BPICK, old, 0.0, 0.0, -1, 0, "Old color, click to restore");
uiButSetFunc(bt, do_palette_cb, bt, col);
uiDefButF(block, COL, retval, "", FPICK+DPICK, BPICK+DPICK, BPICK,60-BPICK-DPICK, col, 0.0, 0.0, -1, 0, "Active color");
@@ -1221,8 +1218,6 @@ void uiBlockPickerButtons(uiBlock *block, float *col, float *hsv, float *old, ch
}
uiBlockEndAlign(block);
- uiBlockSetEmboss(block, UI_EMBOSS);
-
// buttons
rgb_to_hsv(col[0], col[1], col[2], hsv, hsv+1, hsv+2);
sprintf(hexcol, "%02X%02X%02X", (unsigned int)(col[0]*255.0), (unsigned int)(col[1]*255.0), (unsigned int)(col[2]*255.0));