mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-07 19:30:12 +00:00
Revert "More label and image sizing fixes"
This reverts commit 68c1e83cf0
.
This commit is contained in:
parent
d9bdb9a137
commit
7c83a71239
@ -33,7 +33,6 @@
|
|||||||
#include "gtkimageprivate.h"
|
#include "gtkimageprivate.h"
|
||||||
#include "deprecated/gtkiconfactory.h"
|
#include "deprecated/gtkiconfactory.h"
|
||||||
#include "deprecated/gtkstock.h"
|
#include "deprecated/gtkstock.h"
|
||||||
#include "deprecated/gtkmisc.h"
|
|
||||||
#include "gtkicontheme.h"
|
#include "gtkicontheme.h"
|
||||||
#include "gtksizerequest.h"
|
#include "gtksizerequest.h"
|
||||||
#include "gtkintl.h"
|
#include "gtkintl.h"
|
||||||
@ -1521,21 +1520,11 @@ gtk_image_get_padding_and_border (GtkImage *image,
|
|||||||
GtkStyleContext *context;
|
GtkStyleContext *context;
|
||||||
GtkStateFlags state;
|
GtkStateFlags state;
|
||||||
GtkBorder tmp;
|
GtkBorder tmp;
|
||||||
gint xpad, ypad;
|
|
||||||
|
|
||||||
context = gtk_widget_get_style_context (GTK_WIDGET (image));
|
context = gtk_widget_get_style_context (GTK_WIDGET (image));
|
||||||
state = gtk_widget_get_state_flags (GTK_WIDGET (image));
|
state = gtk_widget_get_state_flags (GTK_WIDGET (image));
|
||||||
|
|
||||||
gtk_style_context_get_padding (context, state, border);
|
gtk_style_context_get_padding (context, state, border);
|
||||||
|
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|
||||||
gtk_misc_get_padding (GTK_MISC (image), &xpad, &ypad);
|
|
||||||
border->top += ypad;
|
|
||||||
border->left += xpad;
|
|
||||||
border->bottom += ypad;
|
|
||||||
border->right += xpad;
|
|
||||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
|
||||||
|
|
||||||
gtk_style_context_get_border (context, state, &tmp);
|
gtk_style_context_get_border (context, state, &tmp);
|
||||||
border->top += tmp.top;
|
border->top += tmp.top;
|
||||||
border->right += tmp.right;
|
border->right += tmp.right;
|
||||||
@ -1651,6 +1640,7 @@ gtk_image_draw (GtkWidget *widget,
|
|||||||
GtkStyleContext *context;
|
GtkStyleContext *context;
|
||||||
gint x, y, width, height, baseline;
|
gint x, y, width, height, baseline;
|
||||||
gfloat xalign, yalign;
|
gfloat xalign, yalign;
|
||||||
|
GtkStateFlags state;
|
||||||
GtkBorder border;
|
GtkBorder border;
|
||||||
|
|
||||||
g_return_val_if_fail (GTK_IS_IMAGE (widget), FALSE);
|
g_return_val_if_fail (GTK_IS_IMAGE (widget), FALSE);
|
||||||
@ -1659,6 +1649,8 @@ gtk_image_draw (GtkWidget *widget,
|
|||||||
priv = image->priv;
|
priv = image->priv;
|
||||||
|
|
||||||
context = gtk_widget_get_style_context (widget);
|
context = gtk_widget_get_style_context (widget);
|
||||||
|
state = gtk_widget_get_state_flags (GTK_WIDGET (image));
|
||||||
|
gtk_style_context_get_border (context, state, &border);
|
||||||
|
|
||||||
gtk_render_background (context, cr,
|
gtk_render_background (context, cr,
|
||||||
0, 0,
|
0, 0,
|
||||||
@ -1669,7 +1661,7 @@ gtk_image_draw (GtkWidget *widget,
|
|||||||
|
|
||||||
xalign = halign_to_float (widget);
|
xalign = halign_to_float (widget);
|
||||||
yalign = valign_to_float (widget);
|
yalign = valign_to_float (widget);
|
||||||
gtk_image_get_padding_and_border (image, &border);
|
|
||||||
gtk_image_get_preferred_size (image, &width, &height);
|
gtk_image_get_preferred_size (image, &width, &height);
|
||||||
|
|
||||||
baseline = gtk_widget_get_allocated_baseline (widget);
|
baseline = gtk_widget_get_allocated_baseline (widget);
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
#include "gtkprivate.h"
|
#include "gtkprivate.h"
|
||||||
#include "gtktypebuiltins.h"
|
#include "gtktypebuiltins.h"
|
||||||
#include "gtkmain.h"
|
#include "gtkmain.h"
|
||||||
#include "deprecated/gtkmisc.h"
|
|
||||||
|
|
||||||
#include "a11y/gtklabelaccessibleprivate.h"
|
#include "a11y/gtklabelaccessibleprivate.h"
|
||||||
|
|
||||||
@ -3227,21 +3226,11 @@ gtk_label_get_padding_and_border (GtkLabel *label,
|
|||||||
GtkStyleContext *context;
|
GtkStyleContext *context;
|
||||||
GtkStateFlags state;
|
GtkStateFlags state;
|
||||||
GtkBorder tmp;
|
GtkBorder tmp;
|
||||||
gint xpad, ypad;
|
|
||||||
|
|
||||||
context = gtk_widget_get_style_context (GTK_WIDGET (label));
|
context = gtk_widget_get_style_context (GTK_WIDGET (label));
|
||||||
state = gtk_widget_get_state_flags (GTK_WIDGET (label));
|
state = gtk_widget_get_state_flags (GTK_WIDGET (label));
|
||||||
|
|
||||||
gtk_style_context_get_padding (context, state, border);
|
gtk_style_context_get_padding (context, state, border);
|
||||||
|
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|
||||||
gtk_misc_get_padding (GTK_MISC (label), &xpad, &ypad);
|
|
||||||
border->top += ypad;
|
|
||||||
border->left += xpad;
|
|
||||||
border->bottom += ypad;
|
|
||||||
border->right += xpad;
|
|
||||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
|
||||||
|
|
||||||
gtk_style_context_get_border (context, state, &tmp);
|
gtk_style_context_get_border (context, state, &tmp);
|
||||||
border->top += tmp.top;
|
border->top += tmp.top;
|
||||||
border->right += tmp.right;
|
border->right += tmp.right;
|
||||||
|
Loading…
Reference in New Issue
Block a user