diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2013-05-03 14:34:59 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2013-05-03 14:34:59 +0000 |
| commit | 1e2747dc3cfba9132c856d3cc0eb1f6bcd8320ab (patch) | |
| tree | b7bff186fc9fbbccf7ed3a4e7cd5a0f32dc5036d /src | |
| parent | Fix UI after inclusion of gimp style sliders (diff) | |
| parent | Fixed compilation warnings and updated tweak-move and tweak-move-jitter cursors. (diff) | |
| download | inkscape-1e2747dc3cfba9132c856d3cc0eb1f6bcd8320ab.tar.gz inkscape-1e2747dc3cfba9132c856d3cc0eb1f6bcd8320ab.zip | |
Christoffer Holmstedt 2013-04-21 Fixed compilation warnings and updated tweak-move and tweak-move-jitter cursors. Fixes bug #587729.
Fixed bugs:
- https://launchpad.net/bugs/587729
(bzr r12321)
Diffstat (limited to 'src')
| -rw-r--r-- | src/pixmaps/cursor-tweak-less.xpm | 38 | ||||
| -rw-r--r-- | src/pixmaps/cursor-tweak-more.xpm | 38 | ||||
| -rw-r--r-- | src/pixmaps/cursor-tweak-move-in.xpm | 38 | ||||
| -rw-r--r-- | src/pixmaps/cursor-tweak-move-jitter.xpm | 38 | ||||
| -rw-r--r-- | src/pixmaps/cursor-tweak-move-out.xpm | 38 | ||||
| -rw-r--r-- | src/pixmaps/cursor-tweak-move.xpm | 46 | ||||
| -rw-r--r-- | src/pixmaps/cursor-tweak-rotate-clockwise.xpm | 38 | ||||
| -rw-r--r-- | src/pixmaps/cursor-tweak-rotate-counterclockwise.xpm | 38 | ||||
| -rw-r--r-- | src/pixmaps/cursor-tweak-scale-down.xpm | 38 | ||||
| -rw-r--r-- | src/pixmaps/cursor-tweak-scale-up.xpm | 38 | ||||
| -rw-r--r-- | src/tweak-context.cpp | 35 |
11 files changed, 395 insertions, 28 deletions
diff --git a/src/pixmaps/cursor-tweak-less.xpm b/src/pixmaps/cursor-tweak-less.xpm new file mode 100644 index 000000000..6c065ba62 --- /dev/null +++ b/src/pixmaps/cursor-tweak-less.xpm @@ -0,0 +1,38 @@ +/* XPM */ +static char const * cursor_tweak_less_xpm[] = { +"32 32 3 1", +" c None", +". c #FFFFFF", +"+ c #000000", +" ... ", +" .+. ", +" .+. ", +"....+.... ", +".+++ +++. ", +"....+.... ", +" .+. ", +" .+. ", +" ... ", +" .. .. ", +" .+. .+. ", +" .+. .+. ", +" .+. .+. ", +" .+. ...... .+. ", +" .+..++++..+. ", +" .+++ +++. ", +" ..+ . . +.. ", +" .++.+..+.++. ", +" .+ .++. +. ", +" .+ .++. +. ", +" .++.+..+.++. ", +" ..+ . . +.. ", +" .+++ +++. ", +" .+..++++..+. ", +" .+. ...... .+. ", +" .+. .+. ", +" .+. .+. ", +" .+. .+. ", +" .. .. ", +" ", +" ", +" "}; diff --git a/src/pixmaps/cursor-tweak-more.xpm b/src/pixmaps/cursor-tweak-more.xpm new file mode 100644 index 000000000..0e80bb9c5 --- /dev/null +++ b/src/pixmaps/cursor-tweak-more.xpm @@ -0,0 +1,38 @@ +/* XPM */ +static char const * cursor_tweak_more_xpm[] = { +"32 32 3 1", +" c None", +". c #FFFFFF", +"+ c #000000", +" ... ", +" .+. ...... ", +" .+. ..++++.. ", +"....+.... .+++..+++. ", +".+++ +++. ..+.. ..+.. ", +"....+.... .++. .++. ", +" .+. .+. .+. ", +" .+. .+. .+. ", +" ... .++. .++. ", +" ..+.. ..+.. ", +" .+++..+++. ", +" ..++++.. ", +" ... .+ ...... .. ", +" .+. .+. .+. ", +" .+..+. +. .+. .+ ", +" .+.+. .+..+..+. ", +" .++.... .+.+.+. ", +" .+++++. .+++. ", +" ...... .+. ", +" ...... . ", +" ..++++.. ...... ", +" .+++..+++. ..++++.. ", +" ..+.. ..+.. .+++..+++. ", +" .++. .++. ..+.. ..+..", +" .+. .+. .++. .++.", +" .+. .+. .+. .+.", +" .++. .++. .+. .+.", +" ..+.. ..+.. .++. .++.", +" .+++..+++. ..+.. ..+..", +" ..++++.. .+++..+++. ", +" ...... ..++++.. ", +" ...... "}; diff --git a/src/pixmaps/cursor-tweak-move-in.xpm b/src/pixmaps/cursor-tweak-move-in.xpm new file mode 100644 index 000000000..11ee4c3e1 --- /dev/null +++ b/src/pixmaps/cursor-tweak-move-in.xpm @@ -0,0 +1,38 @@ +/* XPM */ +static char const * cursor_tweak_move_in_xpm[] = { +"32 32 3 1", +" c None", +". c #FFFFFF", +"+ c #000000", +" ... ", +" .+. ", +" .+. ", +"....+.... ", +".+++ +++. ", +"....+.... ", +" .+. ", +" .+. ", +" ... ........ ", +" .+++++++ ", +" .+++ ", +" .++++ ", +" .+.+++ ", +" .+..+++ ", +" .+...+++ ", +" .+. ..+++ ", +" .. ..+++ ", +" ..+++ ", +" ..+++ ", +" ..+++ ", +" ..++ ", +" ... ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/src/pixmaps/cursor-tweak-move-jitter.xpm b/src/pixmaps/cursor-tweak-move-jitter.xpm new file mode 100644 index 000000000..1f2b1d26a --- /dev/null +++ b/src/pixmaps/cursor-tweak-move-jitter.xpm @@ -0,0 +1,38 @@ +/* XPM */ +static char const * cursor_tweak_move_jitter_xpm[] = { +"32 32 3 1", +" c None", +". c #FFFFFF", +"+ c #000000", +" ... ", +" .+. + ", +" .+. +++ ", +"....+.... +.+.+ +++++++ ", +".+++ +++. +..+ .+ ....+++ ", +"....+.... . .+ . ++.+ ", +" .+. .+ ++..+ ", +" .+. .+ ++. .+ ", +" ... ++. .+ ", +" ++. .+ ", +" ++ +. .. ", +" .++ ", +" ..++ ", +" ..++ ", +" ..++ ", +" ..++ + ", +" ..++ + ", +" .. ..++ + ", +" .. .++ ..++ + ", +" +. ..++ ..+++ ", +" +. .++ ..++ .+ ", +" +..++ .+++++++. .+ ", +" +.++ ......... .+ ", +" +++ .+ ", +" ++..... + .+ + ", +" +++++++ + .+.+ +. ", +" +. .+++. ", +" +. .+. ", +" .+++++ . ", +" .+... ", +" .+ ", +" .+ "}; diff --git a/src/pixmaps/cursor-tweak-move-out.xpm b/src/pixmaps/cursor-tweak-move-out.xpm new file mode 100644 index 000000000..7d4569dfe --- /dev/null +++ b/src/pixmaps/cursor-tweak-move-out.xpm @@ -0,0 +1,38 @@ +/* XPM */ +static char const * cursor_tweak_move_out_xpm[] = { +"32 32 3 1", +" c None", +". c #FFFFFF", +"+ c #000000", +" ... ", +" .+. ", +" .+. ", +"....+.... ", +".+++ +++. ", +"....+.... ", +" .+. ", +" .+. ", +" ... ", +" ", +" ++ ", +" +++ ", +" .+++ ", +" ..+++ ", +" ..+++ ", +" ..+++ + ", +" ..+++ + ", +" ..+++ + ", +" ..+++ + ", +" ..++++ ", +" ..+++ ", +" .+++++++. ", +" ......... ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/src/pixmaps/cursor-tweak-move.xpm b/src/pixmaps/cursor-tweak-move.xpm index 2bb1391e3..e44028f6c 100644 --- a/src/pixmaps/cursor-tweak-move.xpm +++ b/src/pixmaps/cursor-tweak-move.xpm @@ -7,29 +7,29 @@ static char const * cursor_tweak_move_xpm[] = { " ... ", " .+. ", " .+. ", -"....+.... ", -".+++ +++. ", -"....+.... ", -" .+. ", -" .+. ", -" ... ", -" ... ... ... ... ", -" ..+. ..+. ..+. ..+. ", -" .+++ .+++ .+++ .+++ ", -" ..+. .+++ .+++ ..+ ", -" .... .+++ .+++ .... ", -" ..+. ..+ ..+ ..+. ", -" .+++ ..+. ..+. .+++ ", -" ..+ .+++ .+++ ..+ ", -" .... ..+ ..+ .... ", -" ..+. .... .... ..+. ", -" .+++ ..+. ..+. .+++ ", -" ..+ .+++ .+++ ..+ ", -" ..+ ..+ ", -" ... ... ", -" ..+. ..+. ", -" .+++ .+++ ", -" ..+ ..+ ", +"....+.... +++++++ ", +".+++ +++. ....+++ ", +"....+.... ++.+ ", +" .+. ++..+ ", +" .+. ++. .+ ", +" ... ++. .+ ", +" ++. .+ ", +" ++ +. .. ", +" .++ ", +" ..++ ", +" ..++ ", +" ..++ ", +" ..++ + ", +" ..++ + ", +" .. ..++ + ", +" .. .++ ..++ + ", +" +. ..++ ..+++ ", +" +. .++ ..++ ", +" +..++ .+++++++. ", +" +.++ ......... ", +" +++ ", +" ++..... ", +" +++++++ ", " ", " ", " ", diff --git a/src/pixmaps/cursor-tweak-rotate-clockwise.xpm b/src/pixmaps/cursor-tweak-rotate-clockwise.xpm new file mode 100644 index 000000000..20bad59af --- /dev/null +++ b/src/pixmaps/cursor-tweak-rotate-clockwise.xpm @@ -0,0 +1,38 @@ +/* XPM */ +static char const * cursor_tweak_rotate_clockwise_xpm[] = { +"32 32 3 1", +" c None", +". c #FFFFFF", +"+ c #000000", +" ... ", +" .+. ", +" .+. ", +"....+.... ", +".+++ +++. ", +"....+.... ... ", +" .+. .+. ", +" .+. .+. ", +" ... .+. ", +" .+. ", +" .+. ", +" .+. ", +" .+. ", +" .. .++. ", +" .+. .++.. ", +" .+. .++. ", +" .+. .++. ", +" .+......++. ", +" .+++++++++. ", +" .+........ ", +" .+. ", +" .+. ", +" .+. ", +" .. ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/src/pixmaps/cursor-tweak-rotate-counterclockwise.xpm b/src/pixmaps/cursor-tweak-rotate-counterclockwise.xpm new file mode 100644 index 000000000..c5fcc70e8 --- /dev/null +++ b/src/pixmaps/cursor-tweak-rotate-counterclockwise.xpm @@ -0,0 +1,38 @@ +/* XPM */ +static char const * cursor_tweak_rotate_counterclockwise_xpm[] = { +"32 32 3 1", +" c None", +". c #FFFFFF", +"+ c #000000", +" ... ", +" .+. ", +" .+. ", +"....+.... ", +".+++ +++. . ", +"....+.... .+. ", +" .+. .+++. ", +" .+. .+.+.+. ", +" ... .+..+..+. ", +" .+. .+. .+. ", +" .. .+. .. ", +" .+. ", +" .+. ", +" .++. ", +" .++.. ", +" .++. ", +" .++. ", +" .........++. ", +" .+++++++++. ", +" ........... ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/src/pixmaps/cursor-tweak-scale-down.xpm b/src/pixmaps/cursor-tweak-scale-down.xpm new file mode 100644 index 000000000..cfd804aab --- /dev/null +++ b/src/pixmaps/cursor-tweak-scale-down.xpm @@ -0,0 +1,38 @@ +/* XPM */ +static char const * cursor_tweak_scale_down_xpm[] = { +"32 32 3 1", +" c None", +". c #FFFFFF", +"+ c #000000", +" ... ", +" .+. ", +" .+. .++++++++++++ ", +"....+.... .+. + ", +".+++ +++. .+. + ", +"....+.... .+. + ", +" .+. .+. + ", +" .+. .+. + ", +" ... .+. + ", +" .+. + ", +" .+. + ", +" .+. + ", +" .+..........+ ", +" .++++++++++++ ", +" ............. ", +" ", +" +. ", +" +. ", +" .+ +. ", +" .+ +. ", +" .+ +. ", +" .++. ", +" .+++++ ", +" ..... ", +" .+++++ ", +" .+. + ", +" .+. + ", +" .+...+ ", +" .+++++ ", +" ...... ", +" ", +" "}; diff --git a/src/pixmaps/cursor-tweak-scale-up.xpm b/src/pixmaps/cursor-tweak-scale-up.xpm new file mode 100644 index 000000000..547346f4c --- /dev/null +++ b/src/pixmaps/cursor-tweak-scale-up.xpm @@ -0,0 +1,38 @@ +/* XPM */ +static char const * cursor_tweak_scale_up_xpm[] = { +"32 32 3 1", +" c None", +". c #FFFFFF", +"+ c #000000", +" ... ", +" .+. ", +" .+. .++++++++++++ ", +"....+.... .+. + ", +".+++ +++. .+. + ", +"....+.... .+. + ", +" .+. .+. + ", +" .+. .+. + ", +" ... .+. + ", +" .+. + ", +" .+. + ", +" .+. + ", +" .+..........+ ", +" .++++++++++++ ", +" ............. ", +" ", +" +++++ ", +" ++ ", +" +.+ ", +" +..+ ", +" +. .+ ", +" +. . ", +" +. ", +" ", +" .+++++ ", +" .+. + ", +" .+. + ", +" .+...+ ", +" .+++++ ", +" ...... ", +" ", +" "}; diff --git a/src/tweak-context.cpp b/src/tweak-context.cpp index 694c497e3..58b6f2b54 100644 --- a/src/tweak-context.cpp +++ b/src/tweak-context.cpp @@ -32,6 +32,15 @@ #include "desktop-style.h" #include "message-context.h" #include "pixmaps/cursor-tweak-move.xpm" +#include "pixmaps/cursor-tweak-move-in.xpm" +#include "pixmaps/cursor-tweak-move-out.xpm" +#include "pixmaps/cursor-tweak-move-jitter.xpm" +#include "pixmaps/cursor-tweak-scale-up.xpm" +#include "pixmaps/cursor-tweak-scale-down.xpm" +#include "pixmaps/cursor-tweak-rotate-clockwise.xpm" +#include "pixmaps/cursor-tweak-rotate-counterclockwise.xpm" +#include "pixmaps/cursor-tweak-more.xpm" +#include "pixmaps/cursor-tweak-less.xpm" #include "pixmaps/cursor-thin.xpm" #include "pixmaps/cursor-thicken.xpm" #include "pixmaps/cursor-attract.xpm" @@ -189,23 +198,39 @@ sp_tweak_update_cursor (SPTweakContext *tc, bool with_shift) break; case TWEAK_MODE_MOVE_IN_OUT: tc->_message_context->setF(Inkscape::NORMAL_MESSAGE, _("%s. Drag or click to <b>move in</b>; with Shift to <b>move out</b>."), sel_message); - event_context->cursor_shape = cursor_tweak_move_xpm; + if (with_shift) { + event_context->cursor_shape = cursor_tweak_move_out_xpm; + } else { + event_context->cursor_shape = cursor_tweak_move_in_xpm; + } break; case TWEAK_MODE_MOVE_JITTER: tc->_message_context->setF(Inkscape::NORMAL_MESSAGE, _("%s. Drag or click to <b>move randomly</b>."), sel_message); - event_context->cursor_shape = cursor_tweak_move_xpm; + event_context->cursor_shape = cursor_tweak_move_jitter_xpm; break; case TWEAK_MODE_SCALE: tc->_message_context->setF(Inkscape::NORMAL_MESSAGE, _("%s. Drag or click to <b>scale down</b>; with Shift to <b>scale up</b>."), sel_message); - event_context->cursor_shape = cursor_tweak_move_xpm; + if (with_shift) { + event_context->cursor_shape = cursor_tweak_scale_up_xpm; + } else { + event_context->cursor_shape = cursor_tweak_scale_down_xpm; + } break; case TWEAK_MODE_ROTATE: tc->_message_context->setF(Inkscape::NORMAL_MESSAGE, _("%s. Drag or click to <b>rotate clockwise</b>; with Shift, <b>counterclockwise</b>."), sel_message); - event_context->cursor_shape = cursor_tweak_move_xpm; + if (with_shift) { + event_context->cursor_shape = cursor_tweak_rotate_counterclockwise_xpm; + } else { + event_context->cursor_shape = cursor_tweak_rotate_clockwise_xpm; + } break; case TWEAK_MODE_MORELESS: tc->_message_context->setF(Inkscape::NORMAL_MESSAGE, _("%s. Drag or click to <b>duplicate</b>; with Shift, <b>delete</b>."), sel_message); - event_context->cursor_shape = cursor_tweak_move_xpm; + if (with_shift) { + event_context->cursor_shape = cursor_tweak_less_xpm; + } else { + event_context->cursor_shape = cursor_tweak_more_xpm; + } break; case TWEAK_MODE_PUSH: tc->_message_context->setF(Inkscape::NORMAL_MESSAGE, _("%s. Drag to <b>push paths</b>."), sel_message); |
