mirror of https://github.com/GNOME/gimp.git
adapt the arrow key velocity to the display scale factor. Please test and
2004-07-07 Sven Neumann <sven@gimp.org> * app/tools/gimpeditselectiontool.c (gimp_edit_selection_tool_key_press): adapt the arrow key velocity to the display scale factor. Please test and complain if you dislike this behaviour. * themes/Default/images/Makefile.am * themes/Default/images/stock-color-pick-from-screen-16.png: new icon drawn by Jimmac. * libgimpwidgets/gimpstock.[ch]: register the new icon. * libgimpwidgets/gimppickbutton.c: use it for the screen color picker instead of reusing the color picker tool icon.
This commit is contained in:
parent
2b46a2536f
commit
9f25f8608b
16
ChangeLog
16
ChangeLog
|
@ -1,3 +1,19 @@
|
|||
2004-07-07 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/tools/gimpeditselectiontool.c
|
||||
(gimp_edit_selection_tool_key_press): adapt the arrow key velocity
|
||||
to the display scale factor. Please test and complain if you
|
||||
dislike this behaviour.
|
||||
|
||||
* themes/Default/images/Makefile.am
|
||||
* themes/Default/images/stock-color-pick-from-screen-16.png: new
|
||||
icon drawn by Jimmac.
|
||||
|
||||
* libgimpwidgets/gimpstock.[ch]: register the new icon.
|
||||
|
||||
* libgimpwidgets/gimppickbutton.c: use it for the screen color
|
||||
picker instead of reusing the color picker tool icon.
|
||||
|
||||
2004-07-06 Bill Skaggs <weskaggs@primate.ucdavis.edu>
|
||||
|
||||
* plug-ins/gfig/*.[ch]: a bunch of code clean-up and
|
||||
|
|
|
@ -976,7 +976,8 @@ process_event_queue_keys (GdkEventKey *kevent,
|
|||
|
||||
va_start (argp, kevent);
|
||||
|
||||
while (n_keys < FILTER_MAX_KEYS && (keys[n_keys] = va_arg (argp, guint)) != 0)
|
||||
while (n_keys < FILTER_MAX_KEYS &&
|
||||
(keys[n_keys] = va_arg (argp, guint)) != 0)
|
||||
{
|
||||
modifiers[n_keys] = va_arg (argp, GdkModifierType);
|
||||
values[n_keys] = va_arg (argp, gint);
|
||||
|
@ -1061,8 +1062,9 @@ gimp_edit_selection_tool_key_press (GimpTool *tool,
|
|||
EditType edit_type = EDIT_MASK_TRANSLATE;
|
||||
GimpUndoType undo_type = GIMP_UNDO_GROUP_MASK;
|
||||
const gchar *undo_desc = NULL;
|
||||
gint velocity;
|
||||
|
||||
/* Bail out early if it is not an arrow key event */
|
||||
/* bail out early if it is not an arrow key event */
|
||||
|
||||
if (kevent->keyval != GDK_Left &&
|
||||
kevent->keyval != GDK_Right &&
|
||||
|
@ -1070,19 +1072,23 @@ gimp_edit_selection_tool_key_press (GimpTool *tool,
|
|||
kevent->keyval != GDK_Down)
|
||||
return FALSE;
|
||||
|
||||
/* adapt arrow velocity to the zoom factor */
|
||||
velocity = ARROW_VELOCITY / GIMP_DISPLAY_SHELL (gdisp->shell)->scale;
|
||||
velocity = MAX (1, velocity);
|
||||
|
||||
/* check for mask translation first because the translate_layer
|
||||
* modifiers match the translate_mask ones...
|
||||
*/
|
||||
inc_x =
|
||||
process_event_queue_keys (kevent,
|
||||
GDK_Left, (GDK_MOD1_MASK | GDK_SHIFT_MASK),
|
||||
-1 * ARROW_VELOCITY,
|
||||
-1 * velocity,
|
||||
|
||||
GDK_Left, GDK_MOD1_MASK,
|
||||
-1,
|
||||
|
||||
GDK_Right, (GDK_MOD1_MASK | GDK_SHIFT_MASK),
|
||||
1 * ARROW_VELOCITY,
|
||||
1 * velocity,
|
||||
|
||||
GDK_Right, GDK_MOD1_MASK,
|
||||
1,
|
||||
|
@ -1092,13 +1098,13 @@ gimp_edit_selection_tool_key_press (GimpTool *tool,
|
|||
inc_y =
|
||||
process_event_queue_keys (kevent,
|
||||
GDK_Up, (GDK_MOD1_MASK | GDK_SHIFT_MASK),
|
||||
-1 * ARROW_VELOCITY,
|
||||
-1 * velocity,
|
||||
|
||||
GDK_Up, GDK_MOD1_MASK,
|
||||
-1,
|
||||
|
||||
GDK_Down, (GDK_MOD1_MASK | GDK_SHIFT_MASK),
|
||||
1 * ARROW_VELOCITY,
|
||||
1 * velocity,
|
||||
|
||||
GDK_Down, GDK_MOD1_MASK,
|
||||
1,
|
||||
|
@ -1116,13 +1122,13 @@ gimp_edit_selection_tool_key_press (GimpTool *tool,
|
|||
{
|
||||
inc_x = process_event_queue_keys (kevent,
|
||||
GDK_Left, (GDK_CONTROL_MASK | GDK_SHIFT_MASK),
|
||||
-1 * ARROW_VELOCITY,
|
||||
-1 * velocity,
|
||||
|
||||
GDK_Left, GDK_CONTROL_MASK,
|
||||
-1,
|
||||
|
||||
GDK_Right, (GDK_CONTROL_MASK | GDK_SHIFT_MASK),
|
||||
1 * ARROW_VELOCITY,
|
||||
1 * velocity,
|
||||
|
||||
GDK_Right, GDK_CONTROL_MASK,
|
||||
1,
|
||||
|
@ -1131,13 +1137,13 @@ gimp_edit_selection_tool_key_press (GimpTool *tool,
|
|||
|
||||
inc_y = process_event_queue_keys (kevent,
|
||||
GDK_Up, (GDK_CONTROL_MASK | GDK_SHIFT_MASK),
|
||||
-1 * ARROW_VELOCITY,
|
||||
-1 * velocity,
|
||||
|
||||
GDK_Up, GDK_CONTROL_MASK,
|
||||
-1,
|
||||
|
||||
GDK_Down, (GDK_CONTROL_MASK | GDK_SHIFT_MASK),
|
||||
1 * ARROW_VELOCITY,
|
||||
1 * velocity,
|
||||
|
||||
GDK_Down, GDK_CONTROL_MASK,
|
||||
1,
|
||||
|
@ -1155,13 +1161,13 @@ gimp_edit_selection_tool_key_press (GimpTool *tool,
|
|||
{
|
||||
inc_x = process_event_queue_keys (kevent,
|
||||
GDK_Left, GDK_SHIFT_MASK,
|
||||
-1 * ARROW_VELOCITY,
|
||||
-1 * velocity,
|
||||
|
||||
GDK_Left, 0,
|
||||
-1,
|
||||
|
||||
GDK_Right, GDK_SHIFT_MASK,
|
||||
1 * ARROW_VELOCITY,
|
||||
1 * velocity,
|
||||
|
||||
GDK_Right, 0,
|
||||
1,
|
||||
|
@ -1170,13 +1176,13 @@ gimp_edit_selection_tool_key_press (GimpTool *tool,
|
|||
|
||||
inc_y = process_event_queue_keys (kevent,
|
||||
GDK_Up, GDK_SHIFT_MASK,
|
||||
-1 * ARROW_VELOCITY,
|
||||
-1 * velocity,
|
||||
|
||||
GDK_Up, 0,
|
||||
-1,
|
||||
|
||||
GDK_Down, GDK_SHIFT_MASK,
|
||||
1 * ARROW_VELOCITY,
|
||||
1 * velocity,
|
||||
|
||||
GDK_Down, 0,
|
||||
1,
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2004-07-07 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimpwidgets/libgimpwidgets-sections.txt
|
||||
* libgimpwidgets/tmpl/gimpstock.sgml: added new icons.
|
||||
|
||||
2004-07-05 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimp/libgimp-docs.sgml: oops, gimpenums.xml used to be there
|
||||
|
|
|
@ -489,6 +489,7 @@ GIMP_STOCK_COLOR_PICKER_BLACK
|
|||
GIMP_STOCK_COLOR_PICKER_GRAY
|
||||
GIMP_STOCK_COLOR_PICKER_WHITE
|
||||
GIMP_STOCK_COLOR_TRIANGLE
|
||||
GIMP_STOCK_COLOR_PICK_FROM_SCREEN
|
||||
GIMP_STOCK_CONVERT_GRAYSCALE
|
||||
GIMP_STOCK_CONVERT_INDEXED
|
||||
GIMP_STOCK_CONVERT_RGB
|
||||
|
@ -550,6 +551,7 @@ GIMP_STOCK_FONT
|
|||
GIMP_STOCK_GRADIENT
|
||||
GIMP_STOCK_PALETTE
|
||||
GIMP_STOCK_PATTERN
|
||||
GIMP_STOCK_ZOOM_FOLLOW_WINDOW
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
|
|
|
@ -848,6 +848,13 @@ RTL variant
|
|||
|
||||
|
||||
|
||||
<!-- ##### MACRO GIMP_STOCK_COLOR_PICK_FROM_SCREEN ##### -->
|
||||
<para>
|
||||
<inlinegraphic fileref="stock-color-pick-from-screen-16.png" format="png"></inlinegraphic>
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GIMP_STOCK_CONVERT_GRAYSCALE ##### -->
|
||||
<para>
|
||||
<inlinegraphic fileref="stock-convert-grayscale-16.png" format="png"></inlinegraphic>
|
||||
|
@ -1317,3 +1324,10 @@ RTL variant
|
|||
|
||||
|
||||
|
||||
<!-- ##### MACRO GIMP_STOCK_ZOOM_FOLLOW_WINDOW ##### -->
|
||||
<para>
|
||||
<inlinegraphic fileref="stock-zoom-follow-window-12.png" format="png"></inlinegraphic>
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ gimp_pick_button_init (GimpPickButton *button)
|
|||
{
|
||||
GtkWidget *image;
|
||||
|
||||
image = gtk_image_new_from_stock (GIMP_STOCK_TOOL_COLOR_PICKER,
|
||||
image = gtk_image_new_from_stock (GIMP_STOCK_COLOR_PICK_FROM_SCREEN,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_container_add (GTK_CONTAINER (button), image);
|
||||
gtk_widget_show (image);
|
||||
|
|
|
@ -163,6 +163,7 @@ static GtkStockItem gimp_stock_items[] =
|
|||
{ GIMP_STOCK_COLOR_PICKER_GRAY, NULL, 0, 0, LIBGIMP_DOMAIN },
|
||||
{ GIMP_STOCK_COLOR_PICKER_WHITE, NULL, 0, 0, LIBGIMP_DOMAIN },
|
||||
{ GIMP_STOCK_COLOR_TRIANGLE, NULL, 0, 0, LIBGIMP_DOMAIN },
|
||||
{ GIMP_STOCK_COLOR_PICK_FROM_SCREEN, NULL, 0, 0, LIBGIMP_DOMAIN },
|
||||
|
||||
{ GIMP_STOCK_CHAR_PICKER, NULL, 0, 0, LIBGIMP_DOMAIN },
|
||||
{ GIMP_STOCK_LETTER_SPACING, N_("L_etter Spacing"), 0, 0, LIBGIMP_DOMAIN },
|
||||
|
@ -335,6 +336,7 @@ gimp_stock_button_pixbufs[] =
|
|||
{ GIMP_STOCK_COLOR_PICKER_GRAY, stock_color_picker_gray_18 },
|
||||
{ GIMP_STOCK_COLOR_PICKER_WHITE, stock_color_picker_white_18 },
|
||||
{ GIMP_STOCK_COLOR_TRIANGLE, stock_color_triangle_16 },
|
||||
{ GIMP_STOCK_COLOR_PICK_FROM_SCREEN, stock_color_pick_from_screen_16 },
|
||||
|
||||
{ GIMP_STOCK_CHAR_PICKER, stock_char_picker_22 },
|
||||
{ GIMP_STOCK_LETTER_SPACING, stock_letter_spacing_22 },
|
||||
|
|
|
@ -84,6 +84,7 @@ G_BEGIN_DECLS
|
|||
#define GIMP_STOCK_COLOR_PICKER_GRAY "gimp-color-picker-gray"
|
||||
#define GIMP_STOCK_COLOR_PICKER_WHITE "gimp-color-picker-white"
|
||||
#define GIMP_STOCK_COLOR_TRIANGLE "gimp-color-triangle"
|
||||
#define GIMP_STOCK_COLOR_PICK_FROM_SCREEN "gimp-color-pick-from-screen"
|
||||
|
||||
#define GIMP_STOCK_CHAR_PICKER "gimp-char-picker"
|
||||
#define GIMP_STOCK_LETTER_SPACING "gimp-letter-spacing"
|
||||
|
|
|
@ -134,6 +134,7 @@ STOCK_BUTTON_IMAGES = \
|
|||
stock-color-picker-black-18.png \
|
||||
stock-color-picker-gray-18.png \
|
||||
stock-color-picker-white-18.png \
|
||||
stock-color-pick-from-screen-16.png \
|
||||
stock-color-triangle-16.png \
|
||||
stock-curve-free-16.png \
|
||||
stock-curve-smooth-16.png \
|
||||
|
|
Binary file not shown.
After ![]() (image error) Size: 608 B |
Loading…
Reference in New Issue