[gnome-builder/wip/gtk4-port] plugins/gstyle: convert a few things to adwaita
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port] plugins/gstyle: convert a few things to adwaita
- Date: Sun, 27 Mar 2022 05:48:45 +0000 (UTC)
commit 9e1d87dc23c81ba6c3b5d7cf6cf2181a8a98e076
Author: Christian Hergert <chergert redhat com>
Date: Sat Mar 26 22:48:40 2022 -0700
plugins/gstyle: convert a few things to adwaita
There is a lot to do if we want to bring gstyle over, but this just fixes
a few things along that path.
.../gb-color-picker-prefs-palette-row.c | 6 ++--
.../gb-color-picker-prefs-palette-row.h | 4 +--
.../gstyle/gstyle-color-panel-private.h | 4 +--
.../color-picker/gstyle/gstyle-color-panel.c | 4 +--
.../color-picker/gstyle/gstyle-color-widget.c | 8 ++---
.../color-picker/gstyle/gstyle-color-widget.h | 5 ++-
src/plugins/color-picker/gstyle/gstyle-color.c | 37 +++++++++++-----------
.../color-picker/gstyle/gstyle-palette-widget.c | 26 +++++++--------
.../color-picker/gstyle/gstyle-palette-widget.h | 5 ++-
src/plugins/color-picker/gstyle/gstyle-revealer.c | 13 ++++----
src/plugins/color-picker/gstyle/gstyle-revealer.h | 5 ++-
src/plugins/color-picker/gstyle/gstyle-slidein.c | 12 +++----
src/plugins/color-picker/gstyle/meson.build | 2 ++
13 files changed, 64 insertions(+), 67 deletions(-)
---
diff --git a/src/plugins/color-picker/gb-color-picker-prefs-palette-row.c
b/src/plugins/color-picker/gb-color-picker-prefs-palette-row.c
index 918bbab02..fefe20742 100644
--- a/src/plugins/color-picker/gb-color-picker-prefs-palette-row.c
+++ b/src/plugins/color-picker/gb-color-picker-prefs-palette-row.c
@@ -28,7 +28,7 @@
struct _GbColorPickerPrefsPaletteRow
{
- DzlPreferencesBin parent_instance;
+ AdwPreferencesRow parent_instance;
GtkLabel *palette_name;
GtkImage *image;
@@ -47,7 +47,7 @@ struct _GbColorPickerPrefsPaletteRow
guint needs_attention : 1;
};
-G_DEFINE_FINAL_TYPE (GbColorPickerPrefsPaletteRow, gb_color_picker_prefs_palette_row,
DZL_TYPE_PREFERENCES_BIN)
+G_DEFINE_FINAL_TYPE (GbColorPickerPrefsPaletteRow, gb_color_picker_prefs_palette_row,
ADW_TYPE_PREFERENCES_ROW)
enum {
PROP_0,
@@ -281,7 +281,7 @@ gb_color_picker_prefs_palette_row_set_palette_name (GbColorPickerPrefsPaletteRow
g_assert (GB_IS_COLOR_PICKER_PREFS_PALETTE_ROW (self));
- if (dzl_str_empty0 (new_text))
+ if (!new_text || !new_text[0])
{
gtk_label_set_text (self->palette_name, "No name");
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_PALETTE_NAME]);
diff --git a/src/plugins/color-picker/gb-color-picker-prefs-palette-row.h
b/src/plugins/color-picker/gb-color-picker-prefs-palette-row.h
index 183ef0d7e..293dff655 100644
--- a/src/plugins/color-picker/gb-color-picker-prefs-palette-row.h
+++ b/src/plugins/color-picker/gb-color-picker-prefs-palette-row.h
@@ -19,13 +19,13 @@
*/
#pragma once
-#include <dazzle.h>
+#include <adwaita.h>
G_BEGIN_DECLS
#define GB_TYPE_COLOR_PICKER_PREFS_PALETTE_ROW (gb_color_picker_prefs_palette_row_get_type())
-G_DECLARE_FINAL_TYPE (GbColorPickerPrefsPaletteRow, gb_color_picker_prefs_palette_row, GB,
COLOR_PICKER_PREFS_PALETTE_ROW, DzlPreferencesBin)
+G_DECLARE_FINAL_TYPE (GbColorPickerPrefsPaletteRow, gb_color_picker_prefs_palette_row, GB,
COLOR_PICKER_PREFS_PALETTE_ROW, AdwPreferencesRow)
gboolean gb_color_picker_prefs_palette_row_get_needs_attention
(GbColorPickerPrefsPaletteRow *self);
void gb_color_picker_prefs_palette_row_set_needs_attention
(GbColorPickerPrefsPaletteRow *self,
diff --git a/src/plugins/color-picker/gstyle/gstyle-color-panel-private.h
b/src/plugins/color-picker/gstyle/gstyle-color-panel-private.h
index db70b21ab..412dea35b 100644
--- a/src/plugins/color-picker/gstyle/gstyle-color-panel-private.h
+++ b/src/plugins/color-picker/gstyle/gstyle-color-panel-private.h
@@ -22,8 +22,6 @@
#include <glib-object.h>
-#include <dazzle.h>
-
#include "gstyle-cielab.h"
#include "gstyle-color.h"
#include "gstyle-color-convert.h"
@@ -75,7 +73,7 @@ struct _GstyleColorPanel
GtkWidget *search_strings_popover;
GtkWidget *search_strings_list;
- DzlFuzzyMutableIndex *fuzzy;
+ IdeFuzzyMutableIndex *fuzzy;
GtkToggleButton *components_toggle;
GtkToggleButton *strings_toggle;
diff --git a/src/plugins/color-picker/gstyle/gstyle-color-panel.c
b/src/plugins/color-picker/gstyle/gstyle-color-panel.c
index a6295c168..8638ba769 100644
--- a/src/plugins/color-picker/gstyle/gstyle-color-panel.c
+++ b/src/plugins/color-picker/gstyle/gstyle-color-panel.c
@@ -725,10 +725,10 @@ search_strings_list_sort_func (GtkListBoxRow *row1,
const gchar *name1;
const gchar *name2;
- cw1 = GSTYLE_COLOR_WIDGET (gtk_bin_get_child (GTK_BIN (row1)));
+ cw1 = GSTYLE_COLOR_WIDGET (adw_bin_get_child (ADW_BIN (row1)));
name1 = gstyle_color_get_name (gstyle_color_widget_get_color (cw1));
- cw2 = GSTYLE_COLOR_WIDGET (gtk_bin_get_child (GTK_BIN (row2)));
+ cw2 = GSTYLE_COLOR_WIDGET (adw_bin_get_child (ADW_BIN (row2)));
name2 = gstyle_color_get_name (gstyle_color_widget_get_color (cw2));
return g_strcmp0 (name1, name2);
diff --git a/src/plugins/color-picker/gstyle/gstyle-color-widget.c
b/src/plugins/color-picker/gstyle/gstyle-color-widget.c
index 014835ba3..b8fa46d1a 100644
--- a/src/plugins/color-picker/gstyle/gstyle-color-widget.c
+++ b/src/plugins/color-picker/gstyle/gstyle-color-widget.c
@@ -34,7 +34,7 @@
struct _GstyleColorWidget
{
- GtkBin parent_instance;
+ AdwBin parent_instance;
GstyleCssProvider *default_provider;
@@ -65,7 +65,7 @@ struct _GstyleColorWidget
guint is_fallback_name_visible : 1;
};
-G_DEFINE_FINAL_TYPE (GstyleColorWidget, gstyle_color_widget, GTK_TYPE_BIN)
+G_DEFINE_FINAL_TYPE (GstyleColorWidget, gstyle_color_widget, ADW_TYPE_BIN)
#define GSTYLE_COLOR_WIDGET_DROP_BORDER_PERCENT 0.20
#define GSTYLE_COLOR_WIDGET_DRAG_ICON_OPACITY 0.8
@@ -652,7 +652,7 @@ gstyle_color_widget_get_preferred_width (GtkWidget *widget,
update_border_and_margin (self);
- child = gtk_bin_get_child (GTK_BIN (self));
+ child = adw_bin_get_child (ADW_BIN (self));
if (child && gtk_widget_get_visible (child))
gtk_widget_get_preferred_width (child, min_width, nat_width);
@@ -681,7 +681,7 @@ gstyle_color_widget_get_preferred_height (GtkWidget *widget,
update_border_and_margin (self);
- child = gtk_bin_get_child (GTK_BIN (self));
+ child = adw_bin_get_child (ADW_BIN (self));
if (child && gtk_widget_get_visible (child))
gtk_widget_get_preferred_height (child, min_height, nat_height);
diff --git a/src/plugins/color-picker/gstyle/gstyle-color-widget.h
b/src/plugins/color-picker/gstyle/gstyle-color-widget.h
index 46db82dcb..d4f93f98f 100644
--- a/src/plugins/color-picker/gstyle/gstyle-color-widget.h
+++ b/src/plugins/color-picker/gstyle/gstyle-color-widget.h
@@ -20,8 +20,7 @@
#pragma once
-#include <glib-object.h>
-#include <gtk/gtk.h>
+#include <adwaita.h>
#include "gstyle-color.h"
#include "gstyle-color-filter.h"
@@ -45,7 +44,7 @@ typedef enum
#define GSTYLE_TYPE_COLOR_WIDGET (gstyle_color_widget_get_type())
#define GSTYLE_TYPE_COLOR_WIDGET_DND_LOCK_FLAGS (gstyle_color_widget_dnd_lock_flags_get_type ())
-G_DECLARE_FINAL_TYPE (GstyleColorWidget, gstyle_color_widget, GSTYLE, COLOR_WIDGET, GtkBin)
+G_DECLARE_FINAL_TYPE (GstyleColorWidget, gstyle_color_widget, GSTYLE, COLOR_WIDGET, AdwBin)
GType gstyle_color_widget_dnd_lock_flags_get_type (void);
diff --git a/src/plugins/color-picker/gstyle/gstyle-color.c b/src/plugins/color-picker/gstyle/gstyle-color.c
index 5b48d5172..4863ab777 100644
--- a/src/plugins/color-picker/gstyle/gstyle-color.c
+++ b/src/plugins/color-picker/gstyle/gstyle-color.c
@@ -20,10 +20,11 @@
#include <math.h>
-#include <dazzle.h>
#include <glib.h>
#include <glib/gi18n.h>
+#include <libide-search.h>
+
#include "gstyle-private.h"
#include "gstyle-colorlexer.h"
#include "gstyle-color-convert.h"
@@ -544,7 +545,7 @@ parse_components (GstyleColorScanner *s)
static gboolean
convert_component (GstyleColorComponent comp,
ComponentRange range,
- gdouble *number)
+ float *number)
{
gdouble n = comp.value;
@@ -568,7 +569,7 @@ convert_component (GstyleColorComponent comp,
static gboolean
convert_hue_component (GstyleColorComponent comp,
- gdouble *hue)
+ float *hue)
{
gdouble num = comp.value;
@@ -642,9 +643,9 @@ _parse_hsla_string (const gchar *string,
{
GstyleColorScanner s;
g_autoptr (GArray) ar = NULL;
- gdouble hue;
- gdouble saturation;
- gdouble lightness;
+ float hue;
+ float saturation;
+ float lightness;
gboolean has_alpha = FALSE;
gboolean ret;
@@ -687,25 +688,25 @@ _parse_hsla_string (const gchar *string,
}
/* TODO: add a public func to init so we can control the initial starting time ? */
-static DzlFuzzyMutableIndex *
+static IdeFuzzyMutableIndex *
_init_predefined_table (void)
{
- static DzlFuzzyMutableIndex *predefined_table;
+ static IdeFuzzyMutableIndex *predefined_table;
NamedColor *item;
if (predefined_table == NULL)
{
- predefined_table = dzl_fuzzy_mutable_index_new (TRUE);
+ predefined_table = ide_fuzzy_mutable_index_new (TRUE);
- dzl_fuzzy_mutable_index_begin_bulk_insert (predefined_table);
+ ide_fuzzy_mutable_index_begin_bulk_insert (predefined_table);
for (guint i = 0; i < G_N_ELEMENTS (predefined_colors_table); ++i)
{
item = &predefined_colors_table [i];
item->index = i;
- dzl_fuzzy_mutable_index_insert (predefined_table, item->name, (gpointer)item);
+ ide_fuzzy_mutable_index_insert (predefined_table, item->name, (gpointer)item);
}
- dzl_fuzzy_mutable_index_end_bulk_insert (predefined_table);
+ ide_fuzzy_mutable_index_end_bulk_insert (predefined_table);
}
return predefined_table;
@@ -719,13 +720,13 @@ _parse_predefined_color (const gchar *color_string,
g_autoptr (GArray) results = NULL;
NamedColor *item = NULL;
gint len;
- DzlFuzzyMutableIndex *predefined_table = _init_predefined_table ();
+ IdeFuzzyMutableIndex *predefined_table = _init_predefined_table ();
- results = dzl_fuzzy_mutable_index_match (predefined_table, color_string, 10);
+ results = ide_fuzzy_mutable_index_match (predefined_table, color_string, 10);
len = results->len;
for (gint i = 0; i < len; ++i)
{
- const DzlFuzzyMutableIndexMatch *match = &g_array_index (results, DzlFuzzyMutableIndexMatch, i);
+ const IdeFuzzyMutableIndexMatch *match = &g_array_index (results, IdeFuzzyMutableIndexMatch, i);
if (g_strcmp0 (color_string, match->key) == 0)
{
@@ -760,14 +761,14 @@ gstyle_color_fuzzy_parse_color_string (const gchar *color_string)
GdkRGBA rgba;
gint len;
- DzlFuzzyMutableIndex *predefined_table = _init_predefined_table ();
+ IdeFuzzyMutableIndex *predefined_table = _init_predefined_table ();
results = g_ptr_array_new_with_free_func (g_object_unref);
- fuzzy_results = dzl_fuzzy_mutable_index_match (predefined_table, color_string,
GSTYLE_COLOR_FUZZY_SEARCH_MAX_LEN);
+ fuzzy_results = ide_fuzzy_mutable_index_match (predefined_table, color_string,
GSTYLE_COLOR_FUZZY_SEARCH_MAX_LEN);
len = MIN (GSTYLE_COLOR_FUZZY_SEARCH_MAX_LEN, fuzzy_results->len);
for (gint i = 0; i < len; ++i)
{
- const DzlFuzzyMutableIndexMatch *match = &g_array_index (fuzzy_results, DzlFuzzyMutableIndexMatch, i);
+ const IdeFuzzyMutableIndexMatch *match = &g_array_index (fuzzy_results, IdeFuzzyMutableIndexMatch, i);
item = match->value;
rgba.red = item->red / 255.0;
diff --git a/src/plugins/color-picker/gstyle/gstyle-palette-widget.c
b/src/plugins/color-picker/gstyle/gstyle-palette-widget.c
index 0f0054af5..59217ac70 100644
--- a/src/plugins/color-picker/gstyle/gstyle-palette-widget.c
+++ b/src/plugins/color-picker/gstyle/gstyle-palette-widget.c
@@ -41,7 +41,7 @@
struct _GstylePaletteWidget
{
- GtkBin parent_instance;
+ AdwBin parent_instance;
GstyleCssProvider *default_provider;
GListStore *palettes;
@@ -71,7 +71,7 @@ struct _GstylePaletteWidget
guint is_dnd_at_end : 1;
};
-G_DEFINE_FINAL_TYPE (GstylePaletteWidget, gstyle_palette_widget, GTK_TYPE_BIN)
+G_DEFINE_FINAL_TYPE (GstylePaletteWidget, gstyle_palette_widget, ADW_TYPE_BIN)
#define GSTYLE_DND_SPEED_THRESHOLD 50
#define DND_INDEX_START (G_MININT)
@@ -223,7 +223,7 @@ dnd_get_index_from_cursor (GstylePaletteWidget *self,
gint y,
CursorInfo *info)
{
- GtkBin *bin_child;
+ AdwBin *bin_child;
GtkAllocation alloc;
gint len;
@@ -233,7 +233,7 @@ dnd_get_index_from_cursor (GstylePaletteWidget *self,
if (self->view_mode == GSTYLE_PALETTE_WIDGET_VIEW_MODE_LIST)
{
gtk_widget_translate_coordinates (GTK_WIDGET (self), self->listbox, x, y, &info->dest_x,
&info->dest_y);
- bin_child = GTK_BIN (gtk_list_box_get_row_at_y (GTK_LIST_BOX (self->listbox), info->dest_y));
+ bin_child = ADW_BIN (gtk_list_box_get_row_at_y (GTK_LIST_BOX (self->listbox), info->dest_y));
if (bin_child == NULL)
{
/* No child mean we are at list start or at list end */
@@ -241,47 +241,47 @@ dnd_get_index_from_cursor (GstylePaletteWidget *self,
if (len == 0)
return FALSE;
- bin_child = GTK_BIN (gtk_list_box_get_row_at_index (GTK_LIST_BOX (self->listbox), 0));
+ bin_child = ADW_BIN (gtk_list_box_get_row_at_index (GTK_LIST_BOX (self->listbox), 0));
gtk_widget_get_allocated_size (GTK_WIDGET (bin_child), &alloc, NULL);
if (info->dest_y < alloc.y)
{
info->index = 0;
- info->child = GSTYLE_COLOR_WIDGET (gtk_bin_get_child (GTK_BIN (bin_child)));
+ info->child = GSTYLE_COLOR_WIDGET (adw_bin_get_child (ADW_BIN (bin_child)));
return TRUE;
}
- bin_child = GTK_BIN (gtk_list_box_get_row_at_index (GTK_LIST_BOX (self->listbox), len - 1));
+ bin_child = ADW_BIN (gtk_list_box_get_row_at_index (GTK_LIST_BOX (self->listbox), len - 1));
}
info->index = gtk_list_box_row_get_index (GTK_LIST_BOX_ROW (bin_child));
- info->child = GSTYLE_COLOR_WIDGET (gtk_bin_get_child (GTK_BIN (bin_child)));
+ info->child = GSTYLE_COLOR_WIDGET (adw_bin_get_child (ADW_BIN (bin_child)));
}
else
{
gtk_widget_translate_coordinates (GTK_WIDGET (self), self->flowbox, x, y, &info->dest_x,
&info->dest_y);
- bin_child = GTK_BIN (flowbox_get_child_at_xy (self, info->dest_x, info->dest_y, &info->index,
&info->nb_col));
+ bin_child = ADW_BIN (flowbox_get_child_at_xy (self, info->dest_x, info->dest_y, &info->index,
&info->nb_col));
if (bin_child == NULL)
{
len = gstyle_palette_get_len (self->selected_palette);
if (len == 0)
return FALSE;
- bin_child = GTK_BIN (gtk_flow_box_get_child_at_index (GTK_FLOW_BOX (self->flowbox), 0));
+ bin_child = ADW_BIN (gtk_flow_box_get_child_at_index (GTK_FLOW_BOX (self->flowbox), 0));
gtk_widget_get_allocated_size (GTK_WIDGET (bin_child), &alloc, NULL);
if (info->dest_x < alloc.x && info->dest_y < alloc.y + alloc.height)
{
info->index = 0;
- info->child = GSTYLE_COLOR_WIDGET (gtk_bin_get_child (GTK_BIN (bin_child)));
+ info->child = GSTYLE_COLOR_WIDGET (adw_bin_get_child (ADW_BIN (bin_child)));
return TRUE;
}
- bin_child = GTK_BIN (gtk_flow_box_get_child_at_index (GTK_FLOW_BOX (self->flowbox), len - 1));
+ bin_child = ADW_BIN (gtk_flow_box_get_child_at_index (GTK_FLOW_BOX (self->flowbox), len - 1));
gtk_widget_get_allocated_size (GTK_WIDGET (bin_child), &alloc, NULL);
info->dest_x = alloc.x + alloc.width;
}
info->index = gtk_flow_box_child_get_index (GTK_FLOW_BOX_CHILD (bin_child));
- info->child = GSTYLE_COLOR_WIDGET (gtk_bin_get_child (GTK_BIN (bin_child)));
+ info->child = GSTYLE_COLOR_WIDGET (adw_bin_get_child (ADW_BIN (bin_child)));
}
return TRUE;
diff --git a/src/plugins/color-picker/gstyle/gstyle-palette-widget.h
b/src/plugins/color-picker/gstyle/gstyle-palette-widget.h
index 621b1dd4d..a5d4b1bb5 100644
--- a/src/plugins/color-picker/gstyle/gstyle-palette-widget.h
+++ b/src/plugins/color-picker/gstyle/gstyle-palette-widget.h
@@ -20,8 +20,7 @@
#pragma once
-#include <glib-object.h>
-#include <gtk/gtk.h>
+#include <adwaita.h>
#include "gstyle-palette.h"
#include "gstyle-types.h"
@@ -33,7 +32,7 @@ G_BEGIN_DECLS
#define GSTYLE_TYPE_PALETTE_WIDGET_VIEW_MODE (gstyle_palette_widget_view_mode_get_type())
#define GSTYLE_TYPE_PALETTE_WIDGET_SORT_MODE (gstyle_palette_widget_sort_mode_get_type())
-G_DECLARE_FINAL_TYPE (GstylePaletteWidget, gstyle_palette_widget, GSTYLE, PALETTE_WIDGET, GtkBin)
+G_DECLARE_FINAL_TYPE (GstylePaletteWidget, gstyle_palette_widget, GSTYLE, PALETTE_WIDGET, AdwBin)
typedef enum
{
diff --git a/src/plugins/color-picker/gstyle/gstyle-revealer.c
b/src/plugins/color-picker/gstyle/gstyle-revealer.c
index 5b7bd76f8..db540df24 100644
--- a/src/plugins/color-picker/gstyle/gstyle-revealer.c
+++ b/src/plugins/color-picker/gstyle/gstyle-revealer.c
@@ -30,12 +30,11 @@
#include "gstyle-animation.h"
#include "gstyle-palette-widget.h"
-
#include "gstyle-revealer.h"
struct _GstyleRevealer
{
- GtkBin parent_instance;
+ AdwBin parent_instance;
GdkWindow *window;
gdouble duration;
@@ -54,7 +53,7 @@ struct _GstyleRevealer
/* TODO: use spped instead of duration */
-G_DEFINE_FINAL_TYPE (GstyleRevealer, gstyle_revealer, GTK_TYPE_BIN)
+G_DEFINE_FINAL_TYPE (GstyleRevealer, gstyle_revealer, ADW_TYPE_BIN)
enum {
PROP_0,
@@ -106,7 +105,7 @@ animation_tick_cb (GtkWidget *widget,
self->offset = self->dst_offset;
self->revealed = !!(self->offset);
- child = gtk_bin_get_child (GTK_BIN (self));
+ child = adw_bin_get_child (ADW_BIN (self));
if (child != NULL)
gtk_widget_set_child_visible (child, self->revealed);
@@ -125,7 +124,7 @@ gstyle_revealer_set_reveal_child (GstyleRevealer *self,
g_return_if_fail (GSTYLE_IS_REVEALER (self));
- child = gtk_bin_get_child (GTK_BIN (self));
+ child = adw_bin_get_child (ADW_BIN (self));
if (child == NULL || (!self->is_animating && reveal == self->revealed))
return;
@@ -188,7 +187,7 @@ gstyle_revealer_size_allocate (GtkWidget *widget,
allocation->width,
allocation->height);
- child = gtk_bin_get_child (GTK_BIN (self));
+ child = adw_bin_get_child (ADW_BIN (self));
if (child == NULL)
return;
@@ -235,7 +234,7 @@ gstyle_revealer_get_preferred_width (GtkWidget *widget,
*min_width = *nat_width = 1;
- child = gtk_bin_get_child (GTK_BIN (self));
+ child = adw_bin_get_child (ADW_BIN (self));
if (child != NULL)
gtk_widget_get_preferred_width (child, min_width, nat_width);
}
diff --git a/src/plugins/color-picker/gstyle/gstyle-revealer.h
b/src/plugins/color-picker/gstyle/gstyle-revealer.h
index 896d7362d..0372f955b 100644
--- a/src/plugins/color-picker/gstyle/gstyle-revealer.h
+++ b/src/plugins/color-picker/gstyle/gstyle-revealer.h
@@ -20,14 +20,13 @@
#pragma once
-#include <glib-object.h>
-#include <gtk/gtk.h>
+#include <adwaita.h>
G_BEGIN_DECLS
#define GSTYLE_TYPE_REVEALER (gstyle_revealer_get_type())
-G_DECLARE_FINAL_TYPE (GstyleRevealer, gstyle_revealer, GSTYLE, REVEALER, GtkBin)
+G_DECLARE_FINAL_TYPE (GstyleRevealer, gstyle_revealer, GSTYLE, REVEALER, AdwBin)
GstyleRevealer *gstyle_revealer_new (void);
void gstyle_revealer_set_reveal_child (GstyleRevealer *self,
diff --git a/src/plugins/color-picker/gstyle/gstyle-slidein.c
b/src/plugins/color-picker/gstyle/gstyle-slidein.c
index 35f69de66..2f5bfadb1 100644
--- a/src/plugins/color-picker/gstyle/gstyle-slidein.c
+++ b/src/plugins/color-picker/gstyle/gstyle-slidein.c
@@ -314,7 +314,7 @@ compute_duration (GstyleSlidein *self)
g_assert (GSTYLE_IS_SLIDEIN (self));
- child = gtk_bin_get_child (GTK_BIN (self));
+ child = adw_bin_get_child (ADW_BIN (self));
gtk_widget_get_preferred_size (child, &min_req_size, &nat_req_size);
if (get_orientation (self) == GTK_ORIENTATION_HORIZONTAL)
@@ -416,7 +416,7 @@ animate (GstyleSlidein *self,
g_assert (GSTYLE_IS_SLIDEIN (self));
g_assert (0.0 <= target_offset && target_offset <= 1.0);
- child = gtk_bin_get_child (GTK_BIN (self));
+ child = adw_bin_get_child (ADW_BIN (self));
if (child == NULL || self->overlay_child == NULL)
return FALSE;
@@ -829,7 +829,7 @@ gstyle_slidein_get_preferred_width (GtkWidget *widget,
*min_width = *nat_width = 1;
- child = gtk_bin_get_child (GTK_BIN (self));
+ child = adw_bin_get_child (ADW_BIN (self));
if (child != NULL)
gtk_widget_get_preferred_width (child, min_width, nat_width);
@@ -893,7 +893,7 @@ gstyle_slidein_get_preferred_height (GtkWidget *widget,
*min_height = *nat_height = 1;
- child = gtk_bin_get_child (GTK_BIN (self));
+ child = adw_bin_get_child (ADW_BIN (self));
if (child != NULL)
gtk_widget_get_preferred_width (child, min_height, nat_height);
@@ -1034,7 +1034,7 @@ gstyle_slidein_draw (GtkWidget *widget,
* and provide your own container draw implementation.
*/
- child = gtk_bin_get_child (GTK_BIN (self));
+ child = adw_bin_get_child (ADW_BIN (self));
if (child == NULL)
return GDK_EVENT_STOP;
@@ -1073,7 +1073,7 @@ gstyle_slidein_forall (GtkContainer *container,
g_assert (GSTYLE_IS_SLIDEIN (self));
- child = gtk_bin_get_child (GTK_BIN (self));
+ child = adw_bin_get_child (ADW_BIN (self));
if (child)
(* callback) (child, callback_data);
diff --git a/src/plugins/color-picker/gstyle/meson.build b/src/plugins/color-picker/gstyle/meson.build
index 950bdcc35..7dd321c3a 100644
--- a/src/plugins/color-picker/gstyle/meson.build
+++ b/src/plugins/color-picker/gstyle/meson.build
@@ -73,6 +73,8 @@ libgstyle_deps = [
libportal_dep,
libm_dep,
libxml2_dep,
+ libide_search_dep,
+ libadwaita_dep,
]
libgstyle = static_library('gstyle-private', libgstyle_sources,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]