Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
GIMP
Commits
e260d064
Commit
e260d064
authored
Dec 13, 1998
by
Sven Neumann
Browse files
I guess finally we have the coordinates display working with all font sizes
and even after scaling the image. --Sven
parent
0db6dcf1
Changes
11
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
e260d064
Sun Dec 13 19:48:50 MET 1998 Sven Neumann <sven@gimp.org>
* app/gdisplay.[ch]
* app/gimage.c
* app/interface.c: I guess finally we have the coordinates
display working with all font sizes and even after scaling the
image
Sat Dec 12 17:36:51 GMT 1998 Austin Donnelly <austin@greenend.org.uk>
* app/interface.c
...
...
app/core/gimpprojection.c
View file @
e260d064
...
...
@@ -132,7 +132,7 @@ gdisplay_new (GimpImage *gimage,
/* create the shell for the image */
create_display_shell
(
gdisp
,
gimage
->
width
,
gimage
->
height
,
title
,
gimage_base_type
(
gimage
));
/* set the gdisplay colormap type and install the appropriate colormap */
gdisp
->
color_type
=
(
gimage_base_type
(
gimage
)
==
GRAY
)
?
GRAY
:
RGB
;
...
...
@@ -932,7 +932,7 @@ gdisplay_resize_cursor_label (GDisplay *gdisp)
char
buffer
[
CURSOR_STR_LENGTH
];
int
cursor_label_width
;
g_snprintf
(
buffer
,
sizeof
(
buffer
),
"
%d,%d
"
,
gdisp
->
gimage
->
width
,
gdisp
->
gimage
->
height
);
g_snprintf
(
buffer
,
sizeof
(
buffer
),
"
%d,
%d"
,
gdisp
->
gimage
->
width
,
gdisp
->
gimage
->
height
);
cursor_label_width
=
gdk_string_width
(
gtk_widget_get_style
(
gdisp
->
cursor_label
)
->
font
,
buffer
);
gtk_widget_set_usize
(
gdisp
->
cursor_label
,
cursor_label_width
,
-
1
);
...
...
@@ -1531,6 +1531,24 @@ gdisplays_update_title (GimpImage *gimage)
}
}
void
gdisplays_resize_cursor_label
(
GimpImage
*
gimage
)
{
GDisplay
*
gdisp
;
GSList
*
list
=
display_list
;
/* traverse the linked list of displays, handling each one */
while
(
list
)
{
gdisp
=
(
GDisplay
*
)
list
->
data
;
if
(
gdisp
->
gimage
==
gimage
)
{
gdisplay_resize_cursor_label
(
gdisp
);
}
list
=
g_slist_next
(
list
);
}
}
void
gdisplays_update_area
(
GimpImage
*
gimage
,
...
...
app/core/gimpprojection.h
View file @
e260d064
...
...
@@ -174,6 +174,7 @@ void gdisplay_resize_cursor_label (GDisplay *);
GDisplay
*
gdisplay_active
(
void
);
GDisplay
*
gdisplay_get_ID
(
int
);
void
gdisplays_update_title
(
GimpImage
*
);
void
gdisplays_resize_cursor_label
(
GimpImage
*
);
void
gdisplays_update_area
(
GimpImage
*
,
int
,
int
,
int
,
int
);
void
gdisplays_expose_guides
(
GimpImage
*
);
void
gdisplays_expose_guide
(
GimpImage
*
,
Guide
*
);
...
...
app/display/gimpdisplay.c
View file @
e260d064
...
...
@@ -132,7 +132,7 @@ gdisplay_new (GimpImage *gimage,
/* create the shell for the image */
create_display_shell
(
gdisp
,
gimage
->
width
,
gimage
->
height
,
title
,
gimage_base_type
(
gimage
));
/* set the gdisplay colormap type and install the appropriate colormap */
gdisp
->
color_type
=
(
gimage_base_type
(
gimage
)
==
GRAY
)
?
GRAY
:
RGB
;
...
...
@@ -932,7 +932,7 @@ gdisplay_resize_cursor_label (GDisplay *gdisp)
char
buffer
[
CURSOR_STR_LENGTH
];
int
cursor_label_width
;
g_snprintf
(
buffer
,
sizeof
(
buffer
),
"
%d,%d
"
,
gdisp
->
gimage
->
width
,
gdisp
->
gimage
->
height
);
g_snprintf
(
buffer
,
sizeof
(
buffer
),
"
%d,
%d"
,
gdisp
->
gimage
->
width
,
gdisp
->
gimage
->
height
);
cursor_label_width
=
gdk_string_width
(
gtk_widget_get_style
(
gdisp
->
cursor_label
)
->
font
,
buffer
);
gtk_widget_set_usize
(
gdisp
->
cursor_label
,
cursor_label_width
,
-
1
);
...
...
@@ -1531,6 +1531,24 @@ gdisplays_update_title (GimpImage *gimage)
}
}
void
gdisplays_resize_cursor_label
(
GimpImage
*
gimage
)
{
GDisplay
*
gdisp
;
GSList
*
list
=
display_list
;
/* traverse the linked list of displays, handling each one */
while
(
list
)
{
gdisp
=
(
GDisplay
*
)
list
->
data
;
if
(
gdisp
->
gimage
==
gimage
)
{
gdisplay_resize_cursor_label
(
gdisp
);
}
list
=
g_slist_next
(
list
);
}
}
void
gdisplays_update_area
(
GimpImage
*
gimage
,
...
...
app/display/gimpdisplay.h
View file @
e260d064
...
...
@@ -174,6 +174,7 @@ void gdisplay_resize_cursor_label (GDisplay *);
GDisplay
*
gdisplay_active
(
void
);
GDisplay
*
gdisplay_get_ID
(
int
);
void
gdisplays_update_title
(
GimpImage
*
);
void
gdisplays_resize_cursor_label
(
GimpImage
*
);
void
gdisplays_update_area
(
GimpImage
*
,
int
,
int
,
int
,
int
);
void
gdisplays_expose_guides
(
GimpImage
*
);
void
gdisplays_expose_guide
(
GimpImage
*
,
Guide
*
);
...
...
app/display/gimpdisplayshell-draw.c
View file @
e260d064
...
...
@@ -714,6 +714,9 @@ create_display_shell (GDisplay* gdisp,
gdisp
->
cursor_label
=
gtk_label_new
(
" "
);
gtk_container_add
(
GTK_CONTAINER
(
frame
),
gdisp
->
cursor_label
);
/* we need to realize the cursor_label widget here, so the size gets
computed correctly */
gtk_widget_realize
(
gdisp
->
cursor_label
);
gdisplay_resize_cursor_label
(
gdisp
);
gdisp
->
statusbar
=
gtk_statusbar_new
();
...
...
app/display/gimpdisplayshell.c
View file @
e260d064
...
...
@@ -714,6 +714,9 @@ create_display_shell (GDisplay* gdisp,
gdisp
->
cursor_label
=
gtk_label_new
(
" "
);
gtk_container_add
(
GTK_CONTAINER
(
frame
),
gdisp
->
cursor_label
);
/* we need to realize the cursor_label widget here, so the size gets
computed correctly */
gtk_widget_realize
(
gdisp
->
cursor_label
);
gdisplay_resize_cursor_label
(
gdisp
);
gdisp
->
statusbar
=
gtk_statusbar_new
();
...
...
app/gdisplay.c
View file @
e260d064
...
...
@@ -132,7 +132,7 @@ gdisplay_new (GimpImage *gimage,
/* create the shell for the image */
create_display_shell
(
gdisp
,
gimage
->
width
,
gimage
->
height
,
title
,
gimage_base_type
(
gimage
));
/* set the gdisplay colormap type and install the appropriate colormap */
gdisp
->
color_type
=
(
gimage_base_type
(
gimage
)
==
GRAY
)
?
GRAY
:
RGB
;
...
...
@@ -932,7 +932,7 @@ gdisplay_resize_cursor_label (GDisplay *gdisp)
char
buffer
[
CURSOR_STR_LENGTH
];
int
cursor_label_width
;
g_snprintf
(
buffer
,
sizeof
(
buffer
),
"
%d,%d
"
,
gdisp
->
gimage
->
width
,
gdisp
->
gimage
->
height
);
g_snprintf
(
buffer
,
sizeof
(
buffer
),
"
%d,
%d"
,
gdisp
->
gimage
->
width
,
gdisp
->
gimage
->
height
);
cursor_label_width
=
gdk_string_width
(
gtk_widget_get_style
(
gdisp
->
cursor_label
)
->
font
,
buffer
);
gtk_widget_set_usize
(
gdisp
->
cursor_label
,
cursor_label_width
,
-
1
);
...
...
@@ -1531,6 +1531,24 @@ gdisplays_update_title (GimpImage *gimage)
}
}
void
gdisplays_resize_cursor_label
(
GimpImage
*
gimage
)
{
GDisplay
*
gdisp
;
GSList
*
list
=
display_list
;
/* traverse the linked list of displays, handling each one */
while
(
list
)
{
gdisp
=
(
GDisplay
*
)
list
->
data
;
if
(
gdisp
->
gimage
==
gimage
)
{
gdisplay_resize_cursor_label
(
gdisp
);
}
list
=
g_slist_next
(
list
);
}
}
void
gdisplays_update_area
(
GimpImage
*
gimage
,
...
...
app/gdisplay.h
View file @
e260d064
...
...
@@ -174,6 +174,7 @@ void gdisplay_resize_cursor_label (GDisplay *);
GDisplay
*
gdisplay_active
(
void
);
GDisplay
*
gdisplay_get_ID
(
int
);
void
gdisplays_update_title
(
GimpImage
*
);
void
gdisplays_resize_cursor_label
(
GimpImage
*
);
void
gdisplays_update_area
(
GimpImage
*
,
int
,
int
,
int
,
int
);
void
gdisplays_expose_guides
(
GimpImage
*
);
void
gdisplays_expose_guide
(
GimpImage
*
,
Guide
*
);
...
...
app/gimage.c
View file @
e260d064
...
...
@@ -126,6 +126,7 @@ gimage_resize_handler (GimpImage* gimage)
channel_invalidate_previews
(
gimage
);
layer_invalidate_previews
(
gimage
);
gimp_image_invalidate_preview
(
gimage
);
gdisplays_resize_cursor_label
(
gimage
);
gdisplays_update_full
(
gimage
);
gdisplays_shrink_wrap
(
gimage
);
}
...
...
app/interface.c
View file @
e260d064
...
...
@@ -714,6 +714,9 @@ create_display_shell (GDisplay* gdisp,
gdisp
->
cursor_label
=
gtk_label_new
(
" "
);
gtk_container_add
(
GTK_CONTAINER
(
frame
),
gdisp
->
cursor_label
);
/* we need to realize the cursor_label widget here, so the size gets
computed correctly */
gtk_widget_realize
(
gdisp
->
cursor_label
);
gdisplay_resize_cursor_label
(
gdisp
);
gdisp
->
statusbar
=
gtk_statusbar_new
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment