forked from AuroraMiddleware/gtk
scale button: Allocate popovers
Call gtk_native_check_resize() from size_allocate, as is required now. This gets volume buttons closer to working again (dragging the slider still doesn't work).
This commit is contained in:
parent
e6f71d841e
commit
507b2d332e
@ -54,6 +54,7 @@
|
||||
#include "gtkscale.h"
|
||||
#include "gtktypebuiltins.h"
|
||||
#include "gtkwindowprivate.h"
|
||||
#include "gtknative.h"
|
||||
|
||||
#include "a11y/gtkscalebuttonaccessible.h"
|
||||
|
||||
@ -135,6 +136,10 @@ static void gtk_scale_button_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gtk_scale_button_size_allocate (GtkWidget *widget,
|
||||
int width,
|
||||
int height,
|
||||
int baseline);
|
||||
static void gtk_scale_button_set_orientation_private (GtkScaleButton *button,
|
||||
GtkOrientation orientation);
|
||||
static void gtk_scale_button_clicked (GtkButton *button);
|
||||
@ -174,6 +179,8 @@ gtk_scale_button_class_init (GtkScaleButtonClass *klass)
|
||||
gobject_class->set_property = gtk_scale_button_set_property;
|
||||
gobject_class->get_property = gtk_scale_button_get_property;
|
||||
|
||||
widget_class->size_allocate = gtk_scale_button_size_allocate;
|
||||
|
||||
button_class->clicked = gtk_scale_button_clicked;
|
||||
|
||||
/**
|
||||
@ -989,3 +996,17 @@ cb_popup_mapped (GtkWidget *popup,
|
||||
|
||||
gtk_widget_grab_focus (priv->scale);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_scale_button_size_allocate (GtkWidget *widget,
|
||||
int width,
|
||||
int height,
|
||||
int baseline)
|
||||
{
|
||||
GtkScaleButton *button = GTK_SCALE_BUTTON (widget);
|
||||
GtkScaleButtonPrivate *priv = gtk_scale_button_get_instance_private (button);
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_scale_button_parent_class)->size_allocate (widget, width, height, baseline);
|
||||
|
||||
gtk_native_check_resize (GTK_NATIVE (priv->dock));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user