forked from AuroraMiddleware/gtk
colorscale: don't use style properties to determine slider size
This commit is contained in:
parent
8b87eca11e
commit
1a116b9a95
@ -23,6 +23,7 @@
|
|||||||
#include "gtkgesturelongpress.h"
|
#include "gtkgesturelongpress.h"
|
||||||
#include "gtkcolorutils.h"
|
#include "gtkcolorutils.h"
|
||||||
#include "gtkorientable.h"
|
#include "gtkorientable.h"
|
||||||
|
#include "gtkrangeprivate.h"
|
||||||
#include "gtkstylecontext.h"
|
#include "gtkstylecontext.h"
|
||||||
#include "gtkaccessible.h"
|
#include "gtkaccessible.h"
|
||||||
#include "gtkprivate.h"
|
#include "gtkprivate.h"
|
||||||
@ -62,14 +63,20 @@ gtk_color_scale_get_trough_size (GtkColorScale *scale,
|
|||||||
gint *height_out)
|
gint *height_out)
|
||||||
{
|
{
|
||||||
GtkWidget *widget = GTK_WIDGET (scale);
|
GtkWidget *widget = GTK_WIDGET (scale);
|
||||||
|
GtkCssGadget *slider_gadget;
|
||||||
gint width, height;
|
gint width, height;
|
||||||
gint x_offset, y_offset;
|
gint x_offset, y_offset;
|
||||||
gint slider_width, slider_height;
|
gint slider_width, slider_height;
|
||||||
|
|
||||||
gtk_widget_style_get (widget,
|
slider_gadget = gtk_range_get_slider_gadget (GTK_RANGE (scale));
|
||||||
"slider-width", &slider_width,
|
gtk_css_gadget_get_preferred_size (slider_gadget,
|
||||||
"slider-length", &slider_height,
|
GTK_ORIENTATION_HORIZONTAL, -1,
|
||||||
NULL);
|
&slider_width, NULL,
|
||||||
|
NULL, NULL);
|
||||||
|
gtk_css_gadget_get_preferred_size (slider_gadget,
|
||||||
|
GTK_ORIENTATION_VERTICAL, -1,
|
||||||
|
&slider_height, NULL,
|
||||||
|
NULL, NULL);
|
||||||
|
|
||||||
width = gtk_widget_get_allocated_width (widget);
|
width = gtk_widget_get_allocated_width (widget);
|
||||||
height = gtk_widget_get_allocated_height (widget);
|
height = gtk_widget_get_allocated_height (widget);
|
||||||
|
Loading…
Reference in New Issue
Block a user