summaryrefslogtreecommitdiffstats
path: root/src/seltrans.cpp
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2013-07-03 16:59:04 +0000
committerMartin Owens <doctormo@gmail.com>2013-07-03 16:59:04 +0000
commit419d9398abf7b8bae74548d5b2bbd8554b36a9b3 (patch)
tree0d2c73472d959a49bb0487f376d715db8fa86f37 /src/seltrans.cpp
parentRefactor resize, rotate, skew handle code (diff)
downloadinkscape-419d9398abf7b8bae74548d5b2bbd8554b36a9b3.tar.gz
inkscape-419d9398abf7b8bae74548d5b2bbd8554b36a9b3.zip
Make handle colour a configurable property.
(bzr r12401)
Diffstat (limited to 'src/seltrans.cpp')
-rw-r--r--src/seltrans.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/seltrans.cpp b/src/seltrans.cpp
index 016eba816..33bfe3e4a 100644
--- a/src/seltrans.cpp
+++ b/src/seltrans.cpp
@@ -635,23 +635,18 @@ void Inkscape::SelTrans::_showHandles(SPSelTransType type)
void Inkscape::SelTrans::_makeHandles()
{
for (int i = 0; i < NUMHANDS; i++) {
- knots[i] = sp_knot_new(_desktop, handtypes[hands[i].type].tip);
+ SPSelTransTypeInfo info = handtypes[hands[i].type];
+ knots[i] = sp_knot_new(_desktop, info.tip);
knots[i]->setShape(SP_CTRL_SHAPE_BITMAP);
knots[i]->setSize(13);
knots[i]->setAnchor(hands[i].anchor);
knots[i]->setMode(SP_CTRL_MODE_XOR);
- knots[i]->setFill(0x000000ff, 0x00ff6600, 0x00ff6600); // invert+2*green
- knots[i]->setStroke(0x000000ff, 0x000000ff, 0x000000ff); // 3*invert
+ knots[i]->setFill(info.color[0], info.color[1], info.color[2]);
+ knots[i]->setStroke(info.color[3], info.color[4], info.color[5]);
knots[i]->setPixbuf(handles[hands[i].control]);
sp_knot_update_ctrl(knots[i]);
- if( hands[i].type == HANDLE_CENTER ) {
- _center_handle = i;
- knots[i]->setFill(0x00000000, 0x00000000, 0x00000000);
- knots[i]->setStroke(0x000000ff, 0xff0000b0, 0xff0000b0);
- }
-
g_signal_connect(G_OBJECT(knots[i]), "request",
G_CALLBACK(sp_sel_trans_handle_request), (gpointer) &hands[i]);
g_signal_connect(G_OBJECT(knots[i]), "moved",