forked from AuroraMiddleware/gtk
Revert "range: move GtkColorScale special case to GtkColorScale"
This reverts commit d93d266ed9e3e26e382a4f6d4b5d4ea19eff3bcf.
This commit is contained in:
parent
b927fc0874
commit
8b87eca11e
@ -23,7 +23,6 @@
|
|||||||
#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"
|
||||||
@ -256,7 +255,6 @@ scale_draw (GtkWidget *widget,
|
|||||||
static void
|
static void
|
||||||
gtk_color_scale_init (GtkColorScale *scale)
|
gtk_color_scale_init (GtkColorScale *scale)
|
||||||
{
|
{
|
||||||
GtkCssNode *trough_node;
|
|
||||||
GtkStyleContext *context;
|
GtkStyleContext *context;
|
||||||
|
|
||||||
scale->priv = gtk_color_scale_get_instance_private (scale);
|
scale->priv = gtk_color_scale_get_instance_private (scale);
|
||||||
@ -271,9 +269,6 @@ gtk_color_scale_init (GtkColorScale *scale)
|
|||||||
|
|
||||||
context = gtk_widget_get_style_context (GTK_WIDGET (scale));
|
context = gtk_widget_get_style_context (GTK_WIDGET (scale));
|
||||||
gtk_style_context_add_class (context, "color");
|
gtk_style_context_add_class (context, "color");
|
||||||
|
|
||||||
trough_node = gtk_range_get_trough_node (GTK_RANGE (scale));
|
|
||||||
gtk_css_node_set_visible (trough_node, FALSE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -2268,8 +2268,14 @@ gtk_range_draw (GtkWidget *widget,
|
|||||||
{
|
{
|
||||||
GtkRange *range = GTK_RANGE (widget);
|
GtkRange *range = GTK_RANGE (widget);
|
||||||
GtkRangePrivate *priv = range->priv;
|
GtkRangePrivate *priv = range->priv;
|
||||||
|
gboolean draw_trough = TRUE;
|
||||||
|
|
||||||
|
if (GTK_IS_COLOR_SCALE (widget))
|
||||||
|
draw_trough = FALSE;
|
||||||
|
|
||||||
|
if (draw_trough)
|
||||||
gtk_css_gadget_draw (priv->trough_gadget, cr);
|
gtk_css_gadget_draw (priv->trough_gadget, cr);
|
||||||
|
|
||||||
gtk_css_gadget_draw (priv->slider_gadget, cr);
|
gtk_css_gadget_draw (priv->slider_gadget, cr);
|
||||||
|
|
||||||
if (priv->stepper_a_gadget)
|
if (priv->stepper_a_gadget)
|
||||||
|
Loading…
Reference in New Issue
Block a user