Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1af58dc4ee | |||
| cb1cf06744 | |||
| c5d00ae119 | |||
| 15582ef9c1 | |||
| 0e57785af7 | |||
| 52f58f1637 | |||
| cd87252130 | |||
| 85d86d61de | |||
| 0d01ceb415 | |||
| aa005486de | |||
| cdd26d0d01 | |||
| f408c59869 | |||
| 4326e38b90 | |||
| 0f488064a2 | |||
| e6c7e038c8 | |||
| 18bd973014 | |||
| dae2d9ec27 | |||
| c0c79eee03 |
+5
-29
@@ -9,8 +9,8 @@
|
||||
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
|
||||
|
||||
m4_define([gtk_major_version], [3])
|
||||
m4_define([gtk_minor_version], [17])
|
||||
m4_define([gtk_micro_version], [0])
|
||||
m4_define([gtk_minor_version], [15])
|
||||
m4_define([gtk_micro_version], [12])
|
||||
m4_define([gtk_interface_age], [0])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
@@ -1660,34 +1660,11 @@ AM_CONDITIONAL(HAVE_COLORD, test "x$have_colord" = "xyes")
|
||||
# Check for libcanberra (only used in examples)
|
||||
##################################################
|
||||
|
||||
AC_ARG_ENABLE(libcanberra,
|
||||
[AS_HELP_STRING([--enable-libcanberra],
|
||||
[enable libcanberra support in examples [default=auto]])],
|
||||
[enable_libcanberra="$enableval"],
|
||||
[enable_libcanberra=auto])
|
||||
|
||||
AC_MSG_CHECKING([whether to use libcanberra])
|
||||
if test "$enable_libcanberra" != "no"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
have_libcanberra=no
|
||||
if test "$enable_libcanberra" != "no"; then
|
||||
PKG_CHECK_MODULES(LIBCANBERRA, libcanberra-gtk3,
|
||||
have_libcanberra=yes, have_libcanberra=no)
|
||||
if test "$enable_libcanberra" = "yes"; then
|
||||
if test "$have_libcanberra" = "no"; then
|
||||
AC_MSG_ERROR([--enable-libcanberra specified, but not available])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
PKG_CHECK_MODULES(LIBCANBERRA, libcanberra-gtk3,
|
||||
have_libcanberra=yes, have_libcanberra=no)
|
||||
if test "$have_libcanberra" = "yes"; then
|
||||
AC_DEFINE(HAVE_LIBCANBERRA, 1, [define if we have libcanberra])
|
||||
AC_DEFINE(HAVE_LIBCANBERRA, 1, [define if we have libcanberra])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_LIBCANBERRA, test "x$have_libcanberra" = "xyes")
|
||||
|
||||
##################################################
|
||||
# Checks for gtk-doc and docbook-tools
|
||||
@@ -1961,7 +1938,6 @@ echo " Print backends: $PRINT_BACKENDS"
|
||||
echo " Dynamic modules: $build_dynamic_modules"
|
||||
echo " Included immodules: $included_immodules"
|
||||
echo " colord support: $have_colord"
|
||||
echo " libcanberra support: $have_libcanberra"
|
||||
echo " Introspection: $found_introspection"
|
||||
echo " Debugging: $enable_debug"
|
||||
echo " Documentation: $enable_gtk_doc"
|
||||
|
||||
@@ -220,9 +220,6 @@ realize (GtkWidget *widget)
|
||||
{
|
||||
gtk_gl_area_make_current (GTK_GL_AREA (widget));
|
||||
|
||||
if (gtk_gl_area_get_error (GTK_GL_AREA (widget)) != NULL)
|
||||
return;
|
||||
|
||||
init_buffers (&position_buffer, NULL);
|
||||
init_shaders (&program, &mvp_location);
|
||||
}
|
||||
@@ -233,9 +230,6 @@ unrealize (GtkWidget *widget)
|
||||
{
|
||||
gtk_gl_area_make_current (GTK_GL_AREA (widget));
|
||||
|
||||
if (gtk_gl_area_get_error (GTK_GL_AREA (widget)) != NULL)
|
||||
return;
|
||||
|
||||
glDeleteBuffers (1, &position_buffer);
|
||||
glDeleteProgram (program);
|
||||
}
|
||||
@@ -277,9 +271,6 @@ static gboolean
|
||||
render (GtkGLArea *area,
|
||||
GdkGLContext *context)
|
||||
{
|
||||
if (gtk_gl_area_get_error (area) != NULL)
|
||||
return FALSE;
|
||||
|
||||
/* Clear the viewport */
|
||||
glClearColor (0.5, 0.5, 0.5, 1.0);
|
||||
glClear (GL_COLOR_BUFFER_BIT);
|
||||
|
||||
+9
-12
@@ -33,7 +33,8 @@ static GtkWidget *
|
||||
create_menu (gint depth)
|
||||
{
|
||||
GtkWidget *menu;
|
||||
GtkRadioMenuItem *last_item;
|
||||
GtkWidget *menuitem;
|
||||
GSList *group;
|
||||
char buf[32];
|
||||
int i, j;
|
||||
|
||||
@@ -41,24 +42,20 @@ create_menu (gint depth)
|
||||
return NULL;
|
||||
|
||||
menu = gtk_menu_new ();
|
||||
last_item = NULL;
|
||||
group = NULL;
|
||||
|
||||
for (i = 0, j = 1; i < 5; i++, j++)
|
||||
{
|
||||
GtkWidget *menu_item;
|
||||
|
||||
sprintf (buf, "item %2d - %d", depth, j);
|
||||
menuitem = gtk_radio_menu_item_new_with_label (group, buf);
|
||||
group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menuitem));
|
||||
|
||||
menu_item = gtk_radio_menu_item_new_with_label_from_widget (NULL, buf);
|
||||
gtk_radio_menu_item_join_group (GTK_RADIO_MENU_ITEM (menu_item), last_item);
|
||||
last_item = GTK_RADIO_MENU_ITEM (menu_item);
|
||||
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
|
||||
gtk_widget_show (menu_item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
if (i == 3)
|
||||
gtk_widget_set_sensitive (menu_item, FALSE);
|
||||
gtk_widget_set_sensitive (menuitem, FALSE);
|
||||
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_item), create_menu (depth - 1));
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), create_menu (depth - 1));
|
||||
}
|
||||
|
||||
return menu;
|
||||
|
||||
@@ -467,10 +467,6 @@
|
||||
<title>Index of new symbols in 3.16</title>
|
||||
<xi:include href="xml/api-index-3.16.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-3-18" role="3.18">
|
||||
<title>Index of new symbols in 3.18</title>
|
||||
<xi:include href="xml/api-index-3.18.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
|
||||
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
|
||||
|
||||
|
||||
@@ -2771,7 +2771,6 @@ gtk_radio_menu_item_new_with_label_from_widget
|
||||
gtk_radio_menu_item_new_with_mnemonic_from_widget
|
||||
gtk_radio_menu_item_set_group
|
||||
gtk_radio_menu_item_get_group
|
||||
gtk_radio_menu_item_join_group
|
||||
<SUBSECTION Standard>
|
||||
GTK_RADIO_MENU_ITEM
|
||||
GTK_IS_RADIO_MENU_ITEM
|
||||
|
||||
+3
-4
@@ -52,8 +52,7 @@ get_vertex_type_name (int type)
|
||||
}
|
||||
|
||||
static guint
|
||||
create_shader (int type,
|
||||
const char *code)
|
||||
create_shader (int type, const char const *code)
|
||||
{
|
||||
guint shader;
|
||||
int status;
|
||||
@@ -86,8 +85,8 @@ create_shader (int type,
|
||||
|
||||
static void
|
||||
make_program (GdkGLContextProgram *program,
|
||||
const char *vertex_shader_code,
|
||||
const char *fragment_shader_code)
|
||||
const char const *vertex_shader_code,
|
||||
const char const *fragment_shader_code)
|
||||
{
|
||||
guint vertex_shader, fragment_shader;
|
||||
int status;
|
||||
|
||||
@@ -142,16 +142,6 @@
|
||||
*/
|
||||
#define GDK_VERSION_3_16 (G_ENCODE_VERSION (3, 16))
|
||||
|
||||
/**
|
||||
* GDK_VERSION_3_18:
|
||||
*
|
||||
* A macro that evaluates to the 3.18 version of GDK, in a format
|
||||
* that can be used by the C pre-processor.
|
||||
*
|
||||
* Since: 3.18
|
||||
*/
|
||||
#define GDK_VERSION_3_18 (G_ENCODE_VERSION (3, 18))
|
||||
|
||||
/* evaluates to the current stable version; for development cycles,
|
||||
* this means the next stable target
|
||||
*/
|
||||
@@ -350,19 +340,5 @@
|
||||
# define GDK_AVAILABLE_IN_3_16 _GDK_EXTERN
|
||||
#endif
|
||||
|
||||
#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_18
|
||||
# define GDK_DEPRECATED_IN_3_18 GDK_DEPRECATED
|
||||
# define GDK_DEPRECATED_IN_3_18_FOR(f) GDK_DEPRECATED_FOR(f)
|
||||
#else
|
||||
# define GDK_DEPRECATED_IN_3_18 _GDK_EXTERN
|
||||
# define GDK_DEPRECATED_IN_3_18_FOR(f) _GDK_EXTERN
|
||||
#endif
|
||||
|
||||
#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_18
|
||||
# define GDK_AVAILABLE_IN_3_18 GDK_UNAVAILABLE(3, 18)
|
||||
#else
|
||||
# define GDK_AVAILABLE_IN_3_18 _GDK_EXTERN
|
||||
#endif
|
||||
|
||||
#endif /* __GDK_VERSION_MACROS_H__ */
|
||||
|
||||
|
||||
+3
-3
@@ -30,13 +30,13 @@
|
||||
#define GDK_TYPE_MIR_WINDOW (gdk_mir_window_get_type ())
|
||||
#define GDK_IS_MIR_WINDOW(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_MIR_WINDOW))
|
||||
|
||||
GDK_AVAILABLE_IN_3_16
|
||||
GDK_AVAILABLE_IN_3_10
|
||||
GType gdk_mir_display_get_type (void);
|
||||
|
||||
GDK_AVAILABLE_IN_3_16
|
||||
GDK_AVAILABLE_IN_3_10
|
||||
MirConnection *gdk_mir_display_get_mir_connection (GdkDisplay *display);
|
||||
|
||||
GDK_AVAILABLE_IN_3_16
|
||||
GDK_AVAILABLE_IN_3_10
|
||||
GType gdk_mir_window_get_type (void);
|
||||
|
||||
GDK_AVAILABLE_IN_3_16
|
||||
|
||||
@@ -213,6 +213,7 @@ ensure_surface_full (GdkWindow *window,
|
||||
MirBufferUsage buffer_usage)
|
||||
{
|
||||
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
|
||||
MirEventDelegate event_delegate = { event_cb, NULL };
|
||||
GdkMirWindowReference *window_ref;
|
||||
|
||||
if (impl->surface || should_render_in_parent (window))
|
||||
@@ -223,6 +224,8 @@ ensure_surface_full (GdkWindow *window,
|
||||
*/
|
||||
window_ref = _gdk_mir_event_source_get_window_reference (window);
|
||||
|
||||
event_delegate.context = window_ref;
|
||||
|
||||
impl->surface = create_mir_surface (gdk_window_get_display (window),
|
||||
window->width, window->height,
|
||||
buffer_usage);
|
||||
@@ -237,7 +240,7 @@ ensure_surface_full (GdkWindow *window,
|
||||
|
||||
_gdk_mir_event_source_queue (window_ref, &resize_event);
|
||||
|
||||
mir_surface_set_event_handler (impl->surface, event_cb, window_ref); // FIXME: Ignore some events until shown
|
||||
mir_surface_set_event_handler (impl->surface, &event_delegate); // FIXME: Ignore some events until shown
|
||||
set_surface_type (impl, impl->surface_type);
|
||||
set_surface_state (impl, impl->surface_state);
|
||||
}
|
||||
|
||||
@@ -193,13 +193,11 @@ gdk_registry_handle_global (void *data,
|
||||
output =
|
||||
wl_registry_bind (display_wayland->wl_registry, id, &wl_output_interface, MIN (version, 2));
|
||||
_gdk_wayland_screen_add_output (display_wayland->screen, id, output, MIN (version, 2));
|
||||
wl_display_roundtrip (display_wayland->wl_display);
|
||||
}
|
||||
else if (strcmp (interface, "wl_seat") == 0)
|
||||
{
|
||||
seat = wl_registry_bind (display_wayland->wl_registry, id, &wl_seat_interface, MIN (version, 4));
|
||||
_gdk_wayland_device_manager_add_seat (gdk_display->device_manager, id, seat);
|
||||
wl_display_roundtrip (display_wayland->wl_display);
|
||||
}
|
||||
else if (strcmp (interface, "wl_data_device_manager") == 0)
|
||||
{
|
||||
@@ -607,7 +605,7 @@ gdk_wayland_display_set_cursor_theme (GdkDisplay *display,
|
||||
}
|
||||
wayland_display->scaled_cursor_themes[0] = theme;
|
||||
if (wayland_display->cursor_theme_name != NULL)
|
||||
g_free (wayland_display->cursor_theme_name);
|
||||
free (wayland_display->cursor_theme_name);
|
||||
wayland_display->cursor_theme_name = g_strdup (name);
|
||||
wayland_display->cursor_theme_size = size;
|
||||
|
||||
|
||||
@@ -1036,10 +1036,6 @@ output_handle_geometry (void *data,
|
||||
{
|
||||
GdkWaylandMonitor *monitor = (GdkWaylandMonitor *)data;
|
||||
|
||||
GDK_NOTE (MISC,
|
||||
g_message ("handle geometry output %d, position %d %d, phys. size %d %d, manufacturer %s, model %s",
|
||||
monitor->id, x, y, physical_width, physical_height, make, model));
|
||||
|
||||
monitor->geometry.x = x;
|
||||
monitor->geometry.y = y;
|
||||
|
||||
@@ -1062,9 +1058,6 @@ output_handle_done (void *data,
|
||||
{
|
||||
GdkWaylandMonitor *monitor = (GdkWaylandMonitor *)data;
|
||||
|
||||
GDK_NOTE (MISC,
|
||||
g_message ("handle done output %d", monitor->id));
|
||||
|
||||
g_signal_emit_by_name (monitor->screen, "monitors-changed");
|
||||
update_screen_size (monitor->screen);
|
||||
}
|
||||
@@ -1072,17 +1065,12 @@ output_handle_done (void *data,
|
||||
static void
|
||||
output_handle_scale (void *data,
|
||||
struct wl_output *wl_output,
|
||||
int32_t scale)
|
||||
int32_t factor)
|
||||
{
|
||||
GdkWaylandMonitor *monitor = (GdkWaylandMonitor *)data;
|
||||
|
||||
GDK_NOTE (MISC,
|
||||
g_message ("handle scale output %d, scale %d", monitor->id, scale));
|
||||
|
||||
monitor->scale = scale;
|
||||
|
||||
if (monitor->geometry.width != 0 && monitor->version < OUTPUT_VERSION_WITH_DONE)
|
||||
g_signal_emit_by_name (monitor->screen, "monitors-changed");
|
||||
monitor->scale = factor;
|
||||
g_signal_emit_by_name (monitor->screen, "monitors-changed");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1095,10 +1083,6 @@ output_handle_mode (void *data,
|
||||
{
|
||||
GdkWaylandMonitor *monitor = (GdkWaylandMonitor *)data;
|
||||
|
||||
GDK_NOTE (MISC,
|
||||
g_message ("handle mode output %d, size %d %d, rate %d",
|
||||
monitor->id, width, height, refresh));
|
||||
|
||||
if ((flags & WL_OUTPUT_MODE_CURRENT) == 0)
|
||||
return;
|
||||
|
||||
|
||||
@@ -115,17 +115,6 @@ struct _GdkWindowImplWayland
|
||||
|
||||
gchar *title;
|
||||
|
||||
struct {
|
||||
gboolean was_set;
|
||||
|
||||
gchar *application_id;
|
||||
gchar *app_menu_path;
|
||||
gchar *menubar_path;
|
||||
gchar *window_object_path;
|
||||
gchar *application_object_path;
|
||||
gchar *unique_bus_name;
|
||||
} application;
|
||||
|
||||
GdkGeometry geometry_hints;
|
||||
GdkWindowHints geometry_mask;
|
||||
|
||||
@@ -155,9 +144,6 @@ static void gdk_wayland_window_configure (GdkWindow *window,
|
||||
int height,
|
||||
int scale);
|
||||
|
||||
static void maybe_set_gtk_surface_dbus_properties (GdkWaylandDisplay *display_wayland,
|
||||
GdkWindowImplWayland *impl);
|
||||
|
||||
GType _gdk_window_impl_wayland_get_type (void);
|
||||
|
||||
G_DEFINE_TYPE (GdkWindowImplWayland, _gdk_window_impl_wayland, GDK_TYPE_WINDOW_IMPL)
|
||||
@@ -659,13 +645,6 @@ gdk_window_impl_wayland_finalize (GObject *object)
|
||||
|
||||
g_free (impl->title);
|
||||
|
||||
g_free (impl->application.application_id);
|
||||
g_free (impl->application.app_menu_path);
|
||||
g_free (impl->application.menubar_path);
|
||||
g_free (impl->application.window_object_path);
|
||||
g_free (impl->application.application_object_path);
|
||||
g_free (impl->application.unique_bus_name);
|
||||
|
||||
g_clear_pointer (&impl->opaque_region, cairo_region_destroy);
|
||||
g_clear_pointer (&impl->input_region, cairo_region_destroy);
|
||||
|
||||
@@ -985,7 +964,6 @@ gdk_wayland_window_create_xdg_surface (GdkWindow *window)
|
||||
{
|
||||
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (gdk_window_get_display (window));
|
||||
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
const gchar *app_id;
|
||||
|
||||
impl->xdg_surface = xdg_shell_get_xdg_surface (display_wayland->xdg_shell, impl->surface);
|
||||
xdg_surface_add_listener (impl->xdg_surface, &xdg_surface_listener, window);
|
||||
@@ -999,15 +977,7 @@ gdk_wayland_window_create_xdg_surface (GdkWindow *window)
|
||||
if (window->state & GDK_WINDOW_STATE_FULLSCREEN)
|
||||
xdg_surface_set_fullscreen (impl->xdg_surface, NULL);
|
||||
|
||||
app_id = impl->application.application_id;
|
||||
if (app_id == NULL)
|
||||
app_id = g_get_prgname ();
|
||||
if (app_id == NULL)
|
||||
app_id = gdk_get_program_class ();
|
||||
|
||||
xdg_surface_set_app_id (impl->xdg_surface, app_id);
|
||||
|
||||
maybe_set_gtk_surface_dbus_properties (display_wayland, impl);
|
||||
xdg_surface_set_app_id (impl->xdg_surface, gdk_get_program_class ());
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2438,43 +2408,6 @@ gdk_wayland_window_set_use_custom_surface (GdkWindow *window)
|
||||
impl->use_custom_surface = TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
maybe_set_gtk_surface_dbus_properties (GdkWaylandDisplay *display_wayland,
|
||||
GdkWindowImplWayland *impl)
|
||||
{
|
||||
if (impl->application.was_set)
|
||||
return;
|
||||
|
||||
if (impl->application.application_id == NULL &&
|
||||
impl->application.app_menu_path == NULL &&
|
||||
impl->application.menubar_path == NULL &&
|
||||
impl->application.window_object_path == NULL &&
|
||||
impl->application.application_object_path == NULL &&
|
||||
impl->application.unique_bus_name == NULL)
|
||||
return;
|
||||
|
||||
if (impl->gtk_surface == NULL)
|
||||
{
|
||||
if (impl->xdg_surface == NULL)
|
||||
return;
|
||||
|
||||
if (display_wayland->gtk_shell == NULL)
|
||||
return;
|
||||
|
||||
impl->gtk_surface = gtk_shell_get_gtk_surface (display_wayland->gtk_shell,
|
||||
impl->surface);
|
||||
}
|
||||
|
||||
gtk_surface_set_dbus_properties (impl->gtk_surface,
|
||||
impl->application.application_id,
|
||||
impl->application.app_menu_path,
|
||||
impl->application.menubar_path,
|
||||
impl->application.window_object_path,
|
||||
impl->application.application_object_path,
|
||||
impl->application.unique_bus_name);
|
||||
impl->application.was_set = TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
gdk_wayland_window_set_dbus_properties_libgtk_only (GdkWindow *window,
|
||||
const char *application_id,
|
||||
@@ -2484,21 +2417,29 @@ gdk_wayland_window_set_dbus_properties_libgtk_only (GdkWindow *window,
|
||||
const char *application_object_path,
|
||||
const char *unique_bus_name)
|
||||
{
|
||||
GdkWaylandDisplay *display_wayland =
|
||||
GDK_WAYLAND_DISPLAY (gdk_window_get_display (window));
|
||||
GdkWaylandDisplay *display = GDK_WAYLAND_DISPLAY (gdk_window_get_display (window));
|
||||
GdkWindowImplWayland *impl;
|
||||
|
||||
g_return_if_fail (GDK_IS_WAYLAND_WINDOW (window));
|
||||
|
||||
impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
|
||||
impl->application.application_id = g_strdup (application_id);
|
||||
impl->application.app_menu_path = g_strdup (app_menu_path);
|
||||
impl->application.menubar_path = g_strdup (menubar_path);
|
||||
impl->application.window_object_path = g_strdup (window_object_path);
|
||||
impl->application.application_object_path =
|
||||
g_strdup (application_object_path);
|
||||
impl->application.unique_bus_name = g_strdup (unique_bus_name);
|
||||
if (impl->gtk_surface == NULL)
|
||||
{
|
||||
if (impl->xdg_surface == NULL)
|
||||
return;
|
||||
|
||||
maybe_set_gtk_surface_dbus_properties (display_wayland, impl);
|
||||
if (display->gtk_shell == NULL)
|
||||
return;
|
||||
|
||||
impl->gtk_surface = gtk_shell_get_gtk_surface (display->gtk_shell, impl->surface);
|
||||
}
|
||||
|
||||
gtk_surface_set_dbus_properties (impl->gtk_surface,
|
||||
application_id,
|
||||
app_menu_path,
|
||||
menubar_path,
|
||||
window_object_path,
|
||||
application_object_path,
|
||||
unique_bus_name);
|
||||
}
|
||||
|
||||
@@ -1837,7 +1837,6 @@ gdk_event_translate (MSG *msg,
|
||||
RECT rect, *drag, orig_drag;
|
||||
POINT point;
|
||||
MINMAXINFO *mmi;
|
||||
LONG style;
|
||||
HWND hwnd;
|
||||
HCURSOR hcursor;
|
||||
BYTE key_state[256];
|
||||
@@ -3045,8 +3044,6 @@ gdk_event_translate (MSG *msg,
|
||||
mmi->ptMaxPosition.x, mmi->ptMaxPosition.y,
|
||||
mmi->ptMaxSize.x, mmi->ptMaxSize.y));
|
||||
|
||||
style = GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE);
|
||||
|
||||
if (impl->hint_flags & GDK_HINT_MIN_SIZE)
|
||||
{
|
||||
rect.left = rect.top = 0;
|
||||
@@ -3075,10 +3072,7 @@ gdk_event_translate (MSG *msg,
|
||||
mmi->ptMaxTrackSize.x = maxw > 0 && maxw < G_MAXSHORT ? maxw : G_MAXSHORT;
|
||||
mmi->ptMaxTrackSize.y = maxh > 0 && maxh < G_MAXSHORT ? maxh : G_MAXSHORT;
|
||||
}
|
||||
/* Assume that these styles are incompatible with CSD,
|
||||
* so there's no reason for us to override the defaults.
|
||||
*/
|
||||
else if ((style & (WS_BORDER | WS_THICKFRAME)) == 0)
|
||||
else
|
||||
{
|
||||
HMONITOR winmon;
|
||||
MONITORINFO moninfo;
|
||||
@@ -3091,8 +3085,6 @@ gdk_event_translate (MSG *msg,
|
||||
{
|
||||
mmi->ptMaxTrackSize.x = moninfo.rcWork.right - moninfo.rcWork.left;
|
||||
mmi->ptMaxTrackSize.y = moninfo.rcWork.bottom - moninfo.rcWork.top;
|
||||
mmi->ptMaxPosition.x = moninfo.rcWork.left;
|
||||
mmi->ptMaxPosition.y = moninfo.rcWork.top;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+10
-28
@@ -309,9 +309,9 @@ glx_pixmap_get (cairo_surface_t *surface, guint texture_target)
|
||||
{
|
||||
Display *display = cairo_xlib_surface_get_display (surface);
|
||||
Screen *screen = cairo_xlib_surface_get_screen (surface);
|
||||
Visual *visual = cairo_xlib_surface_get_visual (surface);
|
||||
Visual *visual = cairo_xlib_surface_get_visual (surface);;
|
||||
GdkGLXPixmap *glx_pixmap;
|
||||
GLXFBConfig *fbconfigs, config;
|
||||
GLXFBConfig *fbconfigs;
|
||||
int nfbconfigs;
|
||||
XVisualInfo *visinfo;
|
||||
VisualID visualid;
|
||||
@@ -393,7 +393,6 @@ glx_pixmap_get (cairo_surface_t *surface, guint texture_target)
|
||||
if (value == TRUE)
|
||||
y_inverted = TRUE;
|
||||
|
||||
config = fbconfigs[i];
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -408,7 +407,7 @@ glx_pixmap_get (cairo_surface_t *surface, guint texture_target)
|
||||
glx_pixmap = g_slice_new0 (GdkGLXPixmap);
|
||||
glx_pixmap->y_inverted = y_inverted;
|
||||
glx_pixmap->display = display;
|
||||
glx_pixmap->drawable = glXCreatePixmap (display, config,
|
||||
glx_pixmap->drawable = glXCreatePixmap (display, fbconfigs[i],
|
||||
cairo_xlib_surface_get_drawable (surface),
|
||||
pixmap_attributes);
|
||||
|
||||
@@ -433,11 +432,6 @@ gdk_x11_gl_context_texture_from_surface (GdkGLContext *paint_context,
|
||||
double sx, sy;
|
||||
float uscale, vscale;
|
||||
GdkTexturedQuad *quads;
|
||||
GdkX11Display *display_x11;
|
||||
|
||||
display_x11 = GDK_X11_DISPLAY (gdk_gl_context_get_display (paint_context));
|
||||
if (!display_x11->has_glx_texture_from_pixmap)
|
||||
return FALSE;
|
||||
|
||||
if (cairo_surface_get_type (surface) != CAIRO_SURFACE_TYPE_XLIB)
|
||||
return FALSE;
|
||||
@@ -467,6 +461,7 @@ gdk_x11_gl_context_texture_from_surface (GdkGLContext *paint_context,
|
||||
|
||||
glGenTextures (1, &texture_id);
|
||||
glBindTexture (target, texture_id);
|
||||
glEnable (target);
|
||||
|
||||
glTexParameteri (target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri (target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
@@ -531,6 +526,7 @@ gdk_x11_gl_context_texture_from_surface (GdkGLContext *paint_context,
|
||||
glXReleaseTexImageEXT (glx_pixmap->display, glx_pixmap->drawable,
|
||||
GLX_FRONT_LEFT_EXT);
|
||||
|
||||
glDisable (target);
|
||||
glDeleteTextures (1, &texture_id);
|
||||
|
||||
glx_pixmap_destroy(glx_pixmap);
|
||||
@@ -562,25 +558,17 @@ create_gl3_context (GdkDisplay *display,
|
||||
GLX_CONTEXT_FLAGS_ARB, flags,
|
||||
None,
|
||||
};
|
||||
GLXContext res;
|
||||
|
||||
GdkX11GLContext *share_x11 = NULL;
|
||||
|
||||
if (share != NULL)
|
||||
share_x11 = GDK_X11_GL_CONTEXT (share);
|
||||
|
||||
gdk_x11_display_error_trap_push (display);
|
||||
|
||||
res = glXCreateContextAttribsARB (gdk_x11_display_get_xdisplay (display),
|
||||
config,
|
||||
share_x11 != NULL ? share_x11->glx_context : NULL,
|
||||
True,
|
||||
attrib_list);
|
||||
|
||||
if (gdk_x11_display_error_trap_pop (display))
|
||||
return NULL;
|
||||
|
||||
return res;
|
||||
return glXCreateContextAttribsARB (gdk_x11_display_get_xdisplay (display),
|
||||
config,
|
||||
share_x11 != NULL ? share_x11->glx_context : NULL,
|
||||
True,
|
||||
attrib_list);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -1218,12 +1206,6 @@ gdk_x11_display_make_gl_context_current (GdkDisplay *display,
|
||||
}
|
||||
|
||||
context_x11 = GDK_X11_GL_CONTEXT (context);
|
||||
if (context_x11->glx_context == NULL)
|
||||
{
|
||||
g_critical ("No GLX context associated to the GdkGLContext; you must "
|
||||
"call gdk_gl_context_realize() first.");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
GDK_NOTE (OPENGL,
|
||||
g_print ("Making GLX context current to drawable %lu\n",
|
||||
|
||||
@@ -399,6 +399,7 @@ gtk_private_h_sources = \
|
||||
gtkcssmatcherprivate.h \
|
||||
gtkcssnodeprivate.h \
|
||||
gtkcssnodedeclarationprivate.h \
|
||||
gtkcssnodeutilsprivate.h \
|
||||
gtkcssnumbervalueprivate.h \
|
||||
gtkcssparserprivate.h \
|
||||
gtkcsspathnodeprivate.h \
|
||||
@@ -633,6 +634,7 @@ gtk_base_c_sources = \
|
||||
gtkcssmatcher.c \
|
||||
gtkcssnode.c \
|
||||
gtkcssnodedeclaration.c \
|
||||
gtkcssnodeutils.c \
|
||||
gtkcssnumbervalue.c \
|
||||
gtkcssparser.c \
|
||||
gtkcsspathnode.c \
|
||||
|
||||
@@ -138,7 +138,7 @@ gtk_boolean_cell_accessible_update_cache (GtkCellAccessible *cell)
|
||||
{
|
||||
boolean_cell->priv->cell_sensitive = !boolean_cell->priv->cell_sensitive;
|
||||
|
||||
atk_object_notify_state_change (ATK_OBJECT (cell), ATK_STATE_SENSITIVE, sensitive);
|
||||
atk_object_notify_state_change (ATK_OBJECT (cell), ATK_STATE_CHECKED, sensitive);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -136,7 +136,8 @@ gtk_text_cell_accessible_update_cache (GtkCellAccessible *cell)
|
||||
{
|
||||
GtkTextCellAccessible *text_cell = GTK_TEXT_CELL_ACCESSIBLE (cell);
|
||||
AtkObject *obj = ATK_OBJECT (cell);
|
||||
gint text_length;
|
||||
gboolean rv = FALSE;
|
||||
gint temp_length;
|
||||
gchar *text;
|
||||
GtkCellRenderer *renderer;
|
||||
|
||||
@@ -148,33 +149,48 @@ gtk_text_cell_accessible_update_cache (GtkCellAccessible *cell)
|
||||
g_object_get (renderer, "text", &text, NULL);
|
||||
g_object_unref (renderer);
|
||||
|
||||
if (text == NULL)
|
||||
text = g_strdup ("");
|
||||
text_length = g_utf8_strlen (text, -1);
|
||||
|
||||
if (g_strcmp0 (text_cell->priv->cell_text, text) != 0)
|
||||
if (text_cell->priv->cell_text)
|
||||
{
|
||||
if (text_cell->priv->cell_length)
|
||||
if (text == NULL || g_strcmp0 (text_cell->priv->cell_text, text) != 0)
|
||||
{
|
||||
g_signal_emit_by_name (cell, "text-changed::delete",
|
||||
0, text_cell->priv->cell_length);
|
||||
g_free (text_cell->priv->cell_text);
|
||||
temp_length = text_cell->priv->cell_length;
|
||||
text_cell->priv->cell_text = NULL;
|
||||
text_cell->priv->cell_length = 0;
|
||||
g_signal_emit_by_name (cell, "text-changed::delete", 0, temp_length);
|
||||
if (obj->name == NULL)
|
||||
g_object_notify (G_OBJECT (obj), "accessible-name");
|
||||
if (text)
|
||||
rv = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
rv = TRUE;
|
||||
|
||||
g_free (text_cell->priv->cell_text);
|
||||
text_cell->priv->cell_text = g_strdup (text);
|
||||
text_cell->priv->cell_length = text_length;
|
||||
|
||||
if (text_length)
|
||||
if (rv)
|
||||
{
|
||||
if (text == NULL)
|
||||
{
|
||||
g_signal_emit_by_name (cell, "text-changed::insert",
|
||||
0, text_cell->priv->cell_length);
|
||||
text_cell->priv->cell_text = g_strdup ("");
|
||||
text_cell->priv->cell_length = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
text_cell->priv->cell_text = g_strdup (text);
|
||||
text_cell->priv->cell_length = g_utf8_strlen (text, -1);
|
||||
}
|
||||
}
|
||||
|
||||
g_free (text);
|
||||
|
||||
if (rv)
|
||||
{
|
||||
g_signal_emit_by_name (cell, "text-changed::insert",
|
||||
0, text_cell->priv->cell_length);
|
||||
|
||||
if (obj->name == NULL)
|
||||
g_object_notify (G_OBJECT (obj), "accessible-name");
|
||||
}
|
||||
|
||||
g_free (text);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -509,11 +509,6 @@ gtk_text_view_accessible_get_character_extents (AtkText *text,
|
||||
GdkWindow *window;
|
||||
gint x_widget, y_widget, x_window, y_window;
|
||||
|
||||
*x = 0;
|
||||
*y = 0;
|
||||
*width = 0;
|
||||
*height = 0;
|
||||
|
||||
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
|
||||
if (widget == NULL)
|
||||
return;
|
||||
@@ -524,9 +519,6 @@ gtk_text_view_accessible_get_character_extents (AtkText *text,
|
||||
gtk_text_view_get_iter_location (view, &iter, &rectangle);
|
||||
|
||||
window = gtk_text_view_get_window (view, GTK_TEXT_WINDOW_WIDGET);
|
||||
if (window == NULL)
|
||||
return;
|
||||
|
||||
gdk_window_get_origin (window, &x_widget, &y_widget);
|
||||
|
||||
*height = rectangle.height;
|
||||
|
||||
@@ -1111,7 +1111,7 @@ gtk_font_selection_size_activate (GtkWidget *w,
|
||||
const gchar *text;
|
||||
|
||||
text = gtk_entry_get_text (GTK_ENTRY (priv->size_entry));
|
||||
new_size = (int) MAX (0.1, atof (text) * PANGO_SCALE + 0.5);
|
||||
new_size = MAX (0.1, atof (text) * PANGO_SCALE + 0.5);
|
||||
|
||||
if (priv->size != new_size)
|
||||
gtk_font_selection_set_size (fontsel, new_size);
|
||||
@@ -1130,7 +1130,7 @@ gtk_font_selection_size_focus_out (GtkWidget *w,
|
||||
const gchar *text;
|
||||
|
||||
text = gtk_entry_get_text (GTK_ENTRY (priv->size_entry));
|
||||
new_size = (int) MAX (0.1, atof (text) * PANGO_SCALE + 0.5);
|
||||
new_size = MAX (0.1, atof (text) * PANGO_SCALE + 0.5);
|
||||
|
||||
gtk_font_selection_set_size (fontsel, new_size);
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ struct _GtkHandleBoxPrivate
|
||||
{
|
||||
/* Properties */
|
||||
GtkPositionType handle_position;
|
||||
gint snap_edge;
|
||||
GtkPositionType snap_edge;
|
||||
GtkShadowType shadow_type;
|
||||
gboolean child_detached;
|
||||
/* Properties */
|
||||
@@ -1051,7 +1051,7 @@ gtk_handle_box_get_snap_edge (GtkHandleBox *handle_box)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_HANDLE_BOX (handle_box), (GtkPositionType)-1);
|
||||
|
||||
return (GtkPositionType)handle_box->priv->snap_edge;
|
||||
return handle_box->priv->snap_edge;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2945,17 +2945,17 @@ gtk_icon_factory_buildable_custom_tag_end (GtkBuildable *buildable,
|
||||
}
|
||||
if (source_data->icon_name)
|
||||
gtk_icon_source_set_icon_name (icon_source, source_data->icon_name);
|
||||
if ((gint)source_data->size != -1)
|
||||
if (source_data->size != -1)
|
||||
{
|
||||
gtk_icon_source_set_size (icon_source, source_data->size);
|
||||
gtk_icon_source_set_size_wildcarded (icon_source, FALSE);
|
||||
}
|
||||
if ((gint)source_data->direction != -1)
|
||||
if (source_data->direction != -1)
|
||||
{
|
||||
gtk_icon_source_set_direction (icon_source, source_data->direction);
|
||||
gtk_icon_source_set_direction_wildcarded (icon_source, FALSE);
|
||||
}
|
||||
if ((gint)source_data->state != -1)
|
||||
if (source_data->state != -1)
|
||||
{
|
||||
gtk_icon_source_set_state (icon_source, source_data->state);
|
||||
gtk_icon_source_set_state_wildcarded (icon_source, FALSE);
|
||||
|
||||
@@ -95,7 +95,7 @@ real_add (const GtkStockItem *items,
|
||||
gpointer old_key, old_value;
|
||||
const GtkStockItem *item = &items[i];
|
||||
|
||||
if (replace_primary && (guint)item->modifier == PRIMARY_MODIFIER)
|
||||
if (replace_primary && item->modifier == PRIMARY_MODIFIER)
|
||||
{
|
||||
item = gtk_stock_item_copy (item);
|
||||
((GtkStockItem *)item)->modifier = (NON_STATIC_MASK |
|
||||
|
||||
@@ -35,11 +35,9 @@ typedef struct
|
||||
G_DEFINE_TYPE (GtkApplicationImplWayland, gtk_application_impl_wayland, GTK_TYPE_APPLICATION_IMPL_DBUS)
|
||||
|
||||
static void
|
||||
gtk_application_impl_wayland_handle_window_realize (GtkApplicationImpl *impl,
|
||||
GtkWindow *window)
|
||||
gtk_application_impl_wayland_handle_window_map (GtkApplicationImpl *impl,
|
||||
GtkWindow *window)
|
||||
{
|
||||
GtkApplicationImplClass *impl_class =
|
||||
GTK_APPLICATION_IMPL_CLASS (gtk_application_impl_wayland_parent_class);
|
||||
GtkApplicationImplDBus *dbus = (GtkApplicationImplDBus *) impl;
|
||||
GdkWindow *gdk_window;
|
||||
gchar *window_path;
|
||||
@@ -56,8 +54,6 @@ gtk_application_impl_wayland_handle_window_realize (GtkApplicationImpl *impl,
|
||||
window_path, dbus->object_path, dbus->unique_name);
|
||||
|
||||
g_free (window_path);
|
||||
|
||||
impl_class->handle_window_realize (impl, window);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -70,6 +66,5 @@ gtk_application_impl_wayland_class_init (GtkApplicationImplWaylandClass *class)
|
||||
{
|
||||
GtkApplicationImplClass *impl_class = GTK_APPLICATION_IMPL_CLASS (class);
|
||||
|
||||
impl_class->handle_window_realize =
|
||||
gtk_application_impl_wayland_handle_window_realize;
|
||||
impl_class->handle_window_map = gtk_application_impl_wayland_handle_window_map;
|
||||
}
|
||||
|
||||
@@ -506,9 +506,7 @@ gtk_application_focus_in_event_cb (GtkWindow *window,
|
||||
priv->windows = g_list_concat (link, priv->windows);
|
||||
}
|
||||
|
||||
if (application->priv->impl)
|
||||
gtk_application_impl_active_window_changed (application->priv->impl, window);
|
||||
|
||||
gtk_application_impl_active_window_changed (application->priv->impl, window);
|
||||
g_object_notify (G_OBJECT (application), "active-window");
|
||||
|
||||
return FALSE;
|
||||
|
||||
+1
-1
@@ -1132,7 +1132,7 @@ gtk_button_box_size_allocate (GtkWidget *widget,
|
||||
|
||||
/**
|
||||
* gtk_button_box_new:
|
||||
* @orientation: the box's orientation.
|
||||
* @orientation: the box' orientation.
|
||||
*
|
||||
* Creates a new #GtkButtonBox.
|
||||
*
|
||||
|
||||
+113
-72
@@ -78,6 +78,7 @@
|
||||
#include "gtkbox.h"
|
||||
#include "gtkboxprivate.h"
|
||||
#include "gtkcssnodeprivate.h"
|
||||
#include "gtkcssnodeutilsprivate.h"
|
||||
#include "gtkintl.h"
|
||||
#include "gtkorientable.h"
|
||||
#include "gtkorientableprivate.h"
|
||||
@@ -436,14 +437,12 @@ static gboolean
|
||||
gtk_box_draw (GtkWidget *widget,
|
||||
cairo_t *cr)
|
||||
{
|
||||
GtkStyleContext *context;
|
||||
GtkAllocation alloc;
|
||||
|
||||
context = gtk_widget_get_style_context (widget);
|
||||
gtk_widget_get_allocation (widget, &alloc);
|
||||
|
||||
gtk_render_background (context, cr, 0, 0, alloc.width, alloc.height);
|
||||
gtk_render_frame (context, cr, 0, 0, alloc.width, alloc.height);
|
||||
gtk_css_node_draw (gtk_widget_get_css_node (widget),
|
||||
cr,
|
||||
gtk_widget_get_allocated_width (widget),
|
||||
gtk_widget_get_allocated_height (widget),
|
||||
NULL,
|
||||
widget);
|
||||
|
||||
return GTK_WIDGET_CLASS (gtk_box_parent_class)->draw (widget, cr);
|
||||
}
|
||||
@@ -473,9 +472,13 @@ count_expand_children (GtkBox *box,
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_box_size_allocate_no_center (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
gtk_box_size_allocate_no_center (GtkCssNode *cssnode,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (data);
|
||||
GtkBox *box = GTK_BOX (widget);
|
||||
GtkBoxPrivate *private = box->priv;
|
||||
GtkBoxChild *child;
|
||||
@@ -485,12 +488,12 @@ gtk_box_size_allocate_no_center (GtkWidget *widget,
|
||||
|
||||
GtkTextDirection direction;
|
||||
GtkAllocation child_allocation;
|
||||
GtkAllocation child_clip;
|
||||
GtkRequestedSize *sizes;
|
||||
gint child_minimum_baseline, child_natural_baseline;
|
||||
gint minimum_above, natural_above;
|
||||
gint minimum_below, natural_below;
|
||||
gboolean have_baseline;
|
||||
gint baseline;
|
||||
|
||||
GtkPackType packing;
|
||||
|
||||
@@ -500,8 +503,7 @@ gtk_box_size_allocate_no_center (GtkWidget *widget,
|
||||
gint x = 0, y = 0, i;
|
||||
gint child_size;
|
||||
|
||||
|
||||
gtk_widget_set_allocation (widget, allocation);
|
||||
*out_clip = *allocation;
|
||||
|
||||
count_expand_children (box, &nvis_children, &nexpand_children);
|
||||
|
||||
@@ -680,7 +682,6 @@ gtk_box_size_allocate_no_center (GtkWidget *widget,
|
||||
}
|
||||
}
|
||||
|
||||
baseline = gtk_widget_get_allocated_baseline (widget);
|
||||
if (baseline == -1 && have_baseline)
|
||||
{
|
||||
gint height = MAX (1, allocation->height);
|
||||
@@ -799,18 +800,21 @@ gtk_box_size_allocate_no_center (GtkWidget *widget,
|
||||
}
|
||||
}
|
||||
gtk_widget_size_allocate_with_baseline (child->widget, &child_allocation, baseline);
|
||||
|
||||
gtk_widget_get_clip (child->widget, &child_clip);
|
||||
gdk_rectangle_union (out_clip, out_clip, &child_clip);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
_gtk_widget_set_simple_clip (widget, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_box_size_allocate_with_center (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
gtk_box_size_allocate_with_center (GtkCssNode *cssnode,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (data);
|
||||
GtkBox *box = GTK_BOX (widget);
|
||||
GtkBoxPrivate *priv = box->priv;
|
||||
GtkBoxChild *child;
|
||||
@@ -818,14 +822,13 @@ gtk_box_size_allocate_with_center (GtkWidget *widget,
|
||||
gint nvis[2];
|
||||
gint nexp[2];
|
||||
GtkTextDirection direction;
|
||||
GtkAllocation child_allocation;
|
||||
GtkAllocation child_allocation, child_clip;
|
||||
GtkRequestedSize *sizes[2];
|
||||
GtkRequestedSize center_req;
|
||||
gint child_minimum_baseline, child_natural_baseline;
|
||||
gint minimum_above, natural_above;
|
||||
gint minimum_below, natural_below;
|
||||
gboolean have_baseline;
|
||||
gint baseline;
|
||||
gint idx[2];
|
||||
gint center_pos;
|
||||
gint center_size;
|
||||
@@ -839,8 +842,6 @@ gtk_box_size_allocate_with_center (GtkWidget *widget,
|
||||
gint x = 0, y = 0, i;
|
||||
gint child_size;
|
||||
|
||||
gtk_widget_set_allocation (widget, allocation);
|
||||
|
||||
nvis[0] = nvis[1] = 0;
|
||||
nexp[0] = nexp[1] = 0;
|
||||
for (children = priv->children; children; children = children->next)
|
||||
@@ -872,6 +873,8 @@ gtk_box_size_allocate_with_center (GtkWidget *widget,
|
||||
min_size[0] = nat_size[0] = nvis[0] * priv->spacing;
|
||||
min_size[1] = nat_size[1] = nvis[1] * priv->spacing;
|
||||
|
||||
*out_clip = *allocation;
|
||||
|
||||
/* Retrieve desired size for visible children. */
|
||||
idx[0] = idx[1] = 0;
|
||||
for (children = priv->children; children; children = children->next)
|
||||
@@ -1026,7 +1029,6 @@ gtk_box_size_allocate_with_center (GtkWidget *widget,
|
||||
}
|
||||
}
|
||||
|
||||
baseline = gtk_widget_get_allocated_baseline (widget);
|
||||
if (baseline == -1 && have_baseline)
|
||||
{
|
||||
gint height = MAX (1, allocation->height);
|
||||
@@ -1140,6 +1142,8 @@ gtk_box_size_allocate_with_center (GtkWidget *widget,
|
||||
}
|
||||
}
|
||||
gtk_widget_size_allocate_with_baseline (child->widget, &child_allocation, baseline);
|
||||
gtk_widget_get_clip (child->widget, &child_clip);
|
||||
gdk_rectangle_union (out_clip, out_clip, &child_clip);
|
||||
|
||||
i++;
|
||||
}
|
||||
@@ -1171,9 +1175,10 @@ gtk_box_size_allocate_with_center (GtkWidget *widget,
|
||||
child_allocation.y = center_pos;
|
||||
child_allocation.height = center_size;
|
||||
}
|
||||
gtk_widget_size_allocate_with_baseline (priv->center->widget, &child_allocation, baseline);
|
||||
|
||||
_gtk_widget_set_simple_clip (widget, NULL);
|
||||
gtk_widget_size_allocate_with_baseline (priv->center->widget, &child_allocation, baseline);
|
||||
gtk_widget_get_clip (priv->center->widget, &child_clip);
|
||||
gdk_rectangle_union (out_clip, out_clip, &child_clip);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1181,12 +1186,20 @@ gtk_box_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
GtkBox *box = GTK_BOX (widget);
|
||||
GtkAllocation clip;
|
||||
|
||||
if (box->priv->center &&
|
||||
gtk_widget_get_visible (box->priv->center->widget))
|
||||
gtk_box_size_allocate_with_center (widget, allocation);
|
||||
else
|
||||
gtk_box_size_allocate_no_center (widget, allocation);
|
||||
gtk_widget_set_allocation (widget, allocation);
|
||||
|
||||
gtk_css_node_allocate (gtk_widget_get_css_node (widget),
|
||||
allocation,
|
||||
gtk_widget_get_allocated_baseline (widget),
|
||||
&clip,
|
||||
box->priv->center && gtk_widget_get_visible (box->priv->center->widget)
|
||||
? gtk_box_size_allocate_with_center
|
||||
: gtk_box_size_allocate_no_center,
|
||||
box);
|
||||
|
||||
gtk_widget_set_clip (widget, &clip);
|
||||
}
|
||||
|
||||
static GType
|
||||
@@ -1666,22 +1679,6 @@ gtk_box_get_size (GtkWidget *widget,
|
||||
*natural_baseline = nat_baseline;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_box_get_preferred_width (GtkWidget *widget,
|
||||
gint *minimum_size,
|
||||
gint *natural_size)
|
||||
{
|
||||
gtk_box_get_size (widget, GTK_ORIENTATION_HORIZONTAL, minimum_size, natural_size, NULL, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_box_get_preferred_height (GtkWidget *widget,
|
||||
gint *minimum_size,
|
||||
gint *natural_size)
|
||||
{
|
||||
gtk_box_get_size (widget, GTK_ORIENTATION_VERTICAL, minimum_size, natural_size, NULL, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_box_compute_size_for_opposing_orientation (GtkBox *box,
|
||||
gint avail_size,
|
||||
@@ -1965,19 +1962,74 @@ gtk_box_compute_size_for_orientation (GtkBox *box,
|
||||
*natural_size = required_natural;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_box_get_preferred_size (GtkCssNode *cssnode,
|
||||
GtkOrientation orientation,
|
||||
gint for_size,
|
||||
gint *minimum,
|
||||
gint *natural,
|
||||
gint *minimum_baseline,
|
||||
gint *natural_baseline,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget = data;
|
||||
GtkBox *box = GTK_BOX (widget);
|
||||
GtkBoxPrivate *priv = box->priv;
|
||||
|
||||
if (for_size < 0)
|
||||
{
|
||||
gtk_box_get_size (widget, orientation, minimum, natural, minimum_baseline, natural_baseline);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (priv->orientation == orientation)
|
||||
gtk_box_compute_size_for_orientation (box, for_size, minimum, natural);
|
||||
else
|
||||
gtk_box_compute_size_for_opposing_orientation (box, for_size, minimum, natural, minimum_baseline, natural_baseline);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_box_get_preferred_width (GtkWidget *widget,
|
||||
gint *minimum_size,
|
||||
gint *natural_size)
|
||||
{
|
||||
gtk_css_node_get_preferred_size (gtk_widget_get_css_node (widget),
|
||||
GTK_ORIENTATION_HORIZONTAL,
|
||||
-1,
|
||||
minimum_size, natural_size,
|
||||
NULL, NULL,
|
||||
gtk_box_get_preferred_size,
|
||||
widget);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_box_get_preferred_height (GtkWidget *widget,
|
||||
gint *minimum_size,
|
||||
gint *natural_size)
|
||||
{
|
||||
gtk_css_node_get_preferred_size (gtk_widget_get_css_node (widget),
|
||||
GTK_ORIENTATION_VERTICAL,
|
||||
-1,
|
||||
minimum_size, natural_size,
|
||||
NULL, NULL,
|
||||
gtk_box_get_preferred_size,
|
||||
widget);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_box_get_preferred_width_for_height (GtkWidget *widget,
|
||||
gint height,
|
||||
gint *minimum_width,
|
||||
gint *natural_width)
|
||||
{
|
||||
GtkBox *box = GTK_BOX (widget);
|
||||
GtkBoxPrivate *private = box->priv;
|
||||
|
||||
if (private->orientation == GTK_ORIENTATION_VERTICAL)
|
||||
gtk_box_compute_size_for_opposing_orientation (box, height, minimum_width, natural_width, NULL, NULL);
|
||||
else
|
||||
gtk_box_compute_size_for_orientation (box, height, minimum_width, natural_width);
|
||||
gtk_css_node_get_preferred_size (gtk_widget_get_css_node (widget),
|
||||
GTK_ORIENTATION_HORIZONTAL,
|
||||
height,
|
||||
minimum_width, natural_width,
|
||||
NULL, NULL,
|
||||
gtk_box_get_preferred_size,
|
||||
widget);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1988,24 +2040,13 @@ gtk_box_get_preferred_height_and_baseline_for_width (GtkWidget *widget,
|
||||
gint *minimum_baseline,
|
||||
gint *natural_baseline)
|
||||
{
|
||||
GtkBox *box = GTK_BOX (widget);
|
||||
GtkBoxPrivate *private = box->priv;
|
||||
|
||||
if (width < 0)
|
||||
gtk_box_get_size (widget, GTK_ORIENTATION_VERTICAL, minimum_height, natural_height, minimum_baseline, natural_baseline);
|
||||
else
|
||||
{
|
||||
if (private->orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
gtk_box_compute_size_for_opposing_orientation (box, width, minimum_height, natural_height, minimum_baseline, natural_baseline);
|
||||
else
|
||||
{
|
||||
if (minimum_baseline)
|
||||
*minimum_baseline = -1;
|
||||
if (natural_baseline)
|
||||
*natural_baseline = -1;
|
||||
gtk_box_compute_size_for_orientation (box, width, minimum_height, natural_height);
|
||||
}
|
||||
}
|
||||
gtk_css_node_get_preferred_size (gtk_widget_get_css_node (widget),
|
||||
GTK_ORIENTATION_VERTICAL,
|
||||
width,
|
||||
minimum_height, natural_height,
|
||||
minimum_baseline, natural_baseline,
|
||||
gtk_box_get_preferred_size,
|
||||
widget);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
+43
-84
@@ -25,32 +25,6 @@
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
* Gets the size for a single box blur.
|
||||
*
|
||||
* Much of this, the 3 * sqrt(2 * pi) / 4, is the known value for
|
||||
* approximating a Gaussian using box blurs. This yields quite a good
|
||||
* approximation for a Gaussian. For more details, see:
|
||||
* http://www.w3.org/TR/SVG11/filters.html#feGaussianBlurElement
|
||||
* https://bugzilla.mozilla.org/show_bug.cgi?id=590039#c19
|
||||
*/
|
||||
#define GAUSSIAN_SCALE_FACTOR ((3.0 * sqrt(2 * G_PI) / 4))
|
||||
|
||||
#define get_box_filter_size(radius) ((int)(GAUSSIAN_SCALE_FACTOR * (radius)))
|
||||
|
||||
/* Sadly, clang is picky about get_box_filter_size(2) not being a
|
||||
* constant expression, thus we have to use precomputed values.
|
||||
*/
|
||||
#define BOX_FILTER_SIZE_2 3
|
||||
#define BOX_FILTER_SIZE_3 5
|
||||
#define BOX_FILTER_SIZE_4 7
|
||||
#define BOX_FILTER_SIZE_5 9
|
||||
#define BOX_FILTER_SIZE_6 11
|
||||
#define BOX_FILTER_SIZE_7 13
|
||||
#define BOX_FILTER_SIZE_8 15
|
||||
#define BOX_FILTER_SIZE_9 16
|
||||
#define BOX_FILTER_SIZE_10 18
|
||||
|
||||
/* This applies a single box blur pass to a horizontal range of pixels;
|
||||
* since the box blur has the same weight for all pixels, we can
|
||||
* implement an efficient sliding window algorithm where we add
|
||||
@@ -86,37 +60,18 @@ blur_xspan (guchar *row,
|
||||
* only divide down after all three passes. (SSE parallel implementation
|
||||
* of the divide step is possible.)
|
||||
*/
|
||||
|
||||
#define BLUR_ROW_KERNEL(D) \
|
||||
for (i = -(D) + offset; i < row_width + offset; i++) \
|
||||
{ \
|
||||
if (i >= 0 && i < row_width) \
|
||||
sum += row[i]; \
|
||||
\
|
||||
if (i >= offset) \
|
||||
{ \
|
||||
if (i >= (D)) \
|
||||
sum -= row[i - (D)]; \
|
||||
\
|
||||
tmp_buffer[i - offset] = (sum + (D) / 2) / (D); \
|
||||
} \
|
||||
} \
|
||||
break;
|
||||
|
||||
/* We unroll the values for d for radius 2-10 to avoid a generic
|
||||
* divide operation (not radius 1, because its a no-op) */
|
||||
switch (d)
|
||||
for (i = -d + offset; i < row_width + offset; i++)
|
||||
{
|
||||
case BOX_FILTER_SIZE_2: BLUR_ROW_KERNEL (BOX_FILTER_SIZE_2);
|
||||
case BOX_FILTER_SIZE_3: BLUR_ROW_KERNEL (BOX_FILTER_SIZE_3);
|
||||
case BOX_FILTER_SIZE_4: BLUR_ROW_KERNEL (BOX_FILTER_SIZE_4);
|
||||
case BOX_FILTER_SIZE_5: BLUR_ROW_KERNEL (BOX_FILTER_SIZE_5);
|
||||
case BOX_FILTER_SIZE_6: BLUR_ROW_KERNEL (BOX_FILTER_SIZE_6);
|
||||
case BOX_FILTER_SIZE_7: BLUR_ROW_KERNEL (BOX_FILTER_SIZE_7);
|
||||
case BOX_FILTER_SIZE_8: BLUR_ROW_KERNEL (BOX_FILTER_SIZE_8);
|
||||
case BOX_FILTER_SIZE_9: BLUR_ROW_KERNEL (BOX_FILTER_SIZE_9);
|
||||
case BOX_FILTER_SIZE_10: BLUR_ROW_KERNEL (BOX_FILTER_SIZE_10);
|
||||
default: BLUR_ROW_KERNEL (d);
|
||||
if (i >= 0 && i < row_width)
|
||||
sum += row[i];
|
||||
|
||||
if (i >= offset)
|
||||
{
|
||||
if (i >= d)
|
||||
sum -= row[i - d];
|
||||
|
||||
tmp_buffer[i - offset] = (sum + d / 2) / d;
|
||||
}
|
||||
}
|
||||
|
||||
memcpy (row, tmp_buffer, row_width);
|
||||
@@ -185,35 +140,45 @@ flip_buffer (guchar *dst_buffer,
|
||||
#undef BLOCK_SIZE
|
||||
}
|
||||
|
||||
/*
|
||||
* Gets the size for a single box blur.
|
||||
*
|
||||
* Much of this, the 3 * sqrt(2 * pi) / 4, is the known value for
|
||||
* approximating a Gaussian using box blurs. This yields quite a good
|
||||
* approximation for a Gaussian. For more details, see:
|
||||
* http://www.w3.org/TR/SVG11/filters.html#feGaussianBlurElement
|
||||
* https://bugzilla.mozilla.org/show_bug.cgi?id=590039#c19
|
||||
*/
|
||||
#define GAUSSIAN_SCALE_FACTOR ((3.0 * sqrt(2 * G_PI) / 4))
|
||||
|
||||
static int
|
||||
get_box_filter_size (double radius)
|
||||
{
|
||||
return GAUSSIAN_SCALE_FACTOR * radius;
|
||||
}
|
||||
|
||||
static void
|
||||
_boxblur (guchar *buffer,
|
||||
int width,
|
||||
int height,
|
||||
int radius,
|
||||
GtkBlurFlags flags)
|
||||
_boxblur (guchar *buffer,
|
||||
int width,
|
||||
int height,
|
||||
int radius)
|
||||
{
|
||||
guchar *flipped_buffer;
|
||||
int d = get_box_filter_size (radius);
|
||||
|
||||
flipped_buffer = g_malloc (width * height);
|
||||
|
||||
if (flags & GTK_BLUR_Y)
|
||||
{
|
||||
/* Step 1: swap rows and columns */
|
||||
flip_buffer (flipped_buffer, buffer, width, height);
|
||||
/* Step 1: swap rows and columns */
|
||||
flip_buffer (flipped_buffer, buffer, width, height);
|
||||
|
||||
/* Step 2: blur rows (really columns) */
|
||||
blur_rows (flipped_buffer, buffer, height, width, d);
|
||||
/* Step 2: blur rows (really columns) */
|
||||
blur_rows (flipped_buffer, buffer, height, width, d);
|
||||
|
||||
/* Step 3: swap rows and columns */
|
||||
flip_buffer (buffer, flipped_buffer, height, width);
|
||||
}
|
||||
/* Step 3: swap rows and columns */
|
||||
flip_buffer (buffer, flipped_buffer, height, width);
|
||||
|
||||
if (flags & GTK_BLUR_X)
|
||||
{
|
||||
/* Step 4: blur rows */
|
||||
blur_rows (buffer, flipped_buffer, width, height, d);
|
||||
}
|
||||
/* Step 4: blur rows */
|
||||
blur_rows (buffer, flipped_buffer, width, height, d);
|
||||
|
||||
g_free (flipped_buffer);
|
||||
}
|
||||
@@ -227,8 +192,7 @@ _boxblur (guchar *buffer,
|
||||
*/
|
||||
void
|
||||
_gtk_cairo_blur_surface (cairo_surface_t* surface,
|
||||
double radius_d,
|
||||
GtkBlurFlags flags)
|
||||
double radius_d)
|
||||
{
|
||||
int radius = radius_d;
|
||||
|
||||
@@ -236,12 +200,7 @@ _gtk_cairo_blur_surface (cairo_surface_t* surface,
|
||||
g_return_if_fail (cairo_surface_get_type (surface) == CAIRO_SURFACE_TYPE_IMAGE);
|
||||
g_return_if_fail (cairo_image_surface_get_format (surface) == CAIRO_FORMAT_A8);
|
||||
|
||||
/* The code doesn't actually do any blurring for radius 1, as it
|
||||
* ends up with box filter size 1 */
|
||||
if (radius <= 1)
|
||||
return;
|
||||
|
||||
if ((flags & (GTK_BLUR_X|GTK_BLUR_Y)) == 0)
|
||||
if (radius == 0)
|
||||
return;
|
||||
|
||||
/* Before we mess with the surface, execute any pending drawing. */
|
||||
@@ -250,7 +209,7 @@ _gtk_cairo_blur_surface (cairo_surface_t* surface,
|
||||
_boxblur (cairo_image_surface_get_data (surface),
|
||||
cairo_image_surface_get_stride (surface),
|
||||
cairo_image_surface_get_height (surface),
|
||||
radius, flags);
|
||||
radius);
|
||||
|
||||
/* Inform cairo we altered the surface contents. */
|
||||
cairo_surface_mark_dirty (surface);
|
||||
|
||||
@@ -29,16 +29,8 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef enum {
|
||||
GTK_BLUR_NONE = 0,
|
||||
GTK_BLUR_X = 1<<0,
|
||||
GTK_BLUR_Y = 1<<1,
|
||||
GTK_BLUR_REPEAT = 1<<2
|
||||
} GtkBlurFlags;
|
||||
|
||||
void _gtk_cairo_blur_surface (cairo_surface_t *surface,
|
||||
double radius,
|
||||
GtkBlurFlags flags);;
|
||||
double radius);
|
||||
int _gtk_cairo_blur_compute_pixels (double radius);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@@ -333,7 +333,7 @@ static GtkCssValue font_variant_values[] = {
|
||||
GtkCssValue *
|
||||
_gtk_css_font_variant_value_new (PangoVariant font_variant)
|
||||
{
|
||||
g_return_val_if_fail ((gint)font_variant < G_N_ELEMENTS (font_variant_values), NULL);
|
||||
g_return_val_if_fail (font_variant < G_N_ELEMENTS (font_variant_values), NULL);
|
||||
|
||||
return _gtk_css_value_ref (&font_variant_values[font_variant]);
|
||||
}
|
||||
|
||||
+1
-1
@@ -306,7 +306,7 @@ static gboolean
|
||||
gtk_css_matcher_node_has_class (const GtkCssMatcher *matcher,
|
||||
GQuark class_name)
|
||||
{
|
||||
return gtk_css_node_has_class (matcher->node.node, class_name);
|
||||
return gtk_css_node_has_qclass (matcher->node.node, class_name);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
||||
+68
-8
@@ -579,6 +579,12 @@ gtk_css_node_init (GtkCssNode *cssnode)
|
||||
cssnode->visible = TRUE;
|
||||
}
|
||||
|
||||
GtkCssNode *
|
||||
gtk_css_node_new (void)
|
||||
{
|
||||
return g_object_new (GTK_TYPE_CSS_NODE, NULL);
|
||||
}
|
||||
|
||||
static GdkFrameClock *
|
||||
gtk_css_node_get_frame_clock_or_null (GtkCssNode *cssnode)
|
||||
{
|
||||
@@ -944,6 +950,22 @@ gtk_css_node_get_state (GtkCssNode *cssnode)
|
||||
return gtk_css_node_declaration_get_state (cssnode->decl);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_css_node_add_state (GtkCssNode *cssnode,
|
||||
GtkStateFlags state_flags)
|
||||
{
|
||||
gtk_css_node_set_state (cssnode,
|
||||
gtk_css_node_get_state (cssnode) | state_flags);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_css_node_remove_state (GtkCssNode *cssnode,
|
||||
GtkStateFlags state_flags)
|
||||
{
|
||||
gtk_css_node_set_state (cssnode,
|
||||
gtk_css_node_get_state (cssnode) & ~state_flags);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_css_node_set_junction_sides (GtkCssNode *cssnode,
|
||||
GtkJunctionSides junction_sides)
|
||||
@@ -966,7 +988,7 @@ gtk_css_node_clear_classes (GtkCssNode *cssnode)
|
||||
|
||||
for (l = list; l; l = l->next)
|
||||
{
|
||||
gtk_css_node_remove_class (cssnode, GPOINTER_TO_UINT (l->data));
|
||||
gtk_css_node_remove_class (cssnode, l->data);
|
||||
}
|
||||
|
||||
g_list_free (list);
|
||||
@@ -986,7 +1008,7 @@ gtk_css_node_set_classes (GtkCssNode *cssnode,
|
||||
{
|
||||
for (i = 0; classes[i] != NULL; i++)
|
||||
{
|
||||
gtk_css_node_add_class (cssnode, g_quark_from_string (classes[i]));
|
||||
gtk_css_node_add_class (cssnode, classes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1016,9 +1038,13 @@ gtk_css_node_get_classes (GtkCssNode *cssnode)
|
||||
|
||||
void
|
||||
gtk_css_node_add_class (GtkCssNode *cssnode,
|
||||
GQuark style_class)
|
||||
const char *style_class)
|
||||
{
|
||||
if (gtk_css_node_declaration_add_class (&cssnode->decl, style_class))
|
||||
GQuark class_quark;
|
||||
|
||||
class_quark = g_quark_from_string (style_class);
|
||||
|
||||
if (gtk_css_node_declaration_add_class (&cssnode->decl, class_quark))
|
||||
{
|
||||
gtk_css_node_invalidate (cssnode, GTK_CSS_CHANGE_CLASS);
|
||||
g_object_notify_by_pspec (G_OBJECT (cssnode), cssnode_properties[PROP_CLASSES]);
|
||||
@@ -1027,9 +1053,15 @@ gtk_css_node_add_class (GtkCssNode *cssnode,
|
||||
|
||||
void
|
||||
gtk_css_node_remove_class (GtkCssNode *cssnode,
|
||||
GQuark style_class)
|
||||
const char *style_class)
|
||||
{
|
||||
if (gtk_css_node_declaration_remove_class (&cssnode->decl, style_class))
|
||||
GQuark class_quark;
|
||||
|
||||
class_quark = g_quark_try_string (style_class);
|
||||
if (class_quark == 0)
|
||||
return;
|
||||
|
||||
if (gtk_css_node_declaration_remove_class (&cssnode->decl, class_quark))
|
||||
{
|
||||
gtk_css_node_invalidate (cssnode, GTK_CSS_CHANGE_CLASS);
|
||||
g_object_notify_by_pspec (G_OBJECT (cssnode), cssnode_properties[PROP_CLASSES]);
|
||||
@@ -1038,15 +1070,43 @@ gtk_css_node_remove_class (GtkCssNode *cssnode,
|
||||
|
||||
gboolean
|
||||
gtk_css_node_has_class (GtkCssNode *cssnode,
|
||||
GQuark style_class)
|
||||
const char *style_class)
|
||||
{
|
||||
GQuark class_quark;
|
||||
|
||||
class_quark = g_quark_try_string (style_class);
|
||||
if (class_quark == 0)
|
||||
return FALSE;
|
||||
|
||||
return gtk_css_node_has_qclass (cssnode, class_quark);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gtk_css_node_has_qclass (GtkCssNode *cssnode,
|
||||
GQuark style_class)
|
||||
{
|
||||
return gtk_css_node_declaration_has_class (cssnode->decl, style_class);
|
||||
}
|
||||
|
||||
static void
|
||||
quarks_to_strings (GList *list)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
for (l = list; l; l = l->next)
|
||||
{
|
||||
l->data = (char *) g_quark_to_string (GPOINTER_TO_UINT (l->data));
|
||||
}
|
||||
}
|
||||
|
||||
GList *
|
||||
gtk_css_node_list_classes (GtkCssNode *cssnode)
|
||||
{
|
||||
return gtk_css_node_declaration_list_classes (cssnode->decl);
|
||||
GList *list = gtk_css_node_declaration_list_classes (cssnode->decl);
|
||||
|
||||
quarks_to_strings (list);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
+10
-2
@@ -95,6 +95,8 @@ struct _GtkCssNodeClass
|
||||
|
||||
GType gtk_css_node_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GtkCssNode * gtk_css_node_new (void);
|
||||
|
||||
void gtk_css_node_set_parent (GtkCssNode *cssnode,
|
||||
GtkCssNode *parent);
|
||||
void gtk_css_node_set_after (GtkCssNode *cssnode,
|
||||
@@ -120,6 +122,10 @@ const char * gtk_css_node_get_id (GtkCssNode *
|
||||
void gtk_css_node_set_state (GtkCssNode *cssnode,
|
||||
GtkStateFlags state_flags);
|
||||
GtkStateFlags gtk_css_node_get_state (GtkCssNode *cssnode);
|
||||
void gtk_css_node_add_state (GtkCssNode *cssnode,
|
||||
GtkStateFlags state_flags);
|
||||
void gtk_css_node_remove_state (GtkCssNode *cssnode,
|
||||
GtkStateFlags state_flags);
|
||||
void gtk_css_node_set_junction_sides (GtkCssNode *cssnode,
|
||||
GtkJunctionSides junction_sides);
|
||||
GtkJunctionSides gtk_css_node_get_junction_sides (GtkCssNode *cssnode);
|
||||
@@ -127,10 +133,12 @@ void gtk_css_node_set_classes (GtkCssNode *
|
||||
const char **classes);
|
||||
char ** gtk_css_node_get_classes (GtkCssNode *cssnode);
|
||||
void gtk_css_node_add_class (GtkCssNode *cssnode,
|
||||
GQuark style_class);
|
||||
const char *style_class);
|
||||
void gtk_css_node_remove_class (GtkCssNode *cssnode,
|
||||
GQuark style_class);
|
||||
const char *style_class);
|
||||
gboolean gtk_css_node_has_class (GtkCssNode *cssnode,
|
||||
const char *style_class);
|
||||
gboolean gtk_css_node_has_qclass (GtkCssNode *cssnode,
|
||||
GQuark style_class);
|
||||
GList * gtk_css_node_list_classes (GtkCssNode *cssnode);
|
||||
void gtk_css_node_add_region (GtkCssNode *cssnode,
|
||||
|
||||
@@ -0,0 +1,300 @@
|
||||
/* GTK - The GIMP Toolkit
|
||||
* Copyright (C) 2014 Benjamin Otte <otte@gnome.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "gtkcssnodeutilsprivate.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "gtkcssnumbervalueprivate.h"
|
||||
#include "gtkcssshadowsvalueprivate.h"
|
||||
#include "gtkcssstyleprivate.h"
|
||||
#include "gtkcssstylepropertyprivate.h"
|
||||
#include "gtkrenderbackgroundprivate.h"
|
||||
#include "gtkrenderborderprivate.h"
|
||||
|
||||
void
|
||||
gtk_css_node_style_changed_for_widget (GtkCssNode *node,
|
||||
GtkCssStyle *old_style,
|
||||
GtkCssStyle *new_style,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
static GtkBitmask *affects_size = NULL;
|
||||
GtkBitmask *changes;
|
||||
|
||||
changes = gtk_css_style_get_difference (old_style, new_style);
|
||||
|
||||
if (G_UNLIKELY (affects_size == NULL))
|
||||
affects_size = _gtk_css_style_property_get_mask_affecting (GTK_CSS_AFFECTS_SIZE | GTK_CSS_AFFECTS_CLIP);
|
||||
|
||||
if (_gtk_bitmask_intersects (changes, affects_size))
|
||||
gtk_widget_queue_resize (widget);
|
||||
else
|
||||
gtk_widget_queue_draw (widget);
|
||||
|
||||
_gtk_bitmask_free (changes);
|
||||
}
|
||||
|
||||
static gint
|
||||
get_number (GtkCssStyle *style,
|
||||
guint property)
|
||||
{
|
||||
double d = _gtk_css_number_value_get (gtk_css_style_get_value (style, property), 100);
|
||||
|
||||
if (d < 1)
|
||||
return ceil (d);
|
||||
else
|
||||
return floor (d);
|
||||
}
|
||||
|
||||
static void
|
||||
get_box_margin (GtkCssStyle *style,
|
||||
GtkBorder *margin)
|
||||
{
|
||||
margin->top = get_number (style, GTK_CSS_PROPERTY_MARGIN_TOP);
|
||||
margin->left = get_number (style, GTK_CSS_PROPERTY_MARGIN_LEFT);
|
||||
margin->bottom = get_number (style, GTK_CSS_PROPERTY_MARGIN_BOTTOM);
|
||||
margin->right = get_number (style, GTK_CSS_PROPERTY_MARGIN_RIGHT);
|
||||
}
|
||||
|
||||
static void
|
||||
get_box_border (GtkCssStyle *style,
|
||||
GtkBorder *border)
|
||||
{
|
||||
border->top = get_number (style, GTK_CSS_PROPERTY_BORDER_TOP_WIDTH);
|
||||
border->left = get_number (style, GTK_CSS_PROPERTY_BORDER_LEFT_WIDTH);
|
||||
border->bottom = get_number (style, GTK_CSS_PROPERTY_BORDER_BOTTOM_WIDTH);
|
||||
border->right = get_number (style, GTK_CSS_PROPERTY_BORDER_RIGHT_WIDTH);
|
||||
}
|
||||
|
||||
static void
|
||||
get_box_padding (GtkCssStyle *style,
|
||||
GtkBorder *border)
|
||||
{
|
||||
border->top = get_number (style, GTK_CSS_PROPERTY_PADDING_TOP);
|
||||
border->left = get_number (style, GTK_CSS_PROPERTY_PADDING_LEFT);
|
||||
border->bottom = get_number (style, GTK_CSS_PROPERTY_PADDING_BOTTOM);
|
||||
border->right = get_number (style, GTK_CSS_PROPERTY_PADDING_RIGHT);
|
||||
}
|
||||
|
||||
static void
|
||||
get_content_size_func_default (GtkCssNode *cssnode,
|
||||
GtkOrientation orientation,
|
||||
gint for_size,
|
||||
gint *minimum,
|
||||
gint *natural,
|
||||
gint *minimum_baseline,
|
||||
gint *natural_baseline,
|
||||
gpointer unused)
|
||||
{
|
||||
*minimum = 0;
|
||||
*natural = 0;
|
||||
|
||||
if (minimum_baseline)
|
||||
*minimum_baseline = 0;
|
||||
if (natural_baseline)
|
||||
*natural_baseline = 0;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_css_node_get_preferred_size (GtkCssNode *cssnode,
|
||||
GtkOrientation orientation,
|
||||
gint for_size,
|
||||
gint *minimum,
|
||||
gint *natural,
|
||||
gint *minimum_baseline,
|
||||
gint *natural_baseline,
|
||||
GtkCssNodeSizeFunc get_content_size_func,
|
||||
gpointer get_content_size_data)
|
||||
{
|
||||
GtkCssStyle *style;
|
||||
GtkBorder margin, border, padding;
|
||||
int min_size, extra_size, extra_opposite, extra_baseline;
|
||||
|
||||
if (!get_content_size_func)
|
||||
get_content_size_func = get_content_size_func_default;
|
||||
style = gtk_css_node_get_style (cssnode);
|
||||
get_box_margin (style, &margin);
|
||||
get_box_border (style, &border);
|
||||
get_box_padding (style, &padding);
|
||||
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
{
|
||||
extra_size = margin.left + margin.right + border.left + border.right + padding.left + padding.right;
|
||||
extra_opposite = margin.top + margin.bottom + border.top + border.bottom + padding.top + padding.bottom;
|
||||
extra_baseline = margin.left + border.left + padding.left;
|
||||
min_size = get_number (style, GTK_CSS_PROPERTY_MIN_WIDTH);
|
||||
}
|
||||
else
|
||||
{
|
||||
extra_size = margin.top + margin.bottom + border.top + border.bottom + padding.top + padding.bottom;
|
||||
extra_opposite = margin.left + margin.right + border.left + border.right + padding.left + padding.right;
|
||||
extra_baseline = margin.top + border.top + padding.top;
|
||||
min_size = get_number (style, GTK_CSS_PROPERTY_MIN_HEIGHT);
|
||||
}
|
||||
|
||||
if (for_size > -1)
|
||||
for_size -= extra_opposite;
|
||||
|
||||
if (minimum_baseline)
|
||||
*minimum_baseline = -1;
|
||||
if (natural_baseline)
|
||||
*natural_baseline = -1;
|
||||
|
||||
get_content_size_func (cssnode,
|
||||
orientation,
|
||||
for_size,
|
||||
minimum, natural,
|
||||
minimum_baseline, natural_baseline,
|
||||
get_content_size_data);
|
||||
|
||||
g_warn_if_fail (*minimum <= *natural);
|
||||
|
||||
*minimum = MAX (min_size, *minimum);
|
||||
*natural = MAX (min_size, *natural);
|
||||
|
||||
*minimum += extra_size;
|
||||
*natural += extra_size;
|
||||
|
||||
if (minimum_baseline && *minimum_baseline > -1)
|
||||
*minimum_baseline += extra_baseline;
|
||||
if (natural_baseline && *natural_baseline > -1)
|
||||
*natural_baseline += extra_baseline;
|
||||
}
|
||||
|
||||
static void
|
||||
allocate_func_default (GtkCssNode *cssnode,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip,
|
||||
gpointer unused)
|
||||
{
|
||||
*out_clip = *allocation;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_css_node_allocate (GtkCssNode *cssnode,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip,
|
||||
GtkCssNodeAllocateFunc allocate_func,
|
||||
gpointer allocate_data)
|
||||
{
|
||||
GtkAllocation content_allocation, clip;
|
||||
GtkBorder margin, border, padding, shadow, extents;
|
||||
GtkCssStyle *style;
|
||||
|
||||
if (out_clip == NULL)
|
||||
out_clip = &clip;
|
||||
if (!allocate_func)
|
||||
allocate_func = allocate_func_default;
|
||||
style = gtk_css_node_get_style (cssnode);
|
||||
get_box_margin (style, &margin);
|
||||
get_box_border (style, &border);
|
||||
get_box_padding (style, &padding);
|
||||
extents.top = margin.top + border.top + padding.top;
|
||||
extents.right = margin.right + border.right + padding.right;
|
||||
extents.bottom = margin.bottom + border.bottom + padding.bottom;
|
||||
extents.left = margin.left + border.left + padding.left;
|
||||
|
||||
content_allocation.x = allocation->x + extents.left;
|
||||
content_allocation.y = allocation->y + extents.top;
|
||||
content_allocation.width = allocation->width - extents.left - extents.right;
|
||||
content_allocation.height = allocation->height - extents.top - extents.bottom;
|
||||
if (baseline >= 0)
|
||||
baseline += extents.top;
|
||||
|
||||
g_assert (content_allocation.width >= 0);
|
||||
g_assert (content_allocation.height >= 0);
|
||||
|
||||
allocate_func (cssnode, &content_allocation, baseline, out_clip, allocate_data);
|
||||
|
||||
_gtk_css_shadows_value_get_extents (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BOX_SHADOW), &shadow);
|
||||
out_clip->x -= extents.left + shadow.left - margin.left;
|
||||
out_clip->y -= extents.top + shadow.top - margin.top;
|
||||
out_clip->width += extents.left + extents.right + shadow.left + shadow.right - margin.left - margin.right;
|
||||
out_clip->height += extents.top + extents.bottom + shadow.top + shadow.bottom - margin.top - margin.bottom;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
draw_contents_func_default (GtkCssNode *cssnode,
|
||||
cairo_t *cr,
|
||||
int width,
|
||||
int height,
|
||||
gpointer unused)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_css_node_draw (GtkCssNode *cssnode,
|
||||
cairo_t *cr,
|
||||
int width,
|
||||
int height,
|
||||
GtkCssNodeDrawFunc draw_contents_func,
|
||||
gpointer draw_contents_data)
|
||||
{
|
||||
GtkBorder margin, border, padding;
|
||||
gboolean draw_focus;
|
||||
GtkCssStyle *style;
|
||||
int contents_width, contents_height;
|
||||
|
||||
if (draw_contents_func == NULL)
|
||||
draw_contents_func = draw_contents_func_default;
|
||||
style = gtk_css_node_get_style (cssnode);
|
||||
get_box_margin (style, &margin);
|
||||
get_box_border (style, &border);
|
||||
get_box_padding (style, &padding);
|
||||
|
||||
gtk_css_style_render_background (style,
|
||||
cr,
|
||||
margin.left,
|
||||
margin.top,
|
||||
width - margin.left - margin.right,
|
||||
height - margin.top - margin.bottom,
|
||||
gtk_css_node_get_junction_sides (cssnode));
|
||||
gtk_css_style_render_border (style,
|
||||
cr,
|
||||
margin.left,
|
||||
margin.top,
|
||||
width - margin.left - margin.right,
|
||||
height - margin.top - margin.bottom,
|
||||
0,
|
||||
gtk_css_node_get_junction_sides (cssnode));
|
||||
|
||||
cairo_translate (cr,
|
||||
margin.left + border.left + padding.left,
|
||||
margin.top + border.top + padding.top);
|
||||
contents_width = width - margin.left - margin.right - border.left - border.right - padding.left - padding.right;
|
||||
contents_height = height - margin.top - margin.bottom - border.top - border.bottom - padding.top - padding.bottom;
|
||||
|
||||
draw_focus = draw_contents_func (cssnode, cr, contents_width, contents_height, draw_contents_data);
|
||||
|
||||
cairo_translate (cr,
|
||||
- (margin.left + border.left + padding.left),
|
||||
- (margin.top + border.top + padding.top));
|
||||
|
||||
if (draw_focus)
|
||||
gtk_css_style_render_outline (style,
|
||||
cr,
|
||||
margin.left,
|
||||
margin.top,
|
||||
width - margin.left - margin.right,
|
||||
height - margin.top - margin.bottom);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
/* GTK - The GIMP Toolkit
|
||||
* Copyright (C) 2014 Benjamin Otte <otte@gnome.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GTK_CSS_NODE_UTILS_PRIVATE_H__
|
||||
#define __GTK_CSS_NODE_UTILS_PRIVATE_H__
|
||||
|
||||
#include <gtk/gtkwidget.h>
|
||||
#include "gtk/gtkcssnodeprivate.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
void gtk_css_node_style_changed_for_widget (GtkCssNode *node,
|
||||
GtkCssStyle *old_style,
|
||||
GtkCssStyle *new_style,
|
||||
GtkWidget *widget);
|
||||
|
||||
typedef void (* GtkCssNodeSizeFunc) (GtkCssNode *cssnode,
|
||||
GtkOrientation orientation,
|
||||
gint for_size,
|
||||
gint *minimum,
|
||||
gint *natural,
|
||||
gint *minimum_baseline,
|
||||
gint *natural_baseline,
|
||||
gpointer get_content_size_data);
|
||||
void gtk_css_node_get_preferred_size (GtkCssNode *cssnode,
|
||||
GtkOrientation orientation,
|
||||
gint for_size,
|
||||
gint *minimum,
|
||||
gint *natural,
|
||||
gint *minimum_baseline,
|
||||
gint *natural_baseline,
|
||||
GtkCssNodeSizeFunc get_content_size_func,
|
||||
gpointer get_content_size_data);
|
||||
|
||||
typedef void (* GtkCssNodeAllocateFunc) (GtkCssNode *cssnode,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip,
|
||||
gpointer allocate_data);
|
||||
void gtk_css_node_allocate (GtkCssNode *cssnode,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip,
|
||||
GtkCssNodeAllocateFunc allocate_func,
|
||||
gpointer allocate_data);
|
||||
|
||||
typedef gboolean (* GtkCssNodeDrawFunc) (GtkCssNode *cssnode,
|
||||
cairo_t *cr,
|
||||
int width,
|
||||
int height,
|
||||
gpointer data);
|
||||
void gtk_css_node_draw (GtkCssNode *cssnode,
|
||||
cairo_t *cr,
|
||||
int width,
|
||||
int height,
|
||||
GtkCssNodeDrawFunc draw_contents_func,
|
||||
gpointer draw_contents_data);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_CSS_NODE_UTILS_PRIVATE_H__ */
|
||||
+20
-61
@@ -297,10 +297,7 @@ static gboolean
|
||||
needs_blur (const GtkCssValue *shadow)
|
||||
{
|
||||
double radius = _gtk_css_number_value_get (shadow->radius, 0);
|
||||
|
||||
/* The code doesn't actually do any blurring for radius 1, as it
|
||||
* ends up with box filter size 1 */
|
||||
if (radius <= 1.0)
|
||||
if (radius == 0.0)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
@@ -310,15 +307,12 @@ static const cairo_user_data_key_t original_cr_key;
|
||||
|
||||
static cairo_t *
|
||||
gtk_css_shadow_value_start_drawing (const GtkCssValue *shadow,
|
||||
cairo_t *cr,
|
||||
GtkBlurFlags blur_flags)
|
||||
cairo_t *cr)
|
||||
{
|
||||
cairo_rectangle_int_t clip_rect;
|
||||
cairo_surface_t *surface;
|
||||
cairo_t *blur_cr;
|
||||
gdouble radius, clip_radius;
|
||||
gboolean blur_x = (blur_flags & GTK_BLUR_X) != 0;
|
||||
gboolean blur_y = (blur_flags & GTK_BLUR_Y) != 0;
|
||||
|
||||
if (!needs_blur (shadow))
|
||||
return cr;
|
||||
@@ -328,22 +322,12 @@ gtk_css_shadow_value_start_drawing (const GtkCssValue *shadow,
|
||||
radius = _gtk_css_number_value_get (shadow->radius, 0);
|
||||
clip_radius = _gtk_cairo_blur_compute_pixels (radius);
|
||||
|
||||
if (blur_flags & GTK_BLUR_REPEAT)
|
||||
{
|
||||
if (!blur_x)
|
||||
clip_rect.width = 1;
|
||||
if (!blur_y)
|
||||
clip_rect.height = 1;
|
||||
}
|
||||
|
||||
/* Create a larger surface to center the blur. */
|
||||
surface = cairo_surface_create_similar_image (cairo_get_target (cr),
|
||||
CAIRO_FORMAT_A8,
|
||||
clip_rect.width + (blur_x ? 2 * clip_radius : 0),
|
||||
clip_rect.height + (blur_y ? 2 * clip_radius : 0));
|
||||
cairo_surface_set_device_offset (surface,
|
||||
(blur_x ? clip_radius : 0) - clip_rect.x,
|
||||
(blur_y ? clip_radius : 0) - clip_rect.y);
|
||||
clip_rect.width + 2 * clip_radius,
|
||||
clip_rect.height + 2 * clip_radius);
|
||||
cairo_surface_set_device_offset (surface, clip_radius - clip_rect.x, clip_radius - clip_rect.y);
|
||||
blur_cr = cairo_create (surface);
|
||||
cairo_set_user_data (blur_cr, &original_cr_key, cairo_reference (cr), (cairo_destroy_func_t) cairo_destroy);
|
||||
|
||||
@@ -358,24 +342,9 @@ gtk_css_shadow_value_start_drawing (const GtkCssValue *shadow,
|
||||
return blur_cr;
|
||||
}
|
||||
|
||||
void
|
||||
mask_surface_repeat (cairo_t *cr,
|
||||
cairo_surface_t *surface)
|
||||
{
|
||||
cairo_pattern_t *pattern;
|
||||
|
||||
pattern = cairo_pattern_create_for_surface (surface);
|
||||
cairo_pattern_set_extend (pattern, CAIRO_EXTEND_REPEAT);
|
||||
|
||||
cairo_mask (cr, pattern);
|
||||
|
||||
cairo_pattern_destroy (pattern);
|
||||
}
|
||||
|
||||
static cairo_t *
|
||||
gtk_css_shadow_value_finish_drawing (const GtkCssValue *shadow,
|
||||
cairo_t *cr,
|
||||
GtkBlurFlags blur_flags)
|
||||
cairo_t *cr)
|
||||
{
|
||||
gdouble radius;
|
||||
cairo_t *original_cr;
|
||||
@@ -389,16 +358,12 @@ gtk_css_shadow_value_finish_drawing (const GtkCssValue *shadow,
|
||||
/* Blur the surface. */
|
||||
surface = cairo_get_target (cr);
|
||||
radius = _gtk_css_number_value_get (shadow->radius, 0);
|
||||
_gtk_cairo_blur_surface (surface, radius, blur_flags);
|
||||
_gtk_cairo_blur_surface (surface, radius);
|
||||
|
||||
gdk_cairo_set_source_rgba (original_cr, _gtk_css_rgba_value_get_rgba (shadow->color));
|
||||
if (blur_flags & GTK_BLUR_REPEAT)
|
||||
mask_surface_repeat (original_cr, surface);
|
||||
else
|
||||
cairo_mask_surface (original_cr, surface, 0, 0);
|
||||
cairo_mask_surface (original_cr, surface, 0, 0);
|
||||
|
||||
cairo_destroy (cr);
|
||||
|
||||
cairo_surface_destroy (surface);
|
||||
|
||||
return original_cr;
|
||||
@@ -460,7 +425,7 @@ make_blurred_pango_surface (cairo_t *existing_cr,
|
||||
cr = cairo_create (surface);
|
||||
cairo_move_to (cr, 0, 0);
|
||||
_gtk_pango_fill_layout (cr, layout);
|
||||
_gtk_cairo_blur_surface (surface, radius * x_scale, GTK_BLUR_X | GTK_BLUR_Y);
|
||||
_gtk_cairo_blur_surface (surface, radius * x_scale);
|
||||
|
||||
cairo_destroy (cr);
|
||||
|
||||
@@ -547,14 +512,14 @@ _gtk_css_shadow_value_paint_icon (const GtkCssValue *shadow,
|
||||
pattern = cairo_pattern_reference (cairo_get_source (cr));
|
||||
|
||||
gdk_cairo_set_source_rgba (cr, _gtk_css_rgba_value_get_rgba (shadow->color));
|
||||
cr = gtk_css_shadow_value_start_drawing (shadow, cr, GTK_BLUR_X | GTK_BLUR_Y);
|
||||
cr = gtk_css_shadow_value_start_drawing (shadow, cr);
|
||||
|
||||
cairo_translate (cr,
|
||||
_gtk_css_number_value_get (shadow->hoffset, 0),
|
||||
_gtk_css_number_value_get (shadow->voffset, 0));
|
||||
cairo_mask (cr, pattern);
|
||||
|
||||
cr = gtk_css_shadow_value_finish_drawing (shadow, cr, GTK_BLUR_X | GTK_BLUR_Y);
|
||||
cr = gtk_css_shadow_value_finish_drawing (shadow, cr);
|
||||
|
||||
cairo_restore (cr);
|
||||
cairo_pattern_destroy (pattern);
|
||||
@@ -602,18 +567,16 @@ draw_shadow (const GtkCssValue *shadow,
|
||||
cairo_t *cr,
|
||||
GtkRoundedBox *box,
|
||||
GtkRoundedBox *clip_box,
|
||||
GtkBlurFlags blur_flags)
|
||||
gboolean blur)
|
||||
{
|
||||
cairo_t *shadow_cr;
|
||||
gboolean do_blur;
|
||||
|
||||
if (has_empty_clip (cr))
|
||||
return;
|
||||
|
||||
gdk_cairo_set_source_rgba (cr, _gtk_css_rgba_value_get_rgba (shadow->color));
|
||||
do_blur = (blur_flags & (GTK_BLUR_X | GTK_BLUR_Y)) != 0;
|
||||
if (do_blur)
|
||||
shadow_cr = gtk_css_shadow_value_start_drawing (shadow, cr, blur_flags);
|
||||
if (blur)
|
||||
shadow_cr = gtk_css_shadow_value_start_drawing (shadow, cr);
|
||||
else
|
||||
shadow_cr = cr;
|
||||
|
||||
@@ -624,8 +587,8 @@ draw_shadow (const GtkCssValue *shadow,
|
||||
|
||||
cairo_fill (shadow_cr);
|
||||
|
||||
if (do_blur)
|
||||
gtk_css_shadow_value_finish_drawing (shadow, shadow_cr, blur_flags);
|
||||
if (blur)
|
||||
gtk_css_shadow_value_finish_drawing (shadow, shadow_cr);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -681,7 +644,7 @@ _gtk_css_shadow_value_paint_box (const GtkCssValue *shadow,
|
||||
_gtk_rounded_box_shrink (&clip_box, -clip_radius, -clip_radius, -clip_radius, -clip_radius);
|
||||
|
||||
if (!needs_blur (shadow))
|
||||
draw_shadow (shadow, cr, &box, &clip_box, GTK_BLUR_NONE);
|
||||
draw_shadow (shadow, cr, &box, &clip_box, FALSE);
|
||||
else
|
||||
{
|
||||
int i, x1, x2, y1, y2;
|
||||
@@ -751,7 +714,7 @@ _gtk_css_shadow_value_paint_box (const GtkCssValue *shadow,
|
||||
/* Also clip with remaining to ensure we never draw any area twice */
|
||||
gdk_cairo_region (cr, remaining);
|
||||
cairo_clip (cr);
|
||||
draw_shadow (shadow, cr, &box, &clip_box, GTK_BLUR_X | GTK_BLUR_Y);
|
||||
draw_shadow (shadow, cr, &box, &clip_box, TRUE);
|
||||
cairo_restore (cr);
|
||||
|
||||
/* We drew the region, remove it from remaining */
|
||||
@@ -765,11 +728,8 @@ _gtk_css_shadow_value_paint_box (const GtkCssValue *shadow,
|
||||
/* Then the sides */
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
GtkBlurFlags blur_flags = GTK_BLUR_REPEAT;
|
||||
|
||||
if (i == GTK_CSS_TOP || i == GTK_CSS_BOTTOM)
|
||||
{
|
||||
blur_flags |= GTK_BLUR_Y;
|
||||
x1 = floor (box.box.x - clip_radius);
|
||||
x2 = ceil (box.box.x + box.box.width + clip_radius);
|
||||
}
|
||||
@@ -786,7 +746,6 @@ _gtk_css_shadow_value_paint_box (const GtkCssValue *shadow,
|
||||
|
||||
if (i == GTK_CSS_LEFT || i == GTK_CSS_RIGHT)
|
||||
{
|
||||
blur_flags |= GTK_BLUR_X;
|
||||
y1 = floor (box.box.y - clip_radius);
|
||||
y2 = ceil (box.box.y + box.box.height + clip_radius);
|
||||
}
|
||||
@@ -807,7 +766,7 @@ _gtk_css_shadow_value_paint_box (const GtkCssValue *shadow,
|
||||
/* Also clip with remaining to ensure we never draw any area twice */
|
||||
gdk_cairo_region (cr, remaining);
|
||||
cairo_clip (cr);
|
||||
draw_shadow (shadow, cr, &box, &clip_box, blur_flags);
|
||||
draw_shadow (shadow, cr, &box, &clip_box, TRUE);
|
||||
cairo_restore (cr);
|
||||
|
||||
/* We drew the region, remove it from remaining */
|
||||
@@ -823,7 +782,7 @@ _gtk_css_shadow_value_paint_box (const GtkCssValue *shadow,
|
||||
cairo_save (cr);
|
||||
gdk_cairo_region (cr, remaining);
|
||||
cairo_clip (cr);
|
||||
draw_shadow (shadow, cr, &box, &clip_box, GTK_BLUR_NONE);
|
||||
draw_shadow (shadow, cr, &box, &clip_box, FALSE);
|
||||
cairo_restore (cr);
|
||||
|
||||
cairo_region_destroy (remaining);
|
||||
|
||||
@@ -804,6 +804,15 @@ border_image_width_parse (GtkCssStyleProperty *property,
|
||||
FALSE);
|
||||
}
|
||||
|
||||
static GtkCssValue *
|
||||
minmax_parse (GtkCssStyleProperty *property,
|
||||
GtkCssParser *parser)
|
||||
{
|
||||
return _gtk_css_number_value_parse (parser,
|
||||
GTK_CSS_PARSE_LENGTH
|
||||
| GTK_CSS_POSITIVE_ONLY);
|
||||
}
|
||||
|
||||
static GtkCssValue *
|
||||
transition_property_parse_one (GtkCssParser *parser)
|
||||
{
|
||||
@@ -1529,6 +1538,25 @@ _gtk_css_style_property_init_properties (void)
|
||||
NULL,
|
||||
_gtk_css_transform_value_new_none ());
|
||||
|
||||
gtk_css_style_property_register ("min-width",
|
||||
GTK_CSS_PROPERTY_MIN_WIDTH,
|
||||
G_TYPE_NONE,
|
||||
GTK_STYLE_PROPERTY_ANIMATED,
|
||||
GTK_CSS_AFFECTS_SIZE,
|
||||
minmax_parse,
|
||||
NULL,
|
||||
NULL,
|
||||
_gtk_css_number_value_new (0, GTK_CSS_PX));
|
||||
gtk_css_style_property_register ("min-height",
|
||||
GTK_CSS_PROPERTY_MIN_HEIGHT,
|
||||
G_TYPE_NONE,
|
||||
GTK_STYLE_PROPERTY_ANIMATED,
|
||||
GTK_CSS_AFFECTS_SIZE,
|
||||
minmax_parse,
|
||||
NULL,
|
||||
NULL,
|
||||
_gtk_css_number_value_new (0, GTK_CSS_PX));
|
||||
|
||||
gtk_css_style_property_register ("transition-property",
|
||||
GTK_CSS_PROPERTY_TRANSITION_PROPERTY,
|
||||
G_TYPE_NONE,
|
||||
|
||||
@@ -164,6 +164,8 @@ enum { /*< skip >*/
|
||||
GTK_CSS_PROPERTY_ICON_SHADOW,
|
||||
GTK_CSS_PROPERTY_ICON_STYLE,
|
||||
GTK_CSS_PROPERTY_ICON_TRANSFORM,
|
||||
GTK_CSS_PROPERTY_MIN_WIDTH,
|
||||
GTK_CSS_PROPERTY_MIN_HEIGHT,
|
||||
GTK_CSS_PROPERTY_TRANSITION_PROPERTY,
|
||||
GTK_CSS_PROPERTY_TRANSITION_DURATION,
|
||||
GTK_CSS_PROPERTY_TRANSITION_TIMING_FUNCTION,
|
||||
|
||||
@@ -54,9 +54,6 @@ gtk_css_widget_node_style_changed (GtkCssNode *cssnode,
|
||||
|
||||
node = GTK_CSS_WIDGET_NODE (cssnode);
|
||||
|
||||
if (node->widget)
|
||||
gtk_widget_clear_path (node->widget);
|
||||
|
||||
GTK_CSS_NODE_CLASS (gtk_css_widget_node_parent_class)->style_changed (cssnode, old_style, new_style);
|
||||
|
||||
diff = gtk_css_style_get_difference (new_style, old_style);
|
||||
|
||||
+11
-32
@@ -228,8 +228,6 @@ static gboolean gtk_drag_dest_drop (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
guint time);
|
||||
static void gtk_drag_dest_set_widget (GtkDragDestInfo *info,
|
||||
GtkWidget *widget);
|
||||
|
||||
static GtkDragDestInfo * gtk_drag_get_dest_info (GdkDragContext *context,
|
||||
gboolean create);
|
||||
@@ -1640,7 +1638,7 @@ _gtk_drag_dest_handle_event (GtkWidget *toplevel,
|
||||
if (info->widget)
|
||||
{
|
||||
gtk_drag_dest_leave (info->widget, context, event->dnd.time);
|
||||
gtk_drag_dest_set_widget (info, NULL);
|
||||
info->widget = NULL;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1660,7 +1658,7 @@ _gtk_drag_dest_handle_event (GtkWidget *toplevel,
|
||||
if (info->widget)
|
||||
{
|
||||
gtk_drag_dest_leave (info->widget, context, event->dnd.time);
|
||||
gtk_drag_dest_set_widget (info, NULL);
|
||||
info->widget = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1692,7 +1690,7 @@ _gtk_drag_dest_handle_event (GtkWidget *toplevel,
|
||||
if (info->widget && !found)
|
||||
{
|
||||
gtk_drag_dest_leave (info->widget, context, event->dnd.time);
|
||||
gtk_drag_dest_set_widget (info, NULL);
|
||||
info->widget = NULL;
|
||||
}
|
||||
|
||||
/* Send a reply.
|
||||
@@ -1920,12 +1918,15 @@ gtk_drag_find_widget (GtkWidget *widget,
|
||||
found = callback (widget, context, x, y, time);
|
||||
|
||||
/* If so, send a "drag-leave" to the last widget */
|
||||
if (found && info->widget != widget)
|
||||
if (found)
|
||||
{
|
||||
if (info->widget)
|
||||
gtk_drag_dest_leave (info->widget, context, time);
|
||||
if (info->widget && info->widget != widget)
|
||||
{
|
||||
gtk_drag_dest_leave (info->widget, context, time);
|
||||
}
|
||||
|
||||
gtk_drag_dest_set_widget (info, widget);
|
||||
info->widget = widget;
|
||||
g_object_add_weak_pointer (G_OBJECT (widget), (gpointer *) &info->widget);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2007,26 +2008,9 @@ gtk_drag_proxy_begin (GtkWidget *widget,
|
||||
dest_info->proxy_source = source_info;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_drag_dest_set_widget (GtkDragDestInfo *info,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
if (info->widget)
|
||||
g_object_remove_weak_pointer (G_OBJECT (info->widget), (gpointer *) &info->widget);
|
||||
|
||||
info->widget = widget;
|
||||
|
||||
if (info->widget)
|
||||
g_object_add_weak_pointer (G_OBJECT (info->widget), (gpointer *) &info->widget);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_drag_dest_info_destroy (gpointer data)
|
||||
{
|
||||
GtkDragDestInfo *info = (GtkDragDestInfo *)data;
|
||||
|
||||
gtk_drag_dest_set_widget (info, NULL);
|
||||
|
||||
g_slice_free (GtkDragDestInfo, data);
|
||||
}
|
||||
|
||||
@@ -2531,11 +2515,7 @@ gtk_drag_begin_internal (GtkWidget *widget,
|
||||
* not have set one.
|
||||
*/
|
||||
if (!info->icon_window && !info->icon_helper)
|
||||
{
|
||||
info->icon_helper = gtk_drag_source_site_get_icon_helper (site);
|
||||
set_icon_helper (info->context, info->icon_helper,
|
||||
0, 0, TRUE);
|
||||
}
|
||||
info->icon_helper = gtk_drag_source_site_get_icon_helper (site);
|
||||
|
||||
/* We need to composite the icon into the cursor, if we are
|
||||
* not using an icon window.
|
||||
@@ -4002,7 +3982,6 @@ gtk_drag_remove_icon (GtkDragSourceInfo *info)
|
||||
if (info->icon_window)
|
||||
{
|
||||
gtk_widget_hide (info->icon_window);
|
||||
gtk_widget_set_opacity (info->icon_window, 1.0);
|
||||
if (info->destroy_icon)
|
||||
gtk_widget_destroy (info->icon_window);
|
||||
|
||||
|
||||
+197
-126
@@ -34,6 +34,7 @@
|
||||
#include "gtkbindings.h"
|
||||
#include "gtkcelleditable.h"
|
||||
#include "gtkclipboard.h"
|
||||
#include "gtkcssnodeutilsprivate.h"
|
||||
#include "gtkdebug.h"
|
||||
#include "gtkdnd.h"
|
||||
#include "gtkentry.h"
|
||||
@@ -174,6 +175,8 @@ struct _GtkEntryPrivate
|
||||
GtkGesture *drag_gesture;
|
||||
GtkGesture *multipress_gesture;
|
||||
|
||||
GtkCssNode *progress_node;
|
||||
|
||||
gfloat xalign;
|
||||
|
||||
gint ascent; /* font ascent in pango units */
|
||||
@@ -235,12 +238,12 @@ struct _GtkEntryPrivate
|
||||
struct _EntryIconInfo
|
||||
{
|
||||
GdkWindow *window;
|
||||
GtkCssNode *css_node;
|
||||
gchar *tooltip;
|
||||
guint insensitive : 1;
|
||||
guint nonactivatable : 1;
|
||||
guint prelight : 1;
|
||||
guint in_drag : 1;
|
||||
guint pressed : 1;
|
||||
|
||||
GdkDragAction actions;
|
||||
GtkTargetList *target_list;
|
||||
@@ -1509,13 +1512,17 @@ gtk_entry_class_init (GtkEntryClass *class)
|
||||
* icons prelight on mouseover.
|
||||
*
|
||||
* Since: 2.16
|
||||
*
|
||||
* Deprecated: 3.18: Activatable icons are always prelit on hover.
|
||||
* Just don't style the :hover style if you don't want them to
|
||||
* look different.
|
||||
*/
|
||||
gtk_widget_class_install_style_property (widget_class,
|
||||
g_param_spec_boolean ("icon-prelight",
|
||||
P_("Icon Prelight"),
|
||||
P_("Whether activatable icons should prelight when hovered"),
|
||||
TRUE,
|
||||
GTK_PARAM_READABLE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
GTK_PARAM_READABLE|G_PARAM_EXPLICIT_NOTIFY|G_PARAM_DEPRECATED));
|
||||
|
||||
/**
|
||||
* GtkEntry:progress-border:
|
||||
@@ -2691,7 +2698,7 @@ find_invisible_char (GtkWidget *widget)
|
||||
static void
|
||||
gtk_entry_init (GtkEntry *entry)
|
||||
{
|
||||
GtkStyleContext *context;
|
||||
GtkCssNode *widget_node;
|
||||
GtkEntryPrivate *priv;
|
||||
|
||||
entry->priv = gtk_entry_get_instance_private (entry);
|
||||
@@ -2735,8 +2742,8 @@ gtk_entry_init (GtkEntry *entry)
|
||||
g_signal_connect (priv->im_context, "delete-surrounding",
|
||||
G_CALLBACK (gtk_entry_delete_surrounding_cb), entry);
|
||||
|
||||
context = gtk_widget_get_style_context (GTK_WIDGET (entry));
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_ENTRY);
|
||||
widget_node = gtk_widget_get_css_node (GTK_WIDGET (entry));
|
||||
gtk_css_node_add_class (widget_node, GTK_STYLE_CLASS_ENTRY);
|
||||
|
||||
gtk_entry_update_cached_style_values (entry);
|
||||
|
||||
@@ -2753,6 +2760,16 @@ gtk_entry_init (GtkEntry *entry)
|
||||
G_CALLBACK (gtk_entry_multipress_gesture_pressed), entry);
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (priv->multipress_gesture), 0);
|
||||
gtk_gesture_single_set_exclusive (GTK_GESTURE_SINGLE (priv->multipress_gesture), TRUE);
|
||||
|
||||
priv->progress_node = gtk_css_node_new ();
|
||||
gtk_css_node_set_widget_type (priv->progress_node, GTK_TYPE_ENTRY);
|
||||
gtk_css_node_add_class (priv->progress_node, GTK_STYLE_CLASS_ENTRY);
|
||||
gtk_css_node_add_class (priv->progress_node, GTK_STYLE_CLASS_PROGRESSBAR);
|
||||
gtk_css_node_set_parent (priv->progress_node, widget_node);
|
||||
gtk_css_node_set_state (priv->progress_node, gtk_css_node_get_state (widget_node));
|
||||
g_signal_connect_object (priv->progress_node, "style-changed", G_CALLBACK (gtk_css_node_style_changed_for_widget), entry, 0);
|
||||
g_object_unref (priv->progress_node);
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2791,47 +2808,6 @@ gtk_entry_ensure_text_handles (GtkEntry *entry)
|
||||
G_CALLBACK (gtk_entry_handle_drag_finished), entry);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_entry_prepare_context_for_icon (GtkEntry *entry,
|
||||
GtkStyleContext *context,
|
||||
GtkEntryIconPosition icon_pos)
|
||||
{
|
||||
GtkEntryPrivate *priv = entry->priv;
|
||||
EntryIconInfo *icon_info = priv->icons[icon_pos];
|
||||
GtkWidget *widget;
|
||||
GtkStateFlags state;
|
||||
|
||||
widget = GTK_WIDGET (entry);
|
||||
state = gtk_widget_get_state_flags (widget);
|
||||
|
||||
state &= ~(GTK_STATE_FLAG_PRELIGHT);
|
||||
|
||||
if ((state & GTK_STATE_FLAG_INSENSITIVE) || icon_info->insensitive)
|
||||
state |= GTK_STATE_FLAG_INSENSITIVE;
|
||||
else if (icon_info->prelight)
|
||||
state |= GTK_STATE_FLAG_PRELIGHT;
|
||||
|
||||
gtk_style_context_save (context);
|
||||
|
||||
gtk_style_context_set_state (context, state);
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_IMAGE);
|
||||
|
||||
if (gtk_widget_get_direction (GTK_WIDGET (entry)) == GTK_TEXT_DIR_RTL)
|
||||
{
|
||||
if (icon_pos == GTK_ENTRY_ICON_PRIMARY)
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_RIGHT);
|
||||
else
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_LEFT);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (icon_pos == GTK_ENTRY_ICON_PRIMARY)
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_LEFT);
|
||||
else
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_RIGHT);
|
||||
}
|
||||
}
|
||||
|
||||
static gint
|
||||
get_icon_width (GtkEntry *entry,
|
||||
GtkEntryIconPosition icon_pos)
|
||||
@@ -2847,7 +2823,7 @@ get_icon_width (GtkEntry *entry,
|
||||
return 0;
|
||||
|
||||
context = gtk_widget_get_style_context (GTK_WIDGET (entry));
|
||||
gtk_entry_prepare_context_for_icon (entry, context, icon_pos);
|
||||
gtk_style_context_save_to_node (context, priv->icons[icon_pos]->css_node);
|
||||
state = gtk_style_context_get_state (context);
|
||||
gtk_style_context_get_padding (context, state, &padding);
|
||||
|
||||
@@ -3002,6 +2978,8 @@ gtk_entry_finalize (GObject *object)
|
||||
{
|
||||
if ((icon_info = priv->icons[i]) != NULL)
|
||||
{
|
||||
g_object_unref (icon_info->css_node);
|
||||
|
||||
if (icon_info->target_list != NULL)
|
||||
{
|
||||
gtk_target_list_unref (icon_info->target_list);
|
||||
@@ -3195,6 +3173,7 @@ realize_icon_info (GtkWidget *widget,
|
||||
GDK_BUTTON_RELEASE_MASK |
|
||||
GDK_BUTTON1_MOTION_MASK |
|
||||
GDK_BUTTON3_MOTION_MASK |
|
||||
GDK_POINTER_MOTION_HINT_MASK |
|
||||
GDK_POINTER_MOTION_MASK |
|
||||
GDK_ENTER_NOTIFY_MASK |
|
||||
GDK_LEAVE_NOTIFY_MASK);
|
||||
@@ -3212,12 +3191,85 @@ realize_icon_info (GtkWidget *widget,
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
update_state_for_icon_infos (GtkWidget *widget)
|
||||
{
|
||||
GtkCssNode *cssnode, *first_node, *last_node;
|
||||
GtkEntry *entry = GTK_ENTRY (widget);
|
||||
GtkEntryPrivate *priv = entry->priv;
|
||||
GtkStateFlags state;
|
||||
#define NOT_INHERITED (GTK_STATE_FLAG_PRELIGHT | GTK_STATE_FLAG_ACTIVE)
|
||||
|
||||
cssnode = gtk_widget_get_css_node (widget);
|
||||
state = gtk_widget_get_state_flags (widget);
|
||||
|
||||
if (priv->icons[GTK_ENTRY_ICON_PRIMARY])
|
||||
gtk_css_node_set_state (priv->icons[GTK_ENTRY_ICON_PRIMARY]->css_node,
|
||||
(state & ~NOT_INHERITED)
|
||||
| (gtk_css_node_get_state (priv->icons[GTK_ENTRY_ICON_PRIMARY]->css_node) & NOT_INHERITED)
|
||||
| (priv->icons[GTK_ENTRY_ICON_PRIMARY]->insensitive ? GTK_STATE_FLAG_INSENSITIVE : 0));
|
||||
if (priv->icons[GTK_ENTRY_ICON_SECONDARY])
|
||||
gtk_css_node_set_state (priv->icons[GTK_ENTRY_ICON_SECONDARY]->css_node,
|
||||
(state & ~NOT_INHERITED)
|
||||
| (gtk_css_node_get_state (priv->icons[GTK_ENTRY_ICON_SECONDARY]->css_node) & NOT_INHERITED)
|
||||
| (priv->icons[GTK_ENTRY_ICON_SECONDARY]->insensitive ? GTK_STATE_FLAG_INSENSITIVE : 0));
|
||||
|
||||
if (state & GTK_STATE_FLAG_DIR_RTL)
|
||||
{
|
||||
first_node = priv->icons[GTK_ENTRY_ICON_SECONDARY] ? priv->icons[GTK_ENTRY_ICON_SECONDARY]->css_node : NULL;
|
||||
last_node = priv->icons[GTK_ENTRY_ICON_PRIMARY] ? priv->icons[GTK_ENTRY_ICON_PRIMARY]->css_node : NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
first_node = priv->icons[GTK_ENTRY_ICON_PRIMARY] ? priv->icons[GTK_ENTRY_ICON_PRIMARY]->css_node : NULL;
|
||||
last_node = priv->icons[GTK_ENTRY_ICON_SECONDARY] ? priv->icons[GTK_ENTRY_ICON_SECONDARY]->css_node : NULL;
|
||||
}
|
||||
|
||||
if (first_node)
|
||||
{
|
||||
if (first_node != gtk_css_node_get_first_child (cssnode))
|
||||
gtk_css_node_set_before (first_node, gtk_css_node_get_first_child (cssnode));
|
||||
gtk_css_node_remove_class (first_node, GTK_STYLE_CLASS_RIGHT);
|
||||
gtk_css_node_add_class (first_node, GTK_STYLE_CLASS_LEFT);
|
||||
}
|
||||
if (last_node)
|
||||
{
|
||||
if (last_node != gtk_css_node_get_last_child (cssnode))
|
||||
gtk_css_node_set_after (last_node, gtk_css_node_get_last_child (cssnode));
|
||||
gtk_css_node_remove_class (last_node, GTK_STYLE_CLASS_LEFT);
|
||||
gtk_css_node_add_class (last_node, GTK_STYLE_CLASS_RIGHT);
|
||||
}
|
||||
|
||||
#undef NOT_INHERITED
|
||||
}
|
||||
|
||||
static void
|
||||
icon_node_style_changed_cb (GtkCssNode *node,
|
||||
GtkCssStyle *old_style,
|
||||
GtkCssStyle *new_style,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
GtkEntry *entry = GTK_ENTRY (widget);
|
||||
GtkEntryPrivate *priv = entry->priv;
|
||||
GtkIconHelper *icon_helper;
|
||||
|
||||
gtk_css_node_style_changed_for_widget (node, old_style, new_style, widget);
|
||||
|
||||
if (priv->icons[GTK_ENTRY_ICON_PRIMARY] && priv->icons[GTK_ENTRY_ICON_PRIMARY]->css_node == node)
|
||||
icon_helper = priv->icons[GTK_ENTRY_ICON_PRIMARY]->icon_helper;
|
||||
else
|
||||
icon_helper = priv->icons[GTK_ENTRY_ICON_SECONDARY]->icon_helper;
|
||||
|
||||
_gtk_icon_helper_invalidate (icon_helper);
|
||||
}
|
||||
|
||||
static EntryIconInfo*
|
||||
construct_icon_info (GtkWidget *widget,
|
||||
GtkEntryIconPosition icon_pos)
|
||||
{
|
||||
GtkEntry *entry = GTK_ENTRY (widget);
|
||||
GtkEntryPrivate *priv = entry->priv;
|
||||
GtkCssNode *widget_node;
|
||||
EntryIconInfo *icon_info;
|
||||
|
||||
g_return_val_if_fail (priv->icons[icon_pos] == NULL, NULL);
|
||||
@@ -3228,6 +3280,14 @@ construct_icon_info (GtkWidget *widget,
|
||||
icon_info->icon_helper = _gtk_icon_helper_new ();
|
||||
_gtk_icon_helper_set_force_scale_pixbuf (icon_info->icon_helper, TRUE);
|
||||
|
||||
icon_info->css_node = gtk_css_node_new ();
|
||||
widget_node = gtk_widget_get_css_node (widget);
|
||||
gtk_css_node_add_class (icon_info->css_node, GTK_STYLE_CLASS_ENTRY);
|
||||
gtk_css_node_add_class (icon_info->css_node, GTK_STYLE_CLASS_IMAGE);
|
||||
gtk_css_node_set_parent (icon_info->css_node, widget_node);
|
||||
g_signal_connect_object (icon_info->css_node, "style-changed", G_CALLBACK (icon_node_style_changed_cb), widget, 0);
|
||||
update_state_for_icon_infos (widget);
|
||||
|
||||
if (gtk_widget_get_realized (widget))
|
||||
realize_icon_info (widget, icon_pos);
|
||||
|
||||
@@ -3313,6 +3373,7 @@ gtk_entry_realize (GtkWidget *widget)
|
||||
GDK_BUTTON_RELEASE_MASK |
|
||||
GDK_BUTTON1_MOTION_MASK |
|
||||
GDK_BUTTON3_MOTION_MASK |
|
||||
GDK_POINTER_MOTION_HINT_MASK |
|
||||
GDK_POINTER_MOTION_MASK |
|
||||
GDK_ENTER_NOTIFY_MASK |
|
||||
GDK_LEAVE_NOTIFY_MASK);
|
||||
@@ -3427,14 +3488,19 @@ _gtk_entry_get_borders (GtkEntry *entry,
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_entry_get_preferred_width (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural)
|
||||
gtk_entry_get_content_width (GtkCssNode *cssnode,
|
||||
GtkOrientation orientation,
|
||||
gint for_size,
|
||||
gint *minimum,
|
||||
gint *natural,
|
||||
gint *minimum_baseline,
|
||||
gint *natural_baseline,
|
||||
gpointer data)
|
||||
{
|
||||
GtkEntry *entry = GTK_ENTRY (widget);
|
||||
GtkWidget *widget = GTK_WIDGET(data);
|
||||
GtkEntry *entry = GTK_ENTRY (data);
|
||||
GtkEntryPrivate *priv = entry->priv;
|
||||
PangoFontMetrics *metrics;
|
||||
GtkBorder borders;
|
||||
PangoContext *context;
|
||||
gint icon_width, i;
|
||||
gint min, nat;
|
||||
@@ -3442,8 +3508,6 @@ gtk_entry_get_preferred_width (GtkWidget *widget,
|
||||
gint digit_width;
|
||||
gint char_pixels;
|
||||
|
||||
_gtk_entry_get_borders (entry, &borders);
|
||||
|
||||
context = gtk_widget_get_pango_context (widget);
|
||||
metrics = pango_context_get_metrics (context,
|
||||
pango_context_get_font_description (context),
|
||||
@@ -3456,14 +3520,14 @@ gtk_entry_get_preferred_width (GtkWidget *widget,
|
||||
pango_font_metrics_unref (metrics);
|
||||
|
||||
if (priv->width_chars < 0)
|
||||
min = MIN_ENTRY_WIDTH + borders.left + borders.right;
|
||||
min = MIN_ENTRY_WIDTH;
|
||||
else
|
||||
min = char_pixels * priv->width_chars + borders.left + borders.right;
|
||||
min = char_pixels * priv->width_chars;
|
||||
|
||||
if (priv->max_width_chars < 0)
|
||||
nat = MIN_ENTRY_WIDTH + borders.left + borders.right;
|
||||
nat = MIN_ENTRY_WIDTH;
|
||||
else
|
||||
nat = char_pixels * priv->max_width_chars + borders.left + borders.right;
|
||||
nat = char_pixels * priv->max_width_chars;
|
||||
|
||||
icon_width = 0;
|
||||
for (i = 0; i < MAX_ICONS; i++)
|
||||
@@ -3477,17 +3541,33 @@ gtk_entry_get_preferred_width (GtkWidget *widget,
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_entry_get_preferred_height_and_baseline_for_width (GtkWidget *widget,
|
||||
gint width,
|
||||
gint *minimum,
|
||||
gint *natural,
|
||||
gint *minimum_baseline,
|
||||
gint *natural_baseline)
|
||||
gtk_entry_get_preferred_width (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural)
|
||||
{
|
||||
GtkEntry *entry = GTK_ENTRY (widget);
|
||||
gtk_css_node_get_preferred_size (gtk_widget_get_css_node (widget),
|
||||
GTK_ORIENTATION_HORIZONTAL,
|
||||
-1,
|
||||
minimum, natural,
|
||||
NULL, NULL,
|
||||
gtk_entry_get_content_width,
|
||||
widget);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_entry_get_content_height (GtkCssNode *cssnode,
|
||||
GtkOrientation orientation,
|
||||
gint for_size,
|
||||
gint *minimum,
|
||||
gint *natural,
|
||||
gint *minimum_baseline,
|
||||
gint *natural_baseline,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET(data);
|
||||
GtkEntry *entry = GTK_ENTRY (data);
|
||||
GtkEntryPrivate *priv = entry->priv;
|
||||
PangoFontMetrics *metrics;
|
||||
GtkBorder borders;
|
||||
PangoContext *context;
|
||||
gint height, baseline;
|
||||
PangoLayout *layout;
|
||||
@@ -3503,14 +3583,11 @@ gtk_entry_get_preferred_height_and_baseline_for_width (GtkWidget *widget,
|
||||
priv->descent = pango_font_metrics_get_descent (metrics);
|
||||
pango_font_metrics_unref (metrics);
|
||||
|
||||
_gtk_entry_get_borders (entry, &borders);
|
||||
pango_layout_get_pixel_size (layout, NULL, &height);
|
||||
|
||||
height = MAX (height, PANGO_PIXELS (priv->ascent + priv->descent));
|
||||
height += borders.top + borders.bottom;
|
||||
|
||||
baseline = pango_layout_get_baseline (layout) / PANGO_SCALE;
|
||||
baseline += borders.top;
|
||||
|
||||
*minimum = height;
|
||||
*natural = height;
|
||||
@@ -3520,6 +3597,23 @@ gtk_entry_get_preferred_height_and_baseline_for_width (GtkWidget *widget,
|
||||
*natural_baseline = baseline;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_entry_get_preferred_height_and_baseline_for_width (GtkWidget *widget,
|
||||
gint width,
|
||||
gint *minimum,
|
||||
gint *natural,
|
||||
gint *minimum_baseline,
|
||||
gint *natural_baseline)
|
||||
{
|
||||
gtk_css_node_get_preferred_size (gtk_widget_get_css_node (widget),
|
||||
GTK_ORIENTATION_VERTICAL,
|
||||
width,
|
||||
minimum, natural,
|
||||
minimum_baseline, natural_baseline,
|
||||
gtk_entry_get_content_height,
|
||||
widget);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_entry_get_preferred_height (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
@@ -3734,7 +3828,6 @@ should_prelight (GtkEntry *entry,
|
||||
{
|
||||
GtkEntryPrivate *priv = entry->priv;
|
||||
EntryIconInfo *icon_info = priv->icons[icon_pos];
|
||||
gboolean prelight;
|
||||
|
||||
if (!icon_info)
|
||||
return FALSE;
|
||||
@@ -3742,14 +3835,7 @@ should_prelight (GtkEntry *entry,
|
||||
if (icon_info->nonactivatable && icon_info->target_list == NULL)
|
||||
return FALSE;
|
||||
|
||||
if (icon_info->pressed)
|
||||
return FALSE;
|
||||
|
||||
gtk_widget_style_get (GTK_WIDGET (entry),
|
||||
"icon-prelight", &prelight,
|
||||
NULL);
|
||||
|
||||
return prelight;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -3780,7 +3866,7 @@ draw_icon (GtkWidget *widget,
|
||||
gtk_cairo_transform_to_window (cr, widget, icon_info->window);
|
||||
|
||||
context = gtk_widget_get_style_context (widget);
|
||||
gtk_entry_prepare_context_for_icon (entry, context, icon_pos);
|
||||
gtk_style_context_save_to_node (context, priv->icons[icon_pos]->css_node);
|
||||
_gtk_icon_helper_get_size (icon_info->icon_helper, context,
|
||||
&pix_width, &pix_height);
|
||||
state = gtk_style_context_get_state (context);
|
||||
@@ -3837,18 +3923,6 @@ gtk_entry_draw_frame (GtkWidget *widget,
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_entry_prepare_context_for_progress (GtkEntry *entry,
|
||||
GtkStyleContext *context)
|
||||
{
|
||||
GtkEntryPrivate *private = entry->priv;
|
||||
|
||||
gtk_style_context_save (context);
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_PROGRESSBAR);
|
||||
if (private->progress_pulse_mode)
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_PULSE);
|
||||
}
|
||||
|
||||
static void
|
||||
get_progress_area (GtkWidget *widget,
|
||||
gint *x,
|
||||
@@ -3897,7 +3971,7 @@ get_progress_area (GtkWidget *widget,
|
||||
}
|
||||
}
|
||||
|
||||
gtk_entry_prepare_context_for_progress (entry, context);
|
||||
gtk_style_context_save_to_node (context, private->progress_node);
|
||||
gtk_style_context_get_margin (context, state, &margin);
|
||||
|
||||
gtk_style_context_restore (context);
|
||||
@@ -3951,7 +4025,7 @@ gtk_entry_draw_progress (GtkWidget *widget,
|
||||
if ((width <= 0) || (height <= 0))
|
||||
return;
|
||||
|
||||
gtk_entry_prepare_context_for_progress (entry, context);
|
||||
gtk_style_context_save_to_node (context, entry->priv->progress_node);
|
||||
gtk_render_background (context, cr, x, y, width, height);
|
||||
gtk_render_frame (context, cr, x, y, width, height);
|
||||
|
||||
@@ -4021,10 +4095,7 @@ gtk_entry_enter_notify (GtkWidget *widget,
|
||||
if (icon_info != NULL && event->window == icon_info->window)
|
||||
{
|
||||
if (should_prelight (entry, i))
|
||||
{
|
||||
icon_info->prelight = TRUE;
|
||||
gtk_widget_queue_draw (widget);
|
||||
}
|
||||
gtk_css_node_add_state (icon_info->css_node, GTK_STATE_FLAG_PRELIGHT);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -4049,13 +4120,10 @@ gtk_entry_leave_notify (GtkWidget *widget,
|
||||
{
|
||||
/* a grab means that we may never see the button release */
|
||||
if (event->mode == GDK_CROSSING_GRAB || event->mode == GDK_CROSSING_GTK_GRAB)
|
||||
icon_info->pressed = FALSE;
|
||||
gtk_css_node_remove_state (icon_info->css_node, GTK_STATE_FLAG_ACTIVE);
|
||||
|
||||
if (should_prelight (entry, i))
|
||||
{
|
||||
icon_info->prelight = FALSE;
|
||||
gtk_widget_queue_draw (widget);
|
||||
}
|
||||
gtk_css_node_remove_state (icon_info->css_node, GTK_STATE_FLAG_PRELIGHT);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -4295,15 +4363,10 @@ gtk_entry_event (GtkWidget *widget,
|
||||
case GDK_BUTTON_PRESS:
|
||||
case GDK_2BUTTON_PRESS:
|
||||
case GDK_3BUTTON_PRESS:
|
||||
if (should_prelight (GTK_ENTRY (widget), i))
|
||||
{
|
||||
icon_info->prelight = FALSE;
|
||||
gtk_widget_queue_draw (widget);
|
||||
}
|
||||
|
||||
priv->start_x = x;
|
||||
priv->start_y = y;
|
||||
icon_info->pressed = TRUE;
|
||||
gtk_css_node_add_state (icon_info->css_node, GTK_STATE_FLAG_ACTIVE);
|
||||
icon_info->device = device;
|
||||
|
||||
if (!icon_info->nonactivatable)
|
||||
@@ -4316,7 +4379,7 @@ gtk_entry_event (GtkWidget *widget,
|
||||
break;
|
||||
/* Fall through */
|
||||
case GDK_MOTION_NOTIFY:
|
||||
if (icon_info->pressed &&
|
||||
if ((gtk_css_node_get_state (icon_info->css_node) & GTK_STATE_FLAG_ACTIVE) &&
|
||||
icon_info->target_list != NULL &&
|
||||
gtk_drag_check_threshold (widget,
|
||||
priv->start_x,
|
||||
@@ -4342,18 +4405,9 @@ gtk_entry_event (GtkWidget *widget,
|
||||
icon_info->current_sequence = NULL;
|
||||
/* Fall through */
|
||||
case GDK_BUTTON_RELEASE:
|
||||
icon_info->pressed = FALSE;
|
||||
gtk_css_node_remove_state (icon_info->css_node, GTK_STATE_FLAG_ACTIVE);
|
||||
icon_info->device = NULL;
|
||||
|
||||
if (should_prelight (GTK_ENTRY (widget), i) &&
|
||||
x >= 0 && y >= 0 &&
|
||||
x < gdk_window_get_width (icon_info->window) &&
|
||||
y < gdk_window_get_height (icon_info->window))
|
||||
{
|
||||
icon_info->prelight = TRUE;
|
||||
gtk_widget_queue_draw (widget);
|
||||
}
|
||||
|
||||
if (!icon_info->nonactivatable)
|
||||
g_signal_emit (widget, signals[ICON_RELEASE], 0, i, event);
|
||||
|
||||
@@ -5073,6 +5127,8 @@ gtk_entry_state_flags_changed (GtkWidget *widget,
|
||||
gtk_editable_select_region (GTK_EDITABLE (entry), priv->current_pos, priv->current_pos);
|
||||
}
|
||||
|
||||
update_state_for_icon_infos (widget);
|
||||
|
||||
gtk_entry_update_cached_style_values (entry);
|
||||
}
|
||||
|
||||
@@ -6497,7 +6553,7 @@ gtk_entry_draw_text (GtkEntry *entry,
|
||||
gtk_style_context_get_color (context, state, &text_color);
|
||||
|
||||
/* Get foreground color for progressbars */
|
||||
gtk_entry_prepare_context_for_progress (entry, context);
|
||||
gtk_style_context_save_to_node (context, priv->progress_node);
|
||||
gtk_style_context_get_color (context, state, &bar_text_color);
|
||||
gtk_style_context_restore (context);
|
||||
|
||||
@@ -7437,6 +7493,8 @@ gtk_entry_clear (GtkEntry *entry,
|
||||
if (GDK_IS_WINDOW (icon_info->window))
|
||||
gdk_window_hide (icon_info->window);
|
||||
|
||||
gtk_css_node_set_visible (icon_info->css_node, FALSE);
|
||||
|
||||
storage_type = _gtk_icon_helper_get_storage_type (icon_info->icon_helper);
|
||||
|
||||
switch (storage_type)
|
||||
@@ -7484,7 +7542,7 @@ gtk_entry_ensure_pixbuf (GtkEntry *entry,
|
||||
GdkPixbuf *pix;
|
||||
|
||||
context = gtk_widget_get_style_context (GTK_WIDGET (entry));
|
||||
gtk_entry_prepare_context_for_icon (entry, context, icon_pos);
|
||||
gtk_style_context_save_to_node (context, priv->icons[icon_pos]->css_node);
|
||||
|
||||
pix = _gtk_icon_helper_ensure_pixbuf (icon_info->icon_helper,
|
||||
context);
|
||||
@@ -8494,6 +8552,8 @@ gtk_entry_set_icon_from_pixbuf (GtkEntry *entry,
|
||||
_gtk_icon_helper_set_icon_size (icon_info->icon_helper,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
|
||||
gtk_css_node_set_visible (icon_info->css_node, TRUE);
|
||||
|
||||
if (icon_pos == GTK_ENTRY_ICON_PRIMARY)
|
||||
{
|
||||
g_object_notify (G_OBJECT (entry), "primary-icon-pixbuf");
|
||||
@@ -8560,6 +8620,8 @@ gtk_entry_set_icon_from_stock (GtkEntry *entry,
|
||||
{
|
||||
_gtk_icon_helper_set_stock_id (icon_info->icon_helper, new_id, GTK_ICON_SIZE_MENU);
|
||||
|
||||
gtk_css_node_set_visible (icon_info->css_node, TRUE);
|
||||
|
||||
if (icon_pos == GTK_ENTRY_ICON_PRIMARY)
|
||||
{
|
||||
g_object_notify (G_OBJECT (entry), "primary-icon-stock");
|
||||
@@ -8627,6 +8689,8 @@ gtk_entry_set_icon_from_icon_name (GtkEntry *entry,
|
||||
{
|
||||
_gtk_icon_helper_set_icon_name (icon_info->icon_helper, new_name, GTK_ICON_SIZE_MENU);
|
||||
|
||||
gtk_css_node_set_visible (icon_info->css_node, TRUE);
|
||||
|
||||
if (icon_pos == GTK_ENTRY_ICON_PRIMARY)
|
||||
{
|
||||
g_object_notify (G_OBJECT (entry), "primary-icon-name");
|
||||
@@ -8693,6 +8757,8 @@ gtk_entry_set_icon_from_gicon (GtkEntry *entry,
|
||||
{
|
||||
_gtk_icon_helper_set_gicon (icon_info->icon_helper, icon, GTK_ICON_SIZE_MENU);
|
||||
|
||||
gtk_css_node_set_visible (icon_info->css_node, TRUE);
|
||||
|
||||
if (icon_pos == GTK_ENTRY_ICON_PRIMARY)
|
||||
{
|
||||
g_object_notify (G_OBJECT (entry), "primary-icon-gicon");
|
||||
@@ -8959,14 +9025,15 @@ gtk_entry_set_icon_sensitive (GtkEntry *entry,
|
||||
{
|
||||
icon_info->insensitive = !sensitive;
|
||||
|
||||
icon_info->pressed = FALSE;
|
||||
icon_info->prelight = FALSE;
|
||||
gtk_css_node_remove_state (icon_info->css_node, GTK_STATE_FLAG_PRELIGHT | GTK_STATE_FLAG_ACTIVE);
|
||||
if (!gtk_widget_is_sensitive (GTK_WIDGET (entry)) || icon_info->insensitive)
|
||||
gtk_css_node_add_state (icon_info->css_node, GTK_STATE_FLAG_INSENSITIVE);
|
||||
else
|
||||
gtk_css_node_remove_state (icon_info->css_node, GTK_STATE_FLAG_INSENSITIVE);
|
||||
|
||||
if (gtk_widget_get_realized (GTK_WIDGET (entry)))
|
||||
update_cursors (GTK_WIDGET (entry));
|
||||
|
||||
gtk_widget_queue_draw (GTK_WIDGET (entry));
|
||||
|
||||
g_object_notify (G_OBJECT (entry),
|
||||
icon_pos == GTK_ENTRY_ICON_PRIMARY ? "primary-icon-sensitive" : "secondary-icon-sensitive");
|
||||
}
|
||||
@@ -9478,7 +9545,7 @@ check_undo_icon_grab (GtkEntry *entry,
|
||||
!gtk_widget_device_is_shadowed (GTK_WIDGET (entry), info->device))
|
||||
return;
|
||||
|
||||
info->pressed = FALSE;
|
||||
gtk_css_node_remove_state (info->css_node, GTK_STATE_FLAG_ACTIVE);
|
||||
info->current_sequence = NULL;
|
||||
info->device = NULL;
|
||||
}
|
||||
@@ -10552,6 +10619,8 @@ gtk_entry_start_pulse_mode (GtkEntry *entry)
|
||||
priv->progress_pulse_mode = TRUE;
|
||||
priv->tick_id = gtk_widget_add_tick_callback (GTK_WIDGET (entry), tick_cb, NULL, NULL);
|
||||
|
||||
gtk_css_node_add_class (priv->progress_node, GTK_STYLE_CLASS_PULSE);
|
||||
|
||||
priv->progress_fraction = 0.0;
|
||||
priv->progress_pulse_way_back = FALSE;
|
||||
priv->progress_pulse_current = 0.0;
|
||||
@@ -10572,6 +10641,8 @@ gtk_entry_stop_pulse_mode (GtkEntry *entry)
|
||||
priv->progress_pulse_mode = FALSE;
|
||||
gtk_widget_remove_tick_callback (GTK_WIDGET (entry), priv->tick_id);
|
||||
priv->tick_id = 0;
|
||||
|
||||
gtk_css_node_remove_class (priv->progress_node, GTK_STYLE_CLASS_PULSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2509,10 +2509,10 @@ gtk_entry_completion_changed (GtkWidget *widget,
|
||||
|
||||
/* (re)install completion timeout */
|
||||
if (completion->priv->completion_timeout)
|
||||
{
|
||||
g_source_remove (completion->priv->completion_timeout);
|
||||
completion->priv->completion_timeout = 0;
|
||||
}
|
||||
{
|
||||
g_source_remove (completion->priv->completion_timeout);
|
||||
completion->priv->completion_timeout = 0;
|
||||
}
|
||||
|
||||
if (!gtk_entry_get_text (entry))
|
||||
return;
|
||||
|
||||
@@ -1033,12 +1033,11 @@ gtk_file_chooser_button_destroy (GtkWidget *widget)
|
||||
priv->dialog = NULL;
|
||||
}
|
||||
|
||||
if (priv->model && gtk_tree_model_get_iter_first (priv->model, &iter))
|
||||
if (priv->model && gtk_tree_model_get_iter_first (priv->model, &iter)) do
|
||||
{
|
||||
do
|
||||
model_free_row_data (button, &iter);
|
||||
while (gtk_tree_model_iter_next (priv->model, &iter));
|
||||
model_free_row_data (button, &iter);
|
||||
}
|
||||
while (gtk_tree_model_iter_next (priv->model, &iter));
|
||||
|
||||
if (priv->dnd_select_folder_cancellable)
|
||||
{
|
||||
|
||||
@@ -267,8 +267,7 @@ set_complete_on_load (GtkFileChooserEntry *chooser_entry,
|
||||
gboolean complete_on_load)
|
||||
{
|
||||
/* a completion was triggered, but we couldn't do it.
|
||||
* So no text was inserted when pressing tab, so we beep
|
||||
*/
|
||||
* So no text was inserted when pressing tab, so we beep */
|
||||
if (chooser_entry->complete_on_load && !complete_on_load)
|
||||
gtk_widget_error_bell (GTK_WIDGET (chooser_entry));
|
||||
|
||||
|
||||
+100
-144
@@ -229,10 +229,6 @@ struct _GtkFileChooserWidgetPrivate {
|
||||
GtkWidget *browse_path_bar_hbox;
|
||||
GtkSizeGroup *browse_path_bar_size_group;
|
||||
GtkWidget *browse_path_bar;
|
||||
GtkWidget *new_folder_name_entry;
|
||||
GtkWidget *new_folder_create_button;
|
||||
GtkWidget *new_folder_error_label;
|
||||
GtkWidget *new_folder_popover;
|
||||
|
||||
GtkFileSystemModel *browse_files_model;
|
||||
char *browse_files_last_selected_name;
|
||||
@@ -305,6 +301,9 @@ struct _GtkFileChooserWidgetPrivate {
|
||||
|
||||
guint location_changed_id;
|
||||
|
||||
GSource *edited_idle;
|
||||
char *edited_new_text;
|
||||
|
||||
gulong settings_signal_id;
|
||||
int icon_size;
|
||||
|
||||
@@ -656,6 +655,8 @@ gtk_file_chooser_widget_finalize (GObject *object)
|
||||
|
||||
g_free (priv->preview_display_name);
|
||||
|
||||
g_free (priv->edited_new_text);
|
||||
|
||||
impl->priv = NULL;
|
||||
|
||||
G_OBJECT_CLASS (gtk_file_chooser_widget_parent_class)->finalize (object);
|
||||
@@ -936,159 +937,114 @@ new_folder_button_clicked (GtkButton *button,
|
||||
gtk_tree_path_free (path);
|
||||
}
|
||||
|
||||
static void
|
||||
new_folder_popover_active (GtkWidget *button,
|
||||
GParamSpec *pspec,
|
||||
GtkFileChooserWidget *impl)
|
||||
static GSource *
|
||||
add_idle_while_impl_is_alive (GtkFileChooserWidget *impl, GCallback callback)
|
||||
{
|
||||
GtkFileChooserWidgetPrivate *priv = impl->priv;
|
||||
GSource *source;
|
||||
|
||||
gtk_entry_set_text (GTK_ENTRY (priv->new_folder_name_entry), "");
|
||||
gtk_widget_set_sensitive (priv->new_folder_create_button, FALSE);
|
||||
gtk_label_set_text (GTK_LABEL (priv->new_folder_error_label), "");
|
||||
source = g_idle_source_new ();
|
||||
g_source_set_closure (source,
|
||||
g_cclosure_new_object (callback, G_OBJECT (impl)));
|
||||
g_source_attach (source, NULL);
|
||||
|
||||
return source;
|
||||
}
|
||||
|
||||
struct FileExistsData
|
||||
{
|
||||
GtkFileChooserWidget *impl;
|
||||
gboolean file_exists_and_is_not_folder;
|
||||
GFile *parent_file;
|
||||
GFile *file;
|
||||
};
|
||||
|
||||
static void
|
||||
name_exists_get_info_cb (GCancellable *cancellable,
|
||||
GFileInfo *info,
|
||||
const GError *error,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct FileExistsData *data = user_data;
|
||||
GtkFileChooserWidget *impl = data->impl;
|
||||
GtkFileChooserWidgetPrivate *priv = impl->priv;
|
||||
|
||||
if (cancellable != priv->file_exists_get_info_cancellable)
|
||||
goto out;
|
||||
|
||||
priv->file_exists_get_info_cancellable = NULL;
|
||||
|
||||
if (g_cancellable_is_cancelled (cancellable))
|
||||
goto out;
|
||||
|
||||
if (info != NULL)
|
||||
{
|
||||
const gchar *msg;
|
||||
|
||||
if (_gtk_file_info_consider_as_directory (info))
|
||||
msg = _("A folder with that name already exists");
|
||||
else
|
||||
msg = _("A file with that name already exists");
|
||||
|
||||
gtk_widget_set_sensitive (priv->new_folder_create_button, FALSE);
|
||||
gtk_label_set_text (GTK_LABEL (priv->new_folder_error_label), msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_set_sensitive (priv->new_folder_create_button, TRUE);
|
||||
gtk_label_set_text (GTK_LABEL (priv->new_folder_error_label), "");
|
||||
}
|
||||
|
||||
out:
|
||||
g_object_unref (impl);
|
||||
g_object_unref (data->file);
|
||||
g_object_unref (data->parent_file);
|
||||
g_free (data);
|
||||
g_object_unref (cancellable);
|
||||
}
|
||||
|
||||
static void
|
||||
check_valid_folder_name (GtkFileChooserWidget *impl,
|
||||
const gchar *name)
|
||||
/* Idle handler for creating a new folder after editing its name cell, or for
|
||||
* canceling the editing.
|
||||
*/
|
||||
static gboolean
|
||||
edited_idle_cb (GtkFileChooserWidget *impl)
|
||||
{
|
||||
GtkFileChooserWidgetPrivate *priv = impl->priv;
|
||||
|
||||
gtk_widget_set_sensitive (priv->new_folder_create_button, FALSE);
|
||||
gdk_threads_enter ();
|
||||
|
||||
g_source_destroy (priv->edited_idle);
|
||||
priv->edited_idle = NULL;
|
||||
|
||||
if (name[0] == '\0')
|
||||
gtk_label_set_text (GTK_LABEL (priv->new_folder_error_label), "");
|
||||
else if (strcmp (name, ".") == 0)
|
||||
gtk_label_set_text (GTK_LABEL (priv->new_folder_error_label),
|
||||
_("A folder cannot be called “.”"));
|
||||
else if (strcmp (name, "..") == 0)
|
||||
gtk_label_set_text (GTK_LABEL (priv->new_folder_error_label),
|
||||
_("A folder cannot be called “..”"));
|
||||
else if (strchr (name, '/') != NULL)
|
||||
gtk_label_set_text (GTK_LABEL (priv->new_folder_error_label),
|
||||
_("Folder names cannot contain “/”"));
|
||||
else
|
||||
_gtk_file_system_model_remove_editable (priv->browse_files_model);
|
||||
g_object_set (priv->list_name_renderer, "editable", FALSE, NULL);
|
||||
|
||||
gtk_widget_set_sensitive (priv->browse_new_folder_button, TRUE);
|
||||
|
||||
if (priv->edited_new_text /* not cancelled? */
|
||||
&& (strlen (priv->edited_new_text) != 0)
|
||||
&& (strcmp (priv->edited_new_text, DEFAULT_NEW_FOLDER_NAME) != 0)) /* Don't create folder if name is empty or has not been edited */
|
||||
{
|
||||
GFile *file;
|
||||
GError *error = NULL;
|
||||
GFile *file;
|
||||
|
||||
file = g_file_get_child_for_display_name (priv->current_folder, name, &error);
|
||||
if (file == NULL)
|
||||
{
|
||||
gtk_label_set_text (GTK_LABEL (priv->new_folder_error_label), error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
file = g_file_get_child_for_display_name (priv->current_folder,
|
||||
priv->edited_new_text,
|
||||
&error);
|
||||
if (file)
|
||||
{
|
||||
GError *error = NULL;
|
||||
|
||||
if (g_file_make_directory (file, NULL, &error))
|
||||
change_folder_and_display_error (impl, file, FALSE);
|
||||
else
|
||||
error_creating_folder_dialog (impl, file, error);
|
||||
|
||||
g_object_unref (file);
|
||||
}
|
||||
else
|
||||
{
|
||||
struct FileExistsData *data;
|
||||
error_creating_folder_dialog (impl, file, error);
|
||||
|
||||
gtk_label_set_text (GTK_LABEL (priv->new_folder_error_label), "");
|
||||
|
||||
data = g_new0 (struct FileExistsData, 1);
|
||||
data->impl = g_object_ref (impl);
|
||||
data->parent_file = g_object_ref (priv->current_folder);
|
||||
data->file = g_object_ref (file);
|
||||
|
||||
if (priv->file_exists_get_info_cancellable)
|
||||
g_cancellable_cancel (priv->file_exists_get_info_cancellable);
|
||||
|
||||
priv->file_exists_get_info_cancellable =
|
||||
_gtk_file_system_get_info (priv->file_system,
|
||||
file,
|
||||
"standard::type",
|
||||
name_exists_get_info_cb,
|
||||
data);
|
||||
|
||||
g_object_unref (file);
|
||||
}
|
||||
g_free (priv->edited_new_text);
|
||||
priv->edited_new_text = NULL;
|
||||
}
|
||||
|
||||
gdk_threads_leave ();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
new_folder_name_changed (GtkEntry *entry,
|
||||
GtkFileChooserWidget *impl)
|
||||
{
|
||||
check_valid_folder_name (impl, gtk_entry_get_text (entry));
|
||||
}
|
||||
|
||||
static void
|
||||
new_folder_create_clicked (GtkButton *button,
|
||||
GtkFileChooserWidget *impl)
|
||||
queue_edited_idle (GtkFileChooserWidget *impl,
|
||||
const gchar *new_text)
|
||||
{
|
||||
GtkFileChooserWidgetPrivate *priv = impl->priv;
|
||||
GError *error = NULL;
|
||||
GFile *file;
|
||||
const gchar *name;
|
||||
|
||||
name = gtk_entry_get_text (GTK_ENTRY (priv->new_folder_name_entry));
|
||||
file = g_file_get_child_for_display_name (priv->current_folder, name, &error);
|
||||
/* We create the folder in an idle handler so that we don't modify the tree
|
||||
* just now.
|
||||
*/
|
||||
|
||||
gtk_widget_hide (priv->new_folder_popover);
|
||||
if (!priv->edited_idle)
|
||||
priv->edited_idle = add_idle_while_impl_is_alive (impl, G_CALLBACK (edited_idle_cb));
|
||||
|
||||
if (file)
|
||||
{
|
||||
if (g_file_make_directory (file, NULL, &error))
|
||||
change_folder_and_display_error (impl, file, FALSE);
|
||||
else
|
||||
error_creating_folder_dialog (impl, file, error);
|
||||
g_object_unref (file);
|
||||
}
|
||||
else
|
||||
error_creating_folder_dialog (impl, file, error);
|
||||
g_free (priv->edited_new_text);
|
||||
priv->edited_new_text = g_strdup (new_text);
|
||||
}
|
||||
|
||||
/* Callback used from the text cell renderer when the new folder is named */
|
||||
static void
|
||||
renderer_edited_cb (GtkCellRendererText *cell_renderer_text,
|
||||
const gchar *path,
|
||||
const gchar *new_text,
|
||||
GtkFileChooserWidget *impl)
|
||||
{
|
||||
/* work around bug #154921 */
|
||||
g_object_set (cell_renderer_text,
|
||||
"mode", GTK_CELL_RENDERER_MODE_INERT, NULL);
|
||||
queue_edited_idle (impl, new_text);
|
||||
}
|
||||
|
||||
/* Callback used from the text cell renderer when the new folder edition gets
|
||||
* canceled.
|
||||
*/
|
||||
static void
|
||||
renderer_editing_canceled_cb (GtkCellRendererText *cell_renderer_text,
|
||||
GtkFileChooserWidget *impl)
|
||||
{
|
||||
/* work around bug #154921 */
|
||||
g_object_set (cell_renderer_text,
|
||||
"mode", GTK_CELL_RENDERER_MODE_INERT, NULL);
|
||||
queue_edited_idle (impl, NULL);
|
||||
}
|
||||
|
||||
|
||||
struct selection_check_closure {
|
||||
GtkFileChooserWidget *impl;
|
||||
int num_selected;
|
||||
@@ -1242,7 +1198,6 @@ browse_files_key_press_event_cb (GtkWidget *widget,
|
||||
|
||||
if ((event->keyval == GDK_KEY_slash
|
||||
|| event->keyval == GDK_KEY_KP_Divide
|
||||
|| g_unichar_isalnum (gdk_keyval_to_unicode (event->keyval))
|
||||
#ifdef G_OS_UNIX
|
||||
|| event->keyval == GDK_KEY_asciitilde
|
||||
#endif
|
||||
@@ -5526,6 +5481,14 @@ should_respond_after_confirm_overwrite (GtkFileChooserWidget *impl,
|
||||
}
|
||||
}
|
||||
|
||||
struct FileExistsData
|
||||
{
|
||||
GtkFileChooserWidget *impl;
|
||||
gboolean file_exists_and_is_not_folder;
|
||||
GFile *parent_file;
|
||||
GFile *file;
|
||||
};
|
||||
|
||||
static void
|
||||
name_entry_get_parent_info_cb (GCancellable *cancellable,
|
||||
GFileInfo *info,
|
||||
@@ -6578,7 +6541,7 @@ recent_start_loading (GtkFileChooserWidget *impl)
|
||||
load_data->items = NULL;
|
||||
|
||||
/* begin lazy loading the recent files into the model */
|
||||
priv->load_recent_id = gdk_threads_add_idle_full (G_PRIORITY_DEFAULT,
|
||||
priv->load_recent_id = gdk_threads_add_idle_full (G_PRIORITY_HIGH_IDLE + 30,
|
||||
recent_idle_load,
|
||||
load_data,
|
||||
recent_idle_cleanup);
|
||||
@@ -7001,8 +6964,6 @@ location_popup_handler (GtkFileChooserWidget *impl,
|
||||
operation_mode_set (impl, OPERATION_MODE_BROWSE);
|
||||
if (priv->current_folder)
|
||||
change_folder_and_display_error (impl, priv->current_folder, FALSE);
|
||||
else
|
||||
switch_to_home_dir (impl);
|
||||
}
|
||||
|
||||
if (priv->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
|
||||
@@ -7527,10 +7488,6 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class)
|
||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, list_mtime_column);
|
||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, list_size_column);
|
||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, list_location_column);
|
||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, new_folder_name_entry);
|
||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, new_folder_create_button);
|
||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, new_folder_error_label);
|
||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, new_folder_popover);
|
||||
|
||||
/* And a *lot* of callbacks to bind ... */
|
||||
gtk_widget_class_bind_template_callback (widget_class, browse_files_key_press_event_cb);
|
||||
@@ -7543,6 +7500,8 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class)
|
||||
gtk_widget_class_bind_template_callback (widget_class, file_list_drag_motion_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, list_selection_changed);
|
||||
gtk_widget_class_bind_template_callback (widget_class, list_cursor_changed);
|
||||
gtk_widget_class_bind_template_callback (widget_class, renderer_editing_canceled_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, renderer_edited_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, filter_combo_changed);
|
||||
gtk_widget_class_bind_template_callback (widget_class, new_folder_button_clicked);
|
||||
gtk_widget_class_bind_template_callback (widget_class, path_bar_clicked);
|
||||
@@ -7551,9 +7510,6 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class)
|
||||
gtk_widget_class_bind_template_callback (widget_class, places_sidebar_show_enter_location_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, search_entry_activate_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, search_entry_stop_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, new_folder_popover_active);
|
||||
gtk_widget_class_bind_template_callback (widget_class, new_folder_name_changed);
|
||||
gtk_widget_class_bind_template_callback (widget_class, new_folder_create_clicked);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
+2
-49
@@ -91,46 +91,7 @@
|
||||
*
|
||||
* If you need to initialize OpenGL state, e.g. buffer objects or
|
||||
* shaders, you should use the #GtkWidget::realize signal; you
|
||||
* can use the #GtkWidget::unrealize signal to clean up. Since the
|
||||
* #GdkGLContext creation and initialization may fail, you will
|
||||
* need to check for errors, using gtk_gl_area_get_error(). An example
|
||||
* of how to safely initialize the GL state is:
|
||||
*
|
||||
* |[<!-- language="C" -->
|
||||
* static void
|
||||
* on_realize (GtkGLarea *area)
|
||||
* {
|
||||
* // We need to make the context current if we want to
|
||||
* // call GL API
|
||||
* gtk_gl_area_make_current (area);
|
||||
*
|
||||
* // If there were errors during the initialization or
|
||||
* // when trying to make the context current, this
|
||||
* // function will return a #GError for you to catch
|
||||
* if (gtk_gl_area_get_error (area) != NULL)
|
||||
* return;
|
||||
*
|
||||
* // You can also use gtk_gl_area_set_error() in order
|
||||
* // to show eventual initialization errors on the
|
||||
* // GtkGLArea widget itself
|
||||
* GError *internal_error = NULL;
|
||||
* init_buffer_objects (&error);
|
||||
* if (error != NULL)
|
||||
* {
|
||||
* gtk_gl_area_set_error (area, error);
|
||||
* g_error_free (error);
|
||||
* return;
|
||||
* }
|
||||
*
|
||||
* init_shaders (&error);
|
||||
* if (error != NULL)
|
||||
* {
|
||||
* gtk_gl_area_set_error (area, error);
|
||||
* g_error_free (error);
|
||||
* return;
|
||||
* }
|
||||
* }
|
||||
* ]|
|
||||
* can use the #GtkWidget::unrealize signal to clean up.
|
||||
*
|
||||
* If you need to change the options for creating the #GdkGLContext
|
||||
* you should use the #GtkGLArea::create-context signal.
|
||||
@@ -487,11 +448,6 @@ gtk_gl_area_attach_buffers (GtkGLArea *area)
|
||||
{
|
||||
GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area);
|
||||
|
||||
g_return_if_fail (GTK_IS_GL_AREA (area));
|
||||
|
||||
if (priv->context == NULL)
|
||||
return;
|
||||
|
||||
gtk_gl_area_make_current (area);
|
||||
|
||||
if (!priv->have_buffers)
|
||||
@@ -675,9 +631,6 @@ gtk_gl_area_draw (GtkWidget *widget,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (priv->context == NULL)
|
||||
return FALSE;
|
||||
|
||||
gtk_gl_area_make_current (area);
|
||||
|
||||
gtk_gl_area_attach_buffers (area);
|
||||
@@ -1348,6 +1301,6 @@ gtk_gl_area_make_current (GtkGLArea *area)
|
||||
|
||||
g_return_if_fail (gtk_widget_get_realized (widget));
|
||||
|
||||
if (priv->context != NULL)
|
||||
if (priv->context)
|
||||
gdk_gl_context_make_current (priv->context);
|
||||
}
|
||||
|
||||
+1
-1
@@ -876,7 +876,7 @@ _gtk_icon_helper_get_size (GtkIconHelper *self,
|
||||
width = gdk_pixbuf_animation_get_width (self->priv->animation);
|
||||
height = gdk_pixbuf_animation_get_height (self->priv->animation);
|
||||
}
|
||||
else if (self->priv->icon_size != GTK_ICON_SIZE_INVALID)
|
||||
else if (self->priv->icon_size != -1)
|
||||
{
|
||||
ensure_icon_size (self, context, &width, &height);
|
||||
}
|
||||
|
||||
+7
-38
@@ -725,21 +725,6 @@ gtk_label_class_init (GtkLabelClass *class)
|
||||
_gtk_marshal_BOOLEAN__STRING,
|
||||
G_TYPE_BOOLEAN, 1, G_TYPE_STRING);
|
||||
|
||||
/**
|
||||
* GtkLabel:label:
|
||||
*
|
||||
* The contents of the label.
|
||||
*
|
||||
* If the string contains [Pango XML markup][PangoMarkupFormat], you will
|
||||
* have to set the #GtkLabel:use-markup property to %TRUE in order for the
|
||||
* label to display the markup attributes. See also gtk_label_set_markup()
|
||||
* for a convenience function that sets both this property and the
|
||||
* #GtkLabel:use-markup property at the same time.
|
||||
*
|
||||
* If the string contains underlines acting as mnemonics, you will have to
|
||||
* set the #GtkLabel:use-underline property to %TRUE in order for the label
|
||||
* to display them.
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_LABEL,
|
||||
g_param_spec_string ("label",
|
||||
@@ -2225,13 +2210,7 @@ gtk_label_recalculate (GtkLabel *label)
|
||||
* Sets the text within the #GtkLabel widget. It overwrites any text that
|
||||
* was there before.
|
||||
*
|
||||
* This function will clear any previously set mnemonic accelerators, and
|
||||
* set the #GtkLabel:use-underline property to %FALSE as a side effect.
|
||||
*
|
||||
* This function will set the #GtkLabel:use-markup property to %FALSE
|
||||
* as a side effect.
|
||||
*
|
||||
* See also: gtk_label_set_markup()
|
||||
* This will also clear any previously set mnemonic accelerators.
|
||||
**/
|
||||
void
|
||||
gtk_label_set_text (GtkLabel *label,
|
||||
@@ -2315,7 +2294,7 @@ gtk_label_get_attributes (GtkLabel *label)
|
||||
*
|
||||
* Sets the text of the label. The label is interpreted as
|
||||
* including embedded underlines and/or Pango markup depending
|
||||
* on the values of the #GtkLabel:use-underline and
|
||||
* on the values of the #GtkLabel:use-underline" and
|
||||
* #GtkLabel:use-markup properties.
|
||||
**/
|
||||
void
|
||||
@@ -2727,11 +2706,9 @@ gtk_label_set_markup_internal (GtkLabel *label,
|
||||
*
|
||||
* Parses @str which is marked up with the
|
||||
* [Pango text markup language][PangoMarkupFormat], setting the
|
||||
* label’s text and attribute list based on the parse results.
|
||||
*
|
||||
* If the @str is external data, you may need to escape it with
|
||||
* g_markup_escape_text() or g_markup_printf_escaped():
|
||||
*
|
||||
* label’s text and attribute list based on the parse results. If the @str is
|
||||
* external data, you may need to escape it with g_markup_escape_text() or
|
||||
* g_markup_printf_escaped():
|
||||
* |[<!-- language="C" -->
|
||||
* const char *format = "<span style=\"italic\">\%s</span>";
|
||||
* char *markup;
|
||||
@@ -2740,15 +2717,6 @@ gtk_label_set_markup_internal (GtkLabel *label,
|
||||
* gtk_label_set_markup (GTK_LABEL (label), markup);
|
||||
* g_free (markup);
|
||||
* ]|
|
||||
*
|
||||
* This function will set the #GtkLabel:use-markup property to %TRUE as
|
||||
* a side effect.
|
||||
*
|
||||
* If you set the label contents using the #GtkLabel:label property you
|
||||
* should also ensure that you set the #GtkLabel:use-markup property
|
||||
* accordingly.
|
||||
*
|
||||
* See also: gtk_label_set_text()
|
||||
**/
|
||||
void
|
||||
gtk_label_set_markup (GtkLabel *label,
|
||||
@@ -5389,7 +5357,8 @@ gtk_label_create_window (GtkLabel *label)
|
||||
GDK_BUTTON_RELEASE_MASK |
|
||||
GDK_LEAVE_NOTIFY_MASK |
|
||||
GDK_BUTTON_MOTION_MASK |
|
||||
GDK_POINTER_MOTION_MASK;
|
||||
GDK_POINTER_MOTION_MASK |
|
||||
GDK_POINTER_MOTION_HINT_MASK;
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_NOREDIR;
|
||||
if (gtk_widget_is_sensitive (widget) && priv->select_info && priv->select_info->selectable)
|
||||
{
|
||||
|
||||
@@ -3610,21 +3610,9 @@ gtk_list_box_bound_model_changed (GListModel *list,
|
||||
|
||||
item = g_list_model_get_item (list, position + i);
|
||||
widget = priv->create_widget_func (item, priv->create_widget_func_data);
|
||||
|
||||
/* We allow the create_widget_func to either return a full
|
||||
* reference or a floating reference. If we got the floating
|
||||
* reference, then turn it into a full reference now. That means
|
||||
* that gtk_list_box_insert() will take another full reference.
|
||||
* Finally, we'll release this full reference below, leaving only
|
||||
* the one held by the box.
|
||||
*/
|
||||
if (g_object_is_floating (widget))
|
||||
g_object_ref_sink (widget);
|
||||
|
||||
gtk_widget_show_all (widget);
|
||||
gtk_list_box_insert (box, widget, position + i);
|
||||
|
||||
g_object_unref (widget);
|
||||
g_object_unref (item);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -171,13 +171,13 @@ typedef void (*GtkListBoxUpdateHeaderFunc) (GtkListBoxRow *row,
|
||||
|
||||
/**
|
||||
* GtkListBoxCreateWidgetFunc:
|
||||
* @item: (type GObject): the item from the model for which to create a widget for
|
||||
* @item: the item from the model for which to create a widget for
|
||||
* @user_data: (closure): user data
|
||||
*
|
||||
* Called for list boxes that are bound to a #GListModel with
|
||||
* gtk_list_box_bind_model() for each item that gets added to the model.
|
||||
*
|
||||
* Returns: (transfer full): a #GtkWidget that represents @item
|
||||
* Returns: a #GtkWidget that represents @item
|
||||
*
|
||||
* Since: 3.16
|
||||
*/
|
||||
|
||||
+1
-1
@@ -890,7 +890,7 @@ set_align_widget_pointer (GtkMenuButton *menu_button,
|
||||
|
||||
priv->align_widget = align_widget;
|
||||
|
||||
if (priv->align_widget)
|
||||
if (align_widget)
|
||||
g_object_add_weak_pointer (G_OBJECT (priv->align_widget), (gpointer *) &priv->align_widget);
|
||||
}
|
||||
|
||||
|
||||
@@ -1436,10 +1436,13 @@ create_show_processes_dialog (GtkMountOperation *op,
|
||||
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
|
||||
|
||||
if (secondary != NULL)
|
||||
s = g_strdup_printf ("<big><b>%s</b></big>\n\n%s", primary, secondary);
|
||||
{
|
||||
s = g_strdup_printf ("<big><b>%s</b></big>\n\n%s", primary, secondary);
|
||||
}
|
||||
else
|
||||
s = g_strdup_printf ("%s", primary);
|
||||
|
||||
{
|
||||
s = g_strdup_printf ("%s", primary);
|
||||
}
|
||||
g_free (primary);
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label), s);
|
||||
@@ -1515,8 +1518,8 @@ create_show_processes_dialog (GtkMountOperation *op,
|
||||
priv->process_list_store = list_store;
|
||||
priv->process_tree_view = tree_view;
|
||||
/* set pointers to NULL when dialog goes away */
|
||||
g_object_add_weak_pointer (G_OBJECT (priv->process_list_store), (gpointer *) &priv->process_list_store);
|
||||
g_object_add_weak_pointer (G_OBJECT (priv->process_tree_view), (gpointer *) &priv->process_tree_view);
|
||||
g_object_add_weak_pointer (G_OBJECT (list_store), (gpointer *) &priv->process_list_store);
|
||||
g_object_add_weak_pointer (G_OBJECT (tree_view), (gpointer *) &priv->process_tree_view);
|
||||
|
||||
g_object_unref (list_store);
|
||||
g_object_ref (op);
|
||||
|
||||
+2
-3
@@ -24,7 +24,6 @@
|
||||
#if defined(HAVE__NL_PAPER_HEIGHT) && defined(HAVE__NL_PAPER_WIDTH)
|
||||
#include <langinfo.h>
|
||||
#endif
|
||||
#include <math.h>
|
||||
|
||||
#include "gtkpapersize.h"
|
||||
#include "gtkprintutils.h"
|
||||
@@ -443,8 +442,8 @@ gtk_paper_size_new_from_ipp (const gchar *ipp_name,
|
||||
x_dimension = _gtk_print_convert_from_mm (standard_names_offsets[i].width, GTK_UNIT_POINTS);
|
||||
y_dimension = _gtk_print_convert_from_mm (standard_names_offsets[i].height, GTK_UNIT_POINTS);
|
||||
|
||||
if (fabs (x_dimension - width) <= PAPER_SIZE_TOLERANCE &&
|
||||
fabs (y_dimension - height) <= PAPER_SIZE_TOLERANCE)
|
||||
if (abs (x_dimension - width) <= PAPER_SIZE_TOLERANCE &&
|
||||
abs (y_dimension - height) <= PAPER_SIZE_TOLERANCE)
|
||||
{
|
||||
display_name = g_strdup (g_dpgettext2 (GETTEXT_PACKAGE,
|
||||
"paper size",
|
||||
|
||||
+1
-4
@@ -304,10 +304,7 @@ gtk_popover_dispose (GObject *object)
|
||||
GtkPopoverPrivate *priv = popover->priv;
|
||||
|
||||
if (priv->window)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_data (priv->window, popover);
|
||||
_gtk_window_remove_popover (priv->window, GTK_WIDGET (object));
|
||||
}
|
||||
_gtk_window_remove_popover (priv->window, GTK_WIDGET (object));
|
||||
|
||||
priv->window = NULL;
|
||||
|
||||
|
||||
@@ -1785,7 +1785,7 @@ _gtk_print_operation_set_status (GtkPrintOperation *op,
|
||||
NC_("print operation status", "Finished with error")
|
||||
};
|
||||
|
||||
if (status > GTK_PRINT_STATUS_FINISHED_ABORTED)
|
||||
if (status < 0 || status > GTK_PRINT_STATUS_FINISHED_ABORTED)
|
||||
status = GTK_PRINT_STATUS_FINISHED_ABORTED;
|
||||
|
||||
if (string == NULL)
|
||||
|
||||
@@ -207,7 +207,7 @@ static GObject *gtk_print_unix_dialog_buildable_get_internal_child (GtkBuildabl
|
||||
GtkBuilder *builder,
|
||||
const gchar *childname);
|
||||
|
||||
static const gchar common_paper_sizes[][16] = {
|
||||
static const gchar const common_paper_sizes[][16] = {
|
||||
"na_letter",
|
||||
"na_legal",
|
||||
"iso_a4",
|
||||
|
||||
+29
-34
@@ -235,14 +235,14 @@ gtk_progress_bar_class_init (GtkProgressBarClass *class)
|
||||
g_param_spec_int ("xspacing",
|
||||
P_("X spacing"),
|
||||
P_("Extra spacing applied to the width of a progress bar."),
|
||||
0, G_MAXINT, 2,
|
||||
0, G_MAXINT, 7,
|
||||
G_PARAM_READWRITE));
|
||||
|
||||
gtk_widget_class_install_style_property (widget_class,
|
||||
g_param_spec_int ("yspacing",
|
||||
P_("Y spacing"),
|
||||
P_("Extra spacing applied to the height of a progress bar."),
|
||||
0, G_MAXINT, 2,
|
||||
0, G_MAXINT, 7,
|
||||
G_PARAM_READWRITE));
|
||||
|
||||
/**
|
||||
@@ -471,7 +471,7 @@ gtk_progress_bar_get_preferred_width (GtkWidget *widget,
|
||||
PangoLayout *layout;
|
||||
gint width;
|
||||
gint xspacing;
|
||||
gint bar_width;
|
||||
gint min_width;
|
||||
|
||||
g_return_if_fail (GTK_IS_PROGRESS_BAR (widget));
|
||||
|
||||
@@ -479,18 +479,17 @@ gtk_progress_bar_get_preferred_width (GtkWidget *widget,
|
||||
state = gtk_widget_get_state_flags (widget);
|
||||
gtk_style_context_get_padding (style_context, state, &padding);
|
||||
|
||||
gtk_widget_style_get (widget,
|
||||
"xspacing", &xspacing,
|
||||
NULL);
|
||||
|
||||
pbar = GTK_PROGRESS_BAR (widget);
|
||||
priv = pbar->priv;
|
||||
|
||||
width = padding.left + padding.right;
|
||||
width = padding.left + padding.right + xspacing;
|
||||
|
||||
if (priv->show_text)
|
||||
{
|
||||
gtk_widget_style_get (widget,
|
||||
"xspacing", &xspacing,
|
||||
NULL);
|
||||
width += xspacing;
|
||||
|
||||
buf = get_current_text (pbar);
|
||||
layout = gtk_widget_create_pango_layout (widget, buf);
|
||||
|
||||
@@ -522,14 +521,14 @@ gtk_progress_bar_get_preferred_width (GtkWidget *widget,
|
||||
|
||||
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
gtk_widget_style_get (widget,
|
||||
"min-horizontal-bar-width", &bar_width,
|
||||
"min-horizontal-bar-width", &min_width,
|
||||
NULL);
|
||||
else
|
||||
gtk_widget_style_get (widget,
|
||||
"min-vertical-bar-width", &bar_width,
|
||||
"min-vertical-bar-width", &min_width,
|
||||
NULL);
|
||||
|
||||
*minimum = *natural = width + bar_width;
|
||||
*minimum = *natural = MAX (min_width, width);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -547,7 +546,7 @@ gtk_progress_bar_get_preferred_height (GtkWidget *widget,
|
||||
PangoLayout *layout;
|
||||
gint height;
|
||||
gint yspacing;
|
||||
gint bar_height;
|
||||
gint min_height;
|
||||
|
||||
g_return_if_fail (GTK_IS_PROGRESS_BAR (widget));
|
||||
|
||||
@@ -555,18 +554,17 @@ gtk_progress_bar_get_preferred_height (GtkWidget *widget,
|
||||
state = gtk_widget_get_state_flags (widget);
|
||||
gtk_style_context_get_padding (context, state, &padding);
|
||||
|
||||
gtk_widget_style_get (widget,
|
||||
"yspacing", &yspacing,
|
||||
NULL);
|
||||
|
||||
pbar = GTK_PROGRESS_BAR (widget);
|
||||
priv = pbar->priv;
|
||||
|
||||
height = padding.top + padding.bottom;
|
||||
height = padding.top + padding.bottom + yspacing;
|
||||
|
||||
if (priv->show_text)
|
||||
{
|
||||
gtk_widget_style_get (widget,
|
||||
"yspacing", &yspacing,
|
||||
NULL);
|
||||
height += yspacing;
|
||||
|
||||
buf = get_current_text (pbar);
|
||||
layout = gtk_widget_create_pango_layout (widget, buf);
|
||||
|
||||
@@ -580,14 +578,14 @@ gtk_progress_bar_get_preferred_height (GtkWidget *widget,
|
||||
|
||||
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
gtk_widget_style_get (widget,
|
||||
"min-horizontal-bar-height", &bar_height,
|
||||
"min-horizontal-bar-height", &min_height,
|
||||
NULL);
|
||||
else
|
||||
gtk_widget_style_get (widget,
|
||||
"min-vertical-bar-height", &bar_height,
|
||||
"min-vertical-bar-height", &min_height,
|
||||
NULL);
|
||||
|
||||
*minimum = *natural = height + bar_height;
|
||||
*minimum = *natural = MAX (min_height, height);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -885,11 +883,16 @@ gtk_progress_bar_paint_text (GtkProgressBar *pbar,
|
||||
PangoLayout *layout;
|
||||
PangoRectangle logical_rect;
|
||||
GdkRectangle prelight_clip, start_clip, end_clip;
|
||||
gfloat text_xalign = 0.5;
|
||||
gfloat text_yalign = 0.0;
|
||||
|
||||
context = gtk_widget_get_style_context (widget);
|
||||
state = gtk_widget_get_state_flags (widget);
|
||||
gtk_style_context_get_padding (context, state, &padding);
|
||||
|
||||
if (gtk_widget_get_direction (widget) != GTK_TEXT_DIR_LTR)
|
||||
text_xalign = 1.0 - text_xalign;
|
||||
|
||||
buf = get_current_text (pbar);
|
||||
|
||||
layout = gtk_widget_create_pango_layout (widget, buf);
|
||||
@@ -899,16 +902,8 @@ gtk_progress_bar_paint_text (GtkProgressBar *pbar,
|
||||
|
||||
pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
|
||||
|
||||
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
{
|
||||
x = padding.left + (width - padding.left - padding.right - 2 - logical_rect.width) / 2;
|
||||
y = padding.top + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
x = padding.left + 1;
|
||||
y = padding.top + 1 + (height - padding.top - padding.bottom - 2 - logical_rect.height) / 2;
|
||||
}
|
||||
x = padding.left + 1 + text_xalign * (width - padding.left - padding.right - 2 - logical_rect.width);
|
||||
y = padding.top + 1 + text_yalign * (height - padding.top - padding.bottom - 2 - logical_rect.height);
|
||||
|
||||
rect.x = padding.left;
|
||||
rect.y = padding.top;
|
||||
@@ -1031,12 +1026,12 @@ gtk_progress_bar_draw (GtkWidget *widget,
|
||||
|
||||
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
{
|
||||
gtk_widget_style_get (widget, "min-horizontal-bar-height", &bar_height, NULL);
|
||||
bar_height = MIN_HORIZONTAL_BAR_HEIGHT;
|
||||
bar_width = width;
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_style_get (widget, "min-vertical-bar-width", &bar_width, NULL);
|
||||
bar_width = MIN_VERTICAL_BAR_WIDTH;
|
||||
bar_height = height;
|
||||
}
|
||||
|
||||
|
||||
+80
-23
@@ -26,7 +26,6 @@
|
||||
|
||||
#include "gtkradiobutton.h"
|
||||
|
||||
#include "gtkcontainerprivate.h"
|
||||
#include "gtkbuttonprivate.h"
|
||||
#include "gtktogglebuttonprivate.h"
|
||||
#include "gtklabel.h"
|
||||
@@ -594,6 +593,53 @@ gtk_radio_button_destroy (GtkWidget *widget)
|
||||
GTK_WIDGET_CLASS (gtk_radio_button_parent_class)->destroy (widget);
|
||||
}
|
||||
|
||||
static void
|
||||
get_coordinates (GtkWidget *widget,
|
||||
GtkWidget *reference,
|
||||
gint *x,
|
||||
gint *y)
|
||||
{
|
||||
GtkAllocation allocation;
|
||||
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
*x = allocation.x + allocation.width / 2;
|
||||
*y = allocation.y + allocation.height / 2;
|
||||
|
||||
gtk_widget_translate_coordinates (widget, reference, *x, *y, x, y);
|
||||
}
|
||||
|
||||
static gint
|
||||
left_right_compare (gconstpointer a,
|
||||
gconstpointer b,
|
||||
gpointer data)
|
||||
{
|
||||
gint x1, y1, x2, y2;
|
||||
|
||||
get_coordinates ((GtkWidget *)a, data, &x1, &y1);
|
||||
get_coordinates ((GtkWidget *)b, data, &x2, &y2);
|
||||
|
||||
if (y1 == y2)
|
||||
return (x1 < x2) ? -1 : ((x1 == x2) ? 0 : 1);
|
||||
else
|
||||
return (y1 < y2) ? -1 : 1;
|
||||
}
|
||||
|
||||
static gint
|
||||
up_down_compare (gconstpointer a,
|
||||
gconstpointer b,
|
||||
gpointer data)
|
||||
{
|
||||
gint x1, y1, x2, y2;
|
||||
|
||||
get_coordinates ((GtkWidget *)a, data, &x1, &y1);
|
||||
get_coordinates ((GtkWidget *)b, data, &x2, &y2);
|
||||
|
||||
if (x1 == x2)
|
||||
return (y1 < y2) ? -1 : ((y1 == y2) ? 0 : 1);
|
||||
else
|
||||
return (x1 < x2) ? -1 : 1;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_radio_button_focus (GtkWidget *widget,
|
||||
GtkDirectionType direction)
|
||||
@@ -607,34 +653,45 @@ gtk_radio_button_focus (GtkWidget *widget,
|
||||
*/
|
||||
if (!gtk_toggle_button_get_mode (GTK_TOGGLE_BUTTON (widget)))
|
||||
return GTK_WIDGET_CLASS (gtk_radio_button_parent_class)->focus (widget, direction);
|
||||
|
||||
|
||||
if (gtk_widget_is_focus (widget))
|
||||
{
|
||||
GList *children, *focus_list, *tmp_list;
|
||||
GtkWidget *toplevel;
|
||||
GSList *focus_list, *tmp_list;
|
||||
GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
|
||||
GtkWidget *new_focus = NULL;
|
||||
GSList *l;
|
||||
|
||||
if (direction == GTK_DIR_TAB_FORWARD ||
|
||||
direction == GTK_DIR_TAB_BACKWARD)
|
||||
return FALSE;
|
||||
switch (direction)
|
||||
{
|
||||
case GTK_DIR_LEFT:
|
||||
case GTK_DIR_RIGHT:
|
||||
focus_list = g_slist_copy (priv->group);
|
||||
focus_list = g_slist_sort_with_data (focus_list, left_right_compare, toplevel);
|
||||
break;
|
||||
case GTK_DIR_UP:
|
||||
case GTK_DIR_DOWN:
|
||||
focus_list = g_slist_copy (priv->group);
|
||||
focus_list = g_slist_sort_with_data (focus_list, up_down_compare, toplevel);
|
||||
break;
|
||||
case GTK_DIR_TAB_FORWARD:
|
||||
case GTK_DIR_TAB_BACKWARD:
|
||||
/* fall through */
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
toplevel = gtk_widget_get_toplevel (widget);
|
||||
children = NULL;
|
||||
for (l = priv->group; l; l = l->next)
|
||||
children = g_list_prepend (children, l->data);
|
||||
if (direction == GTK_DIR_LEFT || direction == GTK_DIR_UP)
|
||||
focus_list = g_slist_reverse (focus_list);
|
||||
|
||||
focus_list = _gtk_container_focus_sort (GTK_CONTAINER (toplevel), children, direction, widget);
|
||||
tmp_list = g_list_find (focus_list, widget);
|
||||
tmp_list = g_slist_find (focus_list, widget);
|
||||
|
||||
if (tmp_list)
|
||||
{
|
||||
tmp_list = tmp_list->next;
|
||||
|
||||
|
||||
while (tmp_list)
|
||||
{
|
||||
GtkWidget *child = tmp_list->data;
|
||||
|
||||
|
||||
if (gtk_widget_get_mapped (child) && gtk_widget_is_sensitive (child))
|
||||
{
|
||||
new_focus = child;
|
||||
@@ -652,19 +709,18 @@ gtk_radio_button_focus (GtkWidget *widget,
|
||||
while (tmp_list)
|
||||
{
|
||||
GtkWidget *child = tmp_list->data;
|
||||
|
||||
|
||||
if (gtk_widget_get_mapped (child) && gtk_widget_is_sensitive (child))
|
||||
{
|
||||
new_focus = child;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
tmp_list = tmp_list->next;
|
||||
}
|
||||
}
|
||||
|
||||
g_list_free (focus_list);
|
||||
g_list_free (children);
|
||||
|
||||
g_slist_free (focus_list);
|
||||
|
||||
if (new_focus)
|
||||
{
|
||||
@@ -678,11 +734,12 @@ gtk_radio_button_focus (GtkWidget *widget,
|
||||
else
|
||||
{
|
||||
GtkRadioButton *selected_button = NULL;
|
||||
|
||||
|
||||
/* We accept the focus if, we don't have the focus and
|
||||
* - we are the currently active button in the group
|
||||
* - there is no currently active radio button.
|
||||
*/
|
||||
|
||||
tmp_slist = priv->group;
|
||||
while (tmp_slist)
|
||||
{
|
||||
@@ -691,7 +748,7 @@ gtk_radio_button_focus (GtkWidget *widget,
|
||||
selected_button = tmp_slist->data;
|
||||
tmp_slist = tmp_slist->next;
|
||||
}
|
||||
|
||||
|
||||
if (selected_button && selected_button != radio_button)
|
||||
return FALSE;
|
||||
|
||||
|
||||
+8
-66
@@ -208,8 +208,6 @@ gtk_radio_menu_item_set_group (GtkRadioMenuItem *radio_menu_item,
|
||||
|
||||
tmp_item->priv->group = priv->group;
|
||||
}
|
||||
|
||||
_gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (radio_menu_item), FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -284,7 +282,7 @@ gtk_radio_menu_item_new_with_mnemonic (GSList *group,
|
||||
|
||||
/**
|
||||
* gtk_radio_menu_item_new_from_widget: (constructor)
|
||||
* @group: (allow-none): An existing #GtkRadioMenuItem
|
||||
* @group: An existing #GtkRadioMenuItem
|
||||
*
|
||||
* Creates a new #GtkRadioMenuItem adding it to the same group as @group.
|
||||
*
|
||||
@@ -297,7 +295,7 @@ gtk_radio_menu_item_new_from_widget (GtkRadioMenuItem *group)
|
||||
{
|
||||
GSList *list = NULL;
|
||||
|
||||
g_return_val_if_fail (group == NULL || GTK_IS_RADIO_MENU_ITEM (group), NULL);
|
||||
g_return_val_if_fail (GTK_IS_RADIO_MENU_ITEM (group), NULL);
|
||||
|
||||
if (group)
|
||||
list = gtk_radio_menu_item_get_group (group);
|
||||
@@ -307,8 +305,8 @@ gtk_radio_menu_item_new_from_widget (GtkRadioMenuItem *group)
|
||||
|
||||
/**
|
||||
* gtk_radio_menu_item_new_with_mnemonic_from_widget: (constructor)
|
||||
* @group: (allow-none): An existing #GtkRadioMenuItem
|
||||
* @label: (allow-none): the text of the button, with an underscore in front of the
|
||||
* @group: An existing #GtkRadioMenuItem
|
||||
* @label: the text of the button, with an underscore in front of the
|
||||
* mnemonic character
|
||||
*
|
||||
* Creates a new GtkRadioMenuItem containing a label. The label will be
|
||||
@@ -327,7 +325,7 @@ gtk_radio_menu_item_new_with_mnemonic_from_widget (GtkRadioMenuItem *group,
|
||||
{
|
||||
GSList *list = NULL;
|
||||
|
||||
g_return_val_if_fail (group == NULL || GTK_IS_RADIO_MENU_ITEM (group), NULL);
|
||||
g_return_val_if_fail (GTK_IS_RADIO_MENU_ITEM (group), NULL);
|
||||
|
||||
if (group)
|
||||
list = gtk_radio_menu_item_get_group (group);
|
||||
@@ -337,8 +335,8 @@ gtk_radio_menu_item_new_with_mnemonic_from_widget (GtkRadioMenuItem *group,
|
||||
|
||||
/**
|
||||
* gtk_radio_menu_item_new_with_label_from_widget: (constructor)
|
||||
* @group: (allow-none): an existing #GtkRadioMenuItem
|
||||
* @label: (allow-none): the text for the label
|
||||
* @group: an existing #GtkRadioMenuItem
|
||||
* @label: the text for the label
|
||||
*
|
||||
* Creates a new GtkRadioMenuItem whose child is a simple GtkLabel.
|
||||
* The new #GtkRadioMenuItem is added to the same group as @group.
|
||||
@@ -353,7 +351,7 @@ gtk_radio_menu_item_new_with_label_from_widget (GtkRadioMenuItem *group,
|
||||
{
|
||||
GSList *list = NULL;
|
||||
|
||||
g_return_val_if_fail (group == NULL || GTK_IS_RADIO_MENU_ITEM (group), NULL);
|
||||
g_return_val_if_fail (GTK_IS_RADIO_MENU_ITEM (group), NULL);
|
||||
|
||||
if (group)
|
||||
list = gtk_radio_menu_item_get_group (group);
|
||||
@@ -558,59 +556,3 @@ gtk_radio_menu_item_activate (GtkMenuItem *menu_item)
|
||||
|
||||
gtk_widget_queue_draw (GTK_WIDGET (radio_menu_item));
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_radio_menu_item_join_group:
|
||||
* @radio_menu_item: a #GtkRadioMenuItem
|
||||
* @group_source: (allow-none): a #GtkRadioMenuItem whose group we are
|
||||
* joining, or %NULL to remove the @radio_menu_item from its current
|
||||
* group
|
||||
*
|
||||
* Joins a #GtkRadioMenuItem object to the group of another #GtkRadioMenuItem
|
||||
* object.
|
||||
*
|
||||
* This function should be used by language bindings to avoid the memory
|
||||
* manangement of the opaque #GSList of gtk_radio_menu_item_get_group()
|
||||
* and gtk_radio_menu_item_set_group().
|
||||
*
|
||||
* A common way to set up a group of #GtkRadioMenuItem instances is:
|
||||
*
|
||||
* |[
|
||||
* GtkRadioMenuItem *last_item = NULL;
|
||||
*
|
||||
* while ( ...more items to add... )
|
||||
* {
|
||||
* GtkRadioMenuItem *radio_item;
|
||||
*
|
||||
* radio_item = gtk_radio_menu_item_new (...);
|
||||
*
|
||||
* gtk_radio_menu_item_join_group (radio_item, last_item);
|
||||
* last_item = radio_item;
|
||||
* }
|
||||
* ]|
|
||||
*
|
||||
* Since: 3.18
|
||||
*/
|
||||
void
|
||||
gtk_radio_menu_item_join_group (GtkRadioMenuItem *radio_menu_item,
|
||||
GtkRadioMenuItem *group_source)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_RADIO_MENU_ITEM (radio_menu_item));
|
||||
g_return_if_fail (group_source == NULL || GTK_IS_RADIO_MENU_ITEM (group_source));
|
||||
|
||||
if (group_source != NULL)
|
||||
{
|
||||
GSList *group = gtk_radio_menu_item_get_group (group_source);
|
||||
|
||||
if (group == NULL)
|
||||
{
|
||||
/* if the group source does not have a group, we force one */
|
||||
gtk_radio_menu_item_set_group (group_source, NULL);
|
||||
group = gtk_radio_menu_item_get_group (group_source);
|
||||
}
|
||||
|
||||
gtk_radio_menu_item_set_group (radio_menu_item, group);
|
||||
}
|
||||
else
|
||||
gtk_radio_menu_item_set_group (radio_menu_item, NULL);
|
||||
}
|
||||
|
||||
@@ -95,10 +95,6 @@ GDK_AVAILABLE_IN_ALL
|
||||
void gtk_radio_menu_item_set_group (GtkRadioMenuItem *radio_menu_item,
|
||||
GSList *group);
|
||||
|
||||
GDK_AVAILABLE_IN_3_18
|
||||
void gtk_radio_menu_item_join_group (GtkRadioMenuItem *radio_menu_item,
|
||||
GtkRadioMenuItem *group_source);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_RADIO_MENU_ITEM_H__ */
|
||||
|
||||
+53
-47
@@ -1650,13 +1650,14 @@ gtk_range_realize (GtkWidget *widget)
|
||||
attributes.height = allocation.height;
|
||||
attributes.wclass = GDK_INPUT_ONLY;
|
||||
attributes.event_mask = gtk_widget_get_events (widget);
|
||||
attributes.event_mask |= GDK_BUTTON_PRESS_MASK |
|
||||
GDK_BUTTON_RELEASE_MASK |
|
||||
GDK_SCROLL_MASK |
|
||||
GDK_SMOOTH_SCROLL_MASK |
|
||||
GDK_ENTER_NOTIFY_MASK |
|
||||
GDK_LEAVE_NOTIFY_MASK |
|
||||
GDK_POINTER_MOTION_MASK;
|
||||
attributes.event_mask |= (GDK_BUTTON_PRESS_MASK |
|
||||
GDK_BUTTON_RELEASE_MASK |
|
||||
GDK_SCROLL_MASK |
|
||||
GDK_SMOOTH_SCROLL_MASK |
|
||||
GDK_ENTER_NOTIFY_MASK |
|
||||
GDK_LEAVE_NOTIFY_MASK |
|
||||
GDK_POINTER_MOTION_MASK |
|
||||
GDK_POINTER_MOTION_HINT_MASK);
|
||||
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y;
|
||||
|
||||
@@ -2037,6 +2038,8 @@ gtk_range_draw (GtkWidget *widget,
|
||||
}
|
||||
else
|
||||
{
|
||||
gboolean is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
|
||||
|
||||
gint trough_change_pos_x = width;
|
||||
gint trough_change_pos_y = height;
|
||||
|
||||
@@ -2051,13 +2054,15 @@ gtk_range_draw (GtkWidget *widget,
|
||||
|
||||
gtk_style_context_save (context);
|
||||
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_LEFT);
|
||||
{
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_LEFT);
|
||||
|
||||
if (!is_rtl)
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_HIGHLIGHT);
|
||||
}
|
||||
else
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_TOP);
|
||||
|
||||
if (!should_invert (range))
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_HIGHLIGHT);
|
||||
|
||||
gtk_render_background (context, cr, x, y,
|
||||
trough_change_pos_x,
|
||||
trough_change_pos_y);
|
||||
@@ -2075,12 +2080,17 @@ gtk_range_draw (GtkWidget *widget,
|
||||
|
||||
gtk_style_context_save (context);
|
||||
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_RIGHT);
|
||||
else
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_BOTTOM);
|
||||
{
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_RIGHT);
|
||||
|
||||
if (should_invert (range))
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_HIGHLIGHT);
|
||||
if (is_rtl)
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_HIGHLIGHT);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_BOTTOM);
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_HIGHLIGHT);
|
||||
}
|
||||
|
||||
gtk_render_background (context, cr,
|
||||
x + trough_change_pos_x, y + trough_change_pos_y,
|
||||
@@ -2102,12 +2112,11 @@ gtk_range_draw (GtkWidget *widget,
|
||||
gtk_adjustment_get_upper (priv->adjustment) - gtk_adjustment_get_page_size (priv->adjustment) -
|
||||
gtk_adjustment_get_lower (priv->adjustment) != 0)
|
||||
{
|
||||
gdouble fill_level = priv->fill_level;
|
||||
gint fill_x = x;
|
||||
gint fill_y = y;
|
||||
gint fill_width = width;
|
||||
gint fill_height = height;
|
||||
gdouble fill_proportion = 0.0;
|
||||
gdouble fill_level = priv->fill_level;
|
||||
gint fill_x = x;
|
||||
gint fill_y = y;
|
||||
gint fill_width = width;
|
||||
gint fill_height = height;
|
||||
|
||||
gtk_style_context_save (context);
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_PROGRESSBAR);
|
||||
@@ -2116,36 +2125,33 @@ gtk_range_draw (GtkWidget *widget,
|
||||
gtk_adjustment_get_upper (priv->adjustment) -
|
||||
gtk_adjustment_get_page_size (priv->adjustment));
|
||||
|
||||
fill_proportion = (fill_level - gtk_adjustment_get_lower (priv->adjustment)) /
|
||||
(gtk_adjustment_get_upper (priv->adjustment) -
|
||||
gtk_adjustment_get_lower (priv->adjustment) -
|
||||
gtk_adjustment_get_page_size (priv->adjustment));
|
||||
|
||||
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
{
|
||||
if (!should_invert (range))
|
||||
{
|
||||
fill_x = priv->slider.x + (priv->slider.width / 2);
|
||||
fill_width = (width * fill_proportion) - fill_x + x;
|
||||
}
|
||||
else
|
||||
{
|
||||
fill_x = x + width * (1.0 - fill_proportion);
|
||||
fill_width = priv->slider.x + (priv->slider.width / 2) - fill_x;
|
||||
}
|
||||
fill_x = priv->trough.x;
|
||||
fill_width = (priv->slider.width +
|
||||
(fill_level - gtk_adjustment_get_lower (priv->adjustment)) /
|
||||
(gtk_adjustment_get_upper (priv->adjustment) -
|
||||
gtk_adjustment_get_lower (priv->adjustment) -
|
||||
gtk_adjustment_get_page_size (priv->adjustment)) *
|
||||
(priv->trough.width -
|
||||
priv->slider.width));
|
||||
|
||||
if (should_invert (range))
|
||||
fill_x += priv->trough.width - fill_width;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!should_invert (range))
|
||||
{
|
||||
fill_y = priv->slider.y + (priv->slider.height / 2);
|
||||
fill_height = (height * fill_proportion) - fill_y + y;
|
||||
}
|
||||
else
|
||||
{
|
||||
fill_y = y + height * (1.0 - fill_proportion);
|
||||
fill_height = priv->slider.y + (priv->slider.height / 2) - fill_y;
|
||||
}
|
||||
fill_y = priv->trough.y;
|
||||
fill_height = (priv->slider.height +
|
||||
(fill_level - gtk_adjustment_get_lower (priv->adjustment)) /
|
||||
(gtk_adjustment_get_upper (priv->adjustment) -
|
||||
gtk_adjustment_get_lower (priv->adjustment) -
|
||||
gtk_adjustment_get_page_size (priv->adjustment)) *
|
||||
(priv->trough.height -
|
||||
priv->slider.height));
|
||||
|
||||
if (should_invert (range))
|
||||
fill_y += priv->trough.height - fill_height;
|
||||
}
|
||||
|
||||
gtk_render_background (context, cr, fill_x, fill_y, fill_width, fill_height);
|
||||
|
||||
+1
-1
@@ -1189,7 +1189,7 @@ gtk_render_icon_pixbuf (GtkStyleContext *context,
|
||||
GtkIconSize size)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (size > GTK_ICON_SIZE_INVALID || size == (GtkIconSize)-1, NULL);
|
||||
g_return_val_if_fail (size > GTK_ICON_SIZE_INVALID || size == -1, NULL);
|
||||
g_return_val_if_fail (source != NULL, NULL);
|
||||
|
||||
return gtk_do_render_icon_pixbuf (context, source, size);
|
||||
|
||||
+1
-1
@@ -626,7 +626,7 @@ _gtk_rounded_box_contains_rectangle (const GtkRoundedBox *box,
|
||||
if (x1 < box->box.x ||
|
||||
y1 < box->box.y ||
|
||||
x2 >= box->box.x + box->box.width ||
|
||||
y2 >= box->box.y + box->box.height)
|
||||
y2 >= box->box.y + box->box.width)
|
||||
return FALSE;
|
||||
|
||||
if (x1 < box->box.x + box->corner[GTK_CSS_TOP_LEFT].horizontal &&
|
||||
|
||||
+55
-81
@@ -167,7 +167,8 @@ typedef struct
|
||||
{
|
||||
GtkWidget *scrollbar;
|
||||
GdkWindow *window;
|
||||
gboolean over; /* either mouse over, or while dragging */
|
||||
gboolean dragging;
|
||||
gboolean over;
|
||||
gint64 last_scroll_time;
|
||||
guint conceil_timer;
|
||||
|
||||
@@ -977,77 +978,51 @@ indicator_set_over (Indicator *indicator,
|
||||
gtk_widget_queue_resize (indicator->scrollbar);
|
||||
}
|
||||
|
||||
static void
|
||||
translate_to_widget (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gint *x,
|
||||
gint *y)
|
||||
{
|
||||
GtkWidget *event_widget;
|
||||
GdkWindow *event_widget_window;
|
||||
GdkWindow *window;
|
||||
gdouble event_x, event_y;
|
||||
gint wx, wy;
|
||||
GtkAllocation allocation;
|
||||
|
||||
event_widget = gtk_get_event_widget (event);
|
||||
event_widget_window = gtk_widget_get_window (event_widget);
|
||||
gdk_event_get_coords (event, &event_x, &event_y);
|
||||
window = event->any.window;
|
||||
while (window && window != event_widget_window)
|
||||
{
|
||||
gdk_window_get_position (window, &wx, &wy);
|
||||
event_x += wx;
|
||||
event_y += wy;
|
||||
window = gdk_window_get_effective_parent (window);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_has_window (event_widget))
|
||||
{
|
||||
gtk_widget_get_allocation (event_widget, &allocation);
|
||||
event_x -= allocation.x;
|
||||
event_y -= allocation.y;
|
||||
}
|
||||
|
||||
gtk_widget_translate_coordinates (event_widget, widget,
|
||||
(gint)event_x, (gint)event_y,
|
||||
x, y);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
event_close_to_indicator (GtkScrolledWindow *sw,
|
||||
Indicator *indicator,
|
||||
GdkEvent *event)
|
||||
{
|
||||
GtkAllocation alloc, indicator_alloc;
|
||||
GtkScrolledWindowPrivate *priv;
|
||||
GtkAllocation indicator_alloc;
|
||||
gint x, y;
|
||||
gint distance;
|
||||
GtkWidget *event_widget;
|
||||
gint win_x, win_y;
|
||||
gdouble x, y;
|
||||
gint distance;
|
||||
|
||||
priv = sw->priv;
|
||||
event_widget = gtk_get_event_widget (event);
|
||||
gdk_event_get_coords (event, &x, &y);
|
||||
|
||||
gtk_widget_get_allocation (GTK_WIDGET (sw), &alloc);
|
||||
gtk_widget_get_allocation (indicator->scrollbar, &indicator_alloc);
|
||||
gdk_window_get_position (indicator->window, &win_x, &win_y);
|
||||
translate_to_widget (GTK_WIDGET (sw), event, &x, &y);
|
||||
|
||||
if (event->any.window == indicator->window ||
|
||||
event_widget == indicator->scrollbar)
|
||||
{
|
||||
gint xcoord = x, ycoord = y;
|
||||
|
||||
gtk_widget_translate_coordinates (indicator->scrollbar,
|
||||
GTK_WIDGET (sw),
|
||||
xcoord, ycoord,
|
||||
&xcoord, &ycoord);
|
||||
x = xcoord;
|
||||
y = ycoord;
|
||||
}
|
||||
|
||||
if (indicator->over)
|
||||
distance = INDICATOR_FAR_DISTANCE;
|
||||
else
|
||||
distance = INDICATOR_CLOSE_DISTANCE;
|
||||
|
||||
if (indicator == &priv->hindicator)
|
||||
{
|
||||
if (y >= win_y - distance &&
|
||||
y < win_y + indicator_alloc.height + distance)
|
||||
return TRUE;
|
||||
}
|
||||
else if (indicator == &priv->vindicator)
|
||||
{
|
||||
if (x >= win_x - distance &&
|
||||
x < win_x + indicator_alloc.width + distance)
|
||||
return TRUE;
|
||||
}
|
||||
if ((indicator == &priv->hindicator &&
|
||||
y >= win_y - distance &&
|
||||
y < win_y + indicator_alloc.height + distance) ||
|
||||
(indicator == &priv->vindicator &&
|
||||
x >= win_x - distance &&
|
||||
x < win_x + indicator_alloc.width + distance))
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1092,26 +1067,13 @@ captured_event_cb (GtkWidget *widget,
|
||||
GtkScrolledWindow *sw;
|
||||
GdkInputSource input_source;
|
||||
GdkDevice *source_device;
|
||||
GtkWidget *event_widget;
|
||||
gboolean on_scrollbar;
|
||||
|
||||
sw = GTK_SCROLLED_WINDOW (widget);
|
||||
priv = sw->priv;
|
||||
|
||||
if (event->type == GDK_SCROLL)
|
||||
{
|
||||
gdouble dx, dy;
|
||||
|
||||
/* The libinput driver may generate a final event with dx=dy=0
|
||||
* after scrolling finished, this is usually an indication that
|
||||
* the deceleration animation just started, so we definitely
|
||||
* shouldn't cancel it.
|
||||
*/
|
||||
if (event->scroll.direction != GDK_SCROLL_SMOOTH ||
|
||||
(gdk_event_get_scroll_deltas (event, &dx, &dy) &&
|
||||
((int) dx != 0 || (int) dy != 0)))
|
||||
gtk_scrolled_window_cancel_deceleration (sw);
|
||||
|
||||
gtk_scrolled_window_cancel_deceleration (sw);
|
||||
return GDK_EVENT_PROPAGATE;
|
||||
}
|
||||
|
||||
@@ -1129,10 +1091,6 @@ captured_event_cb (GtkWidget *widget,
|
||||
input_source != GDK_SOURCE_TOUCHPAD)
|
||||
return GDK_EVENT_PROPAGATE;
|
||||
|
||||
event_widget = gtk_get_event_widget (event);
|
||||
on_scrollbar = (event_widget == priv->hindicator.scrollbar ||
|
||||
event_widget == priv->vindicator.scrollbar);
|
||||
|
||||
if (event->type == GDK_MOTION_NOTIFY)
|
||||
{
|
||||
if (priv->hscrollbar_visible)
|
||||
@@ -1140,15 +1098,13 @@ captured_event_cb (GtkWidget *widget,
|
||||
if (priv->vscrollbar_visible)
|
||||
indicator_start_fade (&priv->vindicator, 1.0);
|
||||
|
||||
if (!on_scrollbar &&
|
||||
(event->motion.state &
|
||||
(GDK_BUTTON1_MASK | GDK_BUTTON2_MASK | GDK_BUTTON3_MASK)) != 0)
|
||||
if ((event->motion.state &
|
||||
(GDK_BUTTON1_MASK | GDK_BUTTON2_MASK | GDK_BUTTON3_MASK)) != 0)
|
||||
{
|
||||
indicator_set_over (&priv->hindicator, FALSE);
|
||||
indicator_set_over (&priv->vindicator, FALSE);
|
||||
}
|
||||
else if (strstr (gdk_device_get_name (source_device), "TrackPoint") ||
|
||||
strstr (gdk_device_get_name (source_device), "DualPoint Stick"))
|
||||
else if (strstr (gdk_device_get_name (source_device), "TrackPoint"))
|
||||
{
|
||||
indicator_set_over (&priv->hindicator, TRUE);
|
||||
indicator_set_over (&priv->vindicator, TRUE);
|
||||
@@ -1161,12 +1117,16 @@ captured_event_cb (GtkWidget *widget,
|
||||
indicator_set_over (&priv->hindicator, FALSE);
|
||||
}
|
||||
}
|
||||
else if (event->type == GDK_LEAVE_NOTIFY && on_scrollbar &&
|
||||
else if (event->type == GDK_LEAVE_NOTIFY &&
|
||||
event->crossing.mode == GDK_CROSSING_UNGRAB)
|
||||
{
|
||||
if (event_widget == priv->hindicator.scrollbar)
|
||||
GtkWidget *scrollbar;
|
||||
|
||||
scrollbar = gtk_get_event_widget (event);
|
||||
|
||||
if (scrollbar == priv->hindicator.scrollbar)
|
||||
check_update_scrollbar_proximity (sw, &priv->hindicator, event);
|
||||
else if (event_widget == priv->vindicator.scrollbar)
|
||||
else if (scrollbar == priv->vindicator.scrollbar)
|
||||
check_update_scrollbar_proximity (sw, &priv->vindicator, event);
|
||||
}
|
||||
|
||||
@@ -3937,7 +3897,7 @@ maybe_hide_indicator (gpointer data)
|
||||
Indicator *indicator = data;
|
||||
|
||||
if (g_get_monotonic_time () - indicator->last_scroll_time >= INDICATOR_FADE_OUT_DELAY * 1000 &&
|
||||
!indicator->over)
|
||||
!indicator->over && !indicator->dragging)
|
||||
indicator_start_fade (indicator, 0.0);
|
||||
|
||||
return G_SOURCE_CONTINUE;
|
||||
@@ -3951,6 +3911,16 @@ indicator_value_changed (GtkAdjustment *adjustment,
|
||||
indicator_start_fade (indicator, 1.0);
|
||||
}
|
||||
|
||||
static void
|
||||
indicator_style_changed (GtkStyleContext *context,
|
||||
Indicator *indicator)
|
||||
{
|
||||
if (gtk_style_context_has_class (context, "dragging"))
|
||||
indicator->dragging = TRUE;
|
||||
else
|
||||
indicator->dragging = FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
setup_indicator (GtkScrolledWindow *scrolled_window,
|
||||
Indicator *indicator,
|
||||
@@ -3974,6 +3944,8 @@ setup_indicator (GtkScrolledWindow *scrolled_window,
|
||||
g_object_unref (scrollbar);
|
||||
|
||||
gtk_style_context_add_class (context, "overlay-indicator");
|
||||
g_signal_connect (context, "changed",
|
||||
G_CALLBACK (indicator_style_changed), indicator);
|
||||
g_signal_connect (adjustment, "value-changed",
|
||||
G_CALLBACK (indicator_value_changed), indicator);
|
||||
|
||||
@@ -4000,6 +3972,7 @@ remove_indicator (GtkScrolledWindow *scrolled_window,
|
||||
adjustment = gtk_range_get_adjustment (GTK_RANGE (scrollbar));
|
||||
|
||||
gtk_style_context_remove_class (context, "overlay-indicator");
|
||||
g_signal_handlers_disconnect_by_func (context, indicator_style_changed, indicator);
|
||||
g_signal_handlers_disconnect_by_func (adjustment, indicator_value_changed, indicator);
|
||||
if (indicator->conceil_timer)
|
||||
{
|
||||
@@ -4130,6 +4103,7 @@ indicator_reset (Indicator *indicator)
|
||||
}
|
||||
|
||||
indicator->scrollbar = NULL;
|
||||
indicator->dragging = FALSE;
|
||||
indicator->over = FALSE;
|
||||
indicator->current_pos = indicator->source_pos = indicator->target_pos = 0;
|
||||
indicator->start_time = indicator->end_time = indicator->last_scroll_time = 0;
|
||||
|
||||
+30
-34
@@ -344,15 +344,18 @@ gtk_search_bar_get_property (GObject *object,
|
||||
}
|
||||
}
|
||||
|
||||
static void gtk_search_bar_set_entry (GtkSearchBar *bar,
|
||||
GtkEntry *entry);
|
||||
|
||||
static void
|
||||
gtk_search_bar_dispose (GObject *object)
|
||||
{
|
||||
GtkSearchBar *bar = GTK_SEARCH_BAR (object);
|
||||
GtkSearchBarPrivate *priv = gtk_search_bar_get_instance_private (bar);
|
||||
|
||||
gtk_search_bar_set_entry (bar, NULL);
|
||||
if (priv->entry)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (priv->entry, entry_key_pressed_event_cb, bar);
|
||||
g_object_remove_weak_pointer (G_OBJECT (priv->entry), (gpointer *) &priv->entry);
|
||||
priv->entry = NULL;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (gtk_search_bar_parent_class)->dispose (object);
|
||||
}
|
||||
@@ -468,35 +471,6 @@ gtk_search_bar_new (void)
|
||||
return g_object_new (GTK_TYPE_SEARCH_BAR, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_search_bar_set_entry (GtkSearchBar *bar,
|
||||
GtkEntry *entry)
|
||||
{
|
||||
GtkSearchBarPrivate *priv = gtk_search_bar_get_instance_private (bar);
|
||||
|
||||
if (priv->entry != NULL)
|
||||
{
|
||||
if (GTK_IS_SEARCH_ENTRY (priv->entry))
|
||||
g_signal_handlers_disconnect_by_func (priv->entry, stop_search_cb, bar);
|
||||
else
|
||||
g_signal_handlers_disconnect_by_func (priv->entry, entry_key_pressed_event_cb, bar);
|
||||
g_object_remove_weak_pointer (G_OBJECT (priv->entry), (gpointer *) &priv->entry);
|
||||
}
|
||||
|
||||
priv->entry = GTK_WIDGET (entry);
|
||||
|
||||
if (priv->entry != NULL)
|
||||
{
|
||||
g_object_add_weak_pointer (G_OBJECT (priv->entry), (gpointer *) &priv->entry);
|
||||
if (GTK_IS_SEARCH_ENTRY (priv->entry))
|
||||
g_signal_connect (priv->entry, "stop-search",
|
||||
G_CALLBACK (stop_search_cb), bar);
|
||||
else
|
||||
g_signal_connect (priv->entry, "key-press-event",
|
||||
G_CALLBACK (entry_key_pressed_event_cb), bar);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_search_bar_connect_entry:
|
||||
* @bar: a #GtkSearchBar
|
||||
@@ -513,10 +487,32 @@ void
|
||||
gtk_search_bar_connect_entry (GtkSearchBar *bar,
|
||||
GtkEntry *entry)
|
||||
{
|
||||
GtkSearchBarPrivate *priv = gtk_search_bar_get_instance_private (bar);
|
||||
|
||||
g_return_if_fail (GTK_IS_SEARCH_BAR (bar));
|
||||
g_return_if_fail (entry == NULL || GTK_IS_ENTRY (entry));
|
||||
|
||||
gtk_search_bar_set_entry (bar, entry);
|
||||
if (priv->entry != NULL)
|
||||
{
|
||||
if (GTK_IS_SEARCH_ENTRY (priv->entry))
|
||||
g_signal_handlers_disconnect_by_func (priv->entry, stop_search_cb, bar);
|
||||
else
|
||||
g_signal_handlers_disconnect_by_func (priv->entry, entry_key_pressed_event_cb, bar);
|
||||
g_object_remove_weak_pointer (G_OBJECT (priv->entry), (gpointer *) &priv->entry);
|
||||
priv->entry = NULL;
|
||||
}
|
||||
|
||||
if (entry != NULL)
|
||||
{
|
||||
priv->entry = GTK_WIDGET (entry);
|
||||
g_object_add_weak_pointer (G_OBJECT (priv->entry), (gpointer *) &priv->entry);
|
||||
if (GTK_IS_SEARCH_ENTRY (priv->entry))
|
||||
g_signal_connect (priv->entry, "stop-search",
|
||||
G_CALLBACK (stop_search_cb), bar);
|
||||
else
|
||||
g_signal_connect (priv->entry, "key-press-event",
|
||||
G_CALLBACK (entry_key_pressed_event_cb), bar);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -1093,7 +1093,7 @@ gtk_spin_button_realize (GtkWidget *widget)
|
||||
attributes.event_mask = gtk_widget_get_events (widget);
|
||||
attributes.event_mask |= GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK
|
||||
| GDK_BUTTON_RELEASE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_ENTER_NOTIFY_MASK
|
||||
| GDK_POINTER_MOTION_MASK;
|
||||
| GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK;
|
||||
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
|
||||
|
||||
|
||||
+38
-24
@@ -1193,6 +1193,37 @@ gtk_style_context_get_parent (GtkStyleContext *context)
|
||||
return context->priv->parent;
|
||||
}
|
||||
|
||||
/*
|
||||
* gtk_style_context_save_to_node:
|
||||
* @context: a #GtkStyleContext
|
||||
* @node: the node to save to
|
||||
*
|
||||
* Saves the @context state, so temporary modifications done through
|
||||
* gtk_style_context_add_class(), gtk_style_context_remove_class(),
|
||||
* gtk_style_context_set_state(), etc. and rendering using
|
||||
* gtk_render_background() or similar functions are done using the
|
||||
* given @node.
|
||||
*
|
||||
* To undo, call gtk_style_context_restore().
|
||||
*
|
||||
* The matching call to gtk_style_context_restore() must be done
|
||||
* before GTK returns to the main loop.
|
||||
**/
|
||||
void
|
||||
gtk_style_context_save_to_node (GtkStyleContext *context,
|
||||
GtkCssNode *node)
|
||||
{
|
||||
GtkStyleContextPrivate *priv;
|
||||
|
||||
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
|
||||
g_return_if_fail (GTK_IS_CSS_NODE (node));
|
||||
|
||||
priv = context->priv;
|
||||
|
||||
priv->saved_nodes = g_slist_prepend (priv->saved_nodes, priv->cssnode);
|
||||
priv->cssnode = g_object_ref (node);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_style_context_save:
|
||||
* @context: a #GtkStyleContext
|
||||
@@ -1226,8 +1257,9 @@ gtk_style_context_save (GtkStyleContext *context)
|
||||
gtk_css_node_set_parent (cssnode, gtk_style_context_get_root (context));
|
||||
gtk_css_node_set_widget_type (cssnode, gtk_css_node_get_widget_type (priv->cssnode));
|
||||
|
||||
priv->saved_nodes = g_slist_prepend (priv->saved_nodes, priv->cssnode);
|
||||
priv->cssnode = cssnode;
|
||||
gtk_style_context_save_to_node (context, cssnode);
|
||||
|
||||
g_object_unref (cssnode);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1283,15 +1315,13 @@ gtk_style_context_add_class (GtkStyleContext *context,
|
||||
const gchar *class_name)
|
||||
{
|
||||
GtkStyleContextPrivate *priv;
|
||||
GQuark class_quark;
|
||||
|
||||
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
|
||||
g_return_if_fail (class_name != NULL);
|
||||
|
||||
priv = context->priv;
|
||||
class_quark = g_quark_from_string (class_name);
|
||||
|
||||
gtk_css_node_add_class (priv->cssnode, class_quark);
|
||||
gtk_css_node_add_class (priv->cssnode, class_name);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1308,19 +1338,13 @@ gtk_style_context_remove_class (GtkStyleContext *context,
|
||||
const gchar *class_name)
|
||||
{
|
||||
GtkStyleContextPrivate *priv;
|
||||
GQuark class_quark;
|
||||
|
||||
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
|
||||
g_return_if_fail (class_name != NULL);
|
||||
|
||||
class_quark = g_quark_try_string (class_name);
|
||||
|
||||
if (!class_quark)
|
||||
return;
|
||||
|
||||
priv = context->priv;
|
||||
|
||||
gtk_css_node_remove_class (priv->cssnode, class_quark);
|
||||
gtk_css_node_remove_class (priv->cssnode, class_name);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1340,19 +1364,13 @@ gtk_style_context_has_class (GtkStyleContext *context,
|
||||
const gchar *class_name)
|
||||
{
|
||||
GtkStyleContextPrivate *priv;
|
||||
GQuark class_quark;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), FALSE);
|
||||
g_return_val_if_fail (class_name != NULL, FALSE);
|
||||
|
||||
class_quark = g_quark_try_string (class_name);
|
||||
|
||||
if (!class_quark)
|
||||
return FALSE;
|
||||
|
||||
priv = context->priv;
|
||||
|
||||
return gtk_css_node_has_class (priv->cssnode, class_quark);
|
||||
return gtk_css_node_has_class (priv->cssnode, class_name);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1383,16 +1401,12 @@ GList *
|
||||
gtk_style_context_list_classes (GtkStyleContext *context)
|
||||
{
|
||||
GtkStyleContextPrivate *priv;
|
||||
GList *classes;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), NULL);
|
||||
|
||||
priv = context->priv;
|
||||
|
||||
classes = gtk_css_node_list_classes (priv->cssnode);
|
||||
quarks_to_strings (classes);
|
||||
|
||||
return classes;
|
||||
return gtk_css_node_list_classes (priv->cssnode);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -36,6 +36,9 @@ const char * gtk_style_context_get_id (GtkStyleContext *c
|
||||
GtkStyleProviderPrivate *
|
||||
gtk_style_context_get_style_provider (GtkStyleContext *context);
|
||||
|
||||
void gtk_style_context_save_to_node (GtkStyleContext *context,
|
||||
GtkCssNode *node);
|
||||
|
||||
const GtkBitmask *
|
||||
_gtk_style_context_get_changes (GtkStyleContext *context);
|
||||
|
||||
|
||||
+177
-130
@@ -42,15 +42,18 @@
|
||||
#include "gtkswitch.h"
|
||||
|
||||
#include "deprecated/gtkactivatable.h"
|
||||
#include "deprecated/gtktoggleaction.h"
|
||||
#include "gtkintl.h"
|
||||
#include "gtkprivate.h"
|
||||
#include "deprecated/gtktoggleaction.h"
|
||||
#include "gtkwidget.h"
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gtkapplicationprivate.h"
|
||||
#include "gtkactionable.h"
|
||||
#include "a11y/gtkswitchaccessible.h"
|
||||
#include "gtkactionhelper.h"
|
||||
#include "gtkcssnodeprivate.h"
|
||||
#include "gtkcssnodeutilsprivate.h"
|
||||
#include "gtkstylecontextprivate.h"
|
||||
#include "gtkwidgetprivate.h"
|
||||
|
||||
#include "fallback-c89.c"
|
||||
@@ -66,6 +69,8 @@ struct _GtkSwitchPrivate
|
||||
GtkGesture *pan_gesture;
|
||||
GtkGesture *multipress_gesture;
|
||||
|
||||
GtkCssNode *slider_node;
|
||||
|
||||
double handle_pos;
|
||||
gint64 start_time;
|
||||
gint64 end_time;
|
||||
@@ -254,9 +259,7 @@ gtk_switch_pan_gesture_pan (GtkGesturePan *gesture,
|
||||
context = gtk_widget_get_style_context (widget);
|
||||
state = gtk_widget_get_state_flags (widget);
|
||||
|
||||
gtk_style_context_save (context);
|
||||
gtk_style_context_remove_class (context, GTK_STYLE_CLASS_TROUGH);
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_SLIDER);
|
||||
gtk_style_context_save_to_node (context, priv->slider_node);
|
||||
gtk_style_context_get_padding (context, state, &padding);
|
||||
gtk_style_context_restore (context);
|
||||
|
||||
@@ -344,55 +347,99 @@ gtk_switch_activate (GtkSwitch *sw)
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_switch_get_preferred_width (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural)
|
||||
gtk_switch_get_slider_size (GtkCssNode *cssnode,
|
||||
GtkOrientation orientation,
|
||||
gint for_size,
|
||||
gint *minimum,
|
||||
gint *natural,
|
||||
gint *minimum_baseline,
|
||||
gint *natural_baseline,
|
||||
gpointer data)
|
||||
{
|
||||
GtkStyleContext *context;
|
||||
GtkStateFlags state;
|
||||
GtkBorder padding;
|
||||
gint width, slider_width;
|
||||
PangoLayout *layout;
|
||||
PangoRectangle logical_rect;
|
||||
|
||||
context = gtk_widget_get_style_context (widget);
|
||||
state = gtk_style_context_get_state (context);
|
||||
|
||||
gtk_style_context_save (context);
|
||||
|
||||
gtk_style_context_remove_class (context, GTK_STYLE_CLASS_TROUGH);
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_SLIDER);
|
||||
gtk_style_context_get_padding (context, state, &padding);
|
||||
|
||||
width = padding.left + padding.right;
|
||||
|
||||
gtk_style_context_restore (context);
|
||||
GtkWidget *widget = GTK_WIDGET (data);
|
||||
gint slider_width;
|
||||
|
||||
gtk_widget_style_get (widget,
|
||||
"slider-width", &slider_width,
|
||||
NULL);
|
||||
|
||||
if (orientation == GTK_ORIENTATION_VERTICAL)
|
||||
slider_width *= 0.6;
|
||||
|
||||
*minimum = slider_width;
|
||||
*natural = slider_width;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_switch_get_content_size (GtkCssNode *cssnode,
|
||||
GtkOrientation orientation,
|
||||
gint for_size,
|
||||
gint *minimum,
|
||||
gint *natural,
|
||||
gint *minimum_baseline,
|
||||
gint *natural_baseline,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GtkSwitch *self;
|
||||
GtkSwitchPrivate *priv;
|
||||
gint slider_minimum, slider_natural;
|
||||
PangoLayout *layout;
|
||||
PangoRectangle on_rect, off_rect;
|
||||
|
||||
widget = GTK_WIDGET (data);
|
||||
self = GTK_SWITCH (data);
|
||||
priv = self->priv;
|
||||
|
||||
gtk_css_node_get_preferred_size (priv->slider_node,
|
||||
orientation,
|
||||
-1,
|
||||
&slider_minimum, &slider_natural,
|
||||
NULL, NULL,
|
||||
gtk_switch_get_slider_size,
|
||||
self);
|
||||
|
||||
/* Translators: if the "on" state label requires more than three
|
||||
* glyphs then use MEDIUM VERTICAL BAR (U+2759) as the text for
|
||||
* the state
|
||||
*/
|
||||
layout = gtk_widget_create_pango_layout (widget, C_("switch", "ON"));
|
||||
pango_layout_get_extents (layout, NULL, &logical_rect);
|
||||
pango_extents_to_pixels (&logical_rect, NULL);
|
||||
width += MAX (logical_rect.width, slider_width);
|
||||
pango_layout_get_pixel_extents (layout, NULL, &on_rect);
|
||||
|
||||
/* Translators: if the "off" state label requires more than three
|
||||
* glyphs then use WHITE CIRCLE (U+25CB) as the text for the state
|
||||
*/
|
||||
pango_layout_set_text (layout, C_("switch", "OFF"), -1);
|
||||
pango_layout_get_extents (layout, NULL, &logical_rect);
|
||||
pango_extents_to_pixels (&logical_rect, NULL);
|
||||
width += MAX (logical_rect.width, slider_width);
|
||||
pango_layout_get_pixel_extents (layout, NULL, &off_rect);
|
||||
|
||||
g_object_unref (layout);
|
||||
|
||||
*minimum = width;
|
||||
*natural = width;
|
||||
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
{
|
||||
int text_width = MAX (on_rect.width, off_rect.width);
|
||||
*minimum = 2 * MAX (slider_minimum, text_width);
|
||||
*natural = 2 * MAX (slider_natural, text_width);
|
||||
}
|
||||
else
|
||||
{
|
||||
int text_height = MAX (on_rect.height, off_rect.height);
|
||||
*minimum = MAX (slider_minimum, text_height);
|
||||
*natural = MAX (slider_natural, text_height);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_switch_get_preferred_width (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural)
|
||||
{
|
||||
gtk_css_node_get_preferred_size (gtk_widget_get_css_node (widget),
|
||||
GTK_ORIENTATION_HORIZONTAL,
|
||||
-1,
|
||||
minimum, natural,
|
||||
NULL, NULL,
|
||||
gtk_switch_get_content_size,
|
||||
widget);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -400,47 +447,34 @@ gtk_switch_get_preferred_height (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural)
|
||||
{
|
||||
GtkStyleContext *context;
|
||||
GtkStateFlags state;
|
||||
GtkBorder padding;
|
||||
gint height, slider_width, min_height;
|
||||
PangoLayout *layout;
|
||||
PangoRectangle logical_rect;
|
||||
gchar *str;
|
||||
gtk_css_node_get_preferred_size (gtk_widget_get_css_node (widget),
|
||||
GTK_ORIENTATION_VERTICAL,
|
||||
-1,
|
||||
minimum, natural,
|
||||
NULL, NULL,
|
||||
gtk_switch_get_content_size,
|
||||
widget);
|
||||
}
|
||||
|
||||
context = gtk_widget_get_style_context (widget);
|
||||
state = gtk_style_context_get_state (context);
|
||||
static void
|
||||
gtk_switch_allocate_contents (GtkCssNode *cssnode,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip,
|
||||
gpointer data)
|
||||
{
|
||||
GtkSwitch *self = data;
|
||||
GtkSwitchPrivate *priv = self->priv;
|
||||
|
||||
gtk_style_context_save (context);
|
||||
|
||||
gtk_style_context_remove_class (context, GTK_STYLE_CLASS_TROUGH);
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_SLIDER);
|
||||
gtk_style_context_get_padding (context, state, &padding);
|
||||
|
||||
height = padding.top + padding.bottom;
|
||||
|
||||
gtk_style_context_restore (context);
|
||||
|
||||
gtk_widget_style_get (widget,
|
||||
"slider-width", &slider_width,
|
||||
NULL);
|
||||
|
||||
min_height = slider_width * 0.6;
|
||||
|
||||
str = g_strdup_printf ("%s%s",
|
||||
C_("switch", "ON"),
|
||||
C_("switch", "OFF"));
|
||||
|
||||
layout = gtk_widget_create_pango_layout (widget, str);
|
||||
pango_layout_get_extents (layout, NULL, &logical_rect);
|
||||
pango_extents_to_pixels (&logical_rect, NULL);
|
||||
height += MAX (min_height, logical_rect.height);
|
||||
|
||||
g_object_unref (layout);
|
||||
g_free (str);
|
||||
|
||||
*minimum = height;
|
||||
*natural = height;
|
||||
/* We pretend to allocate the full area to the slider. That way both
|
||||
* potential left and right clip overlap gets correctly computed.
|
||||
*/
|
||||
gtk_css_node_allocate (priv->slider_node,
|
||||
allocation,
|
||||
baseline,
|
||||
out_clip,
|
||||
NULL,
|
||||
NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -448,6 +482,7 @@ gtk_switch_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
GtkSwitchPrivate *priv = GTK_SWITCH (widget)->priv;
|
||||
GtkAllocation clip;
|
||||
|
||||
gtk_widget_set_allocation (widget, allocation);
|
||||
|
||||
@@ -458,7 +493,14 @@ gtk_switch_size_allocate (GtkWidget *widget,
|
||||
allocation->width,
|
||||
allocation->height);
|
||||
|
||||
_gtk_widget_set_simple_clip (widget, NULL);
|
||||
gtk_css_node_allocate (gtk_widget_get_css_node (widget),
|
||||
allocation,
|
||||
gtk_widget_get_allocated_baseline (widget),
|
||||
&clip,
|
||||
gtk_switch_allocate_contents,
|
||||
widget);
|
||||
|
||||
gtk_widget_set_clip (widget, &clip);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -487,6 +529,7 @@ gtk_switch_realize (GtkWidget *widget)
|
||||
attributes.event_mask |= (GDK_BUTTON_PRESS_MASK |
|
||||
GDK_BUTTON_RELEASE_MASK |
|
||||
GDK_BUTTON1_MOTION_MASK |
|
||||
GDK_POINTER_MOTION_HINT_MASK |
|
||||
GDK_POINTER_MOTION_MASK |
|
||||
GDK_ENTER_NOTIFY_MASK |
|
||||
GDK_LEAVE_NOTIFY_MASK);
|
||||
@@ -542,9 +585,7 @@ gtk_switch_paint_handle (GtkWidget *widget,
|
||||
{
|
||||
GtkStyleContext *context = gtk_widget_get_style_context (widget);
|
||||
|
||||
gtk_style_context_save (context);
|
||||
gtk_style_context_remove_class (context, GTK_STYLE_CLASS_TROUGH);
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_SLIDER);
|
||||
gtk_style_context_save_to_node (context, GTK_SWITCH (widget)->priv->slider_node);
|
||||
|
||||
gtk_render_slider (context, cr,
|
||||
box->x, box->y,
|
||||
@@ -555,48 +596,31 @@ gtk_switch_paint_handle (GtkWidget *widget,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_switch_draw (GtkWidget *widget,
|
||||
cairo_t *cr)
|
||||
gtk_switch_render_slider (GtkCssNode *cssnode,
|
||||
cairo_t *cr,
|
||||
int width,
|
||||
int height,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (data);
|
||||
|
||||
return gtk_widget_has_visible_focus (widget);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_switch_render_trough (GtkCssNode *cssnode,
|
||||
cairo_t *cr,
|
||||
int width,
|
||||
int height,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (data);
|
||||
GtkSwitchPrivate *priv = GTK_SWITCH (widget)->priv;
|
||||
GtkStyleContext *context;
|
||||
GdkRectangle handle;
|
||||
GtkStyleContext *context = gtk_widget_get_style_context (widget);
|
||||
PangoLayout *layout;
|
||||
PangoRectangle rect;
|
||||
gint label_x, label_y;
|
||||
GtkBorder padding;
|
||||
GtkStateFlags state;
|
||||
gint x, y, width, height;
|
||||
|
||||
context = gtk_widget_get_style_context (widget);
|
||||
state = gtk_widget_get_state_flags (widget);
|
||||
|
||||
gtk_style_context_save (context);
|
||||
|
||||
gtk_style_context_remove_class (context, GTK_STYLE_CLASS_TROUGH);
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_SLIDER);
|
||||
|
||||
gtk_style_context_get_padding (context, state, &padding);
|
||||
|
||||
gtk_style_context_restore (context);
|
||||
|
||||
x = 0;
|
||||
y = 0;
|
||||
width = gtk_widget_get_allocated_width (widget);
|
||||
height = gtk_widget_get_allocated_height (widget);
|
||||
|
||||
gtk_render_background (context, cr, x, y, width, height);
|
||||
gtk_render_frame (context, cr, x, y, width, height);
|
||||
|
||||
width -= padding.left + padding.right;
|
||||
height -= padding.top + padding.bottom;
|
||||
|
||||
x += padding.left;
|
||||
y += padding.top;
|
||||
|
||||
handle.y = y;
|
||||
handle.width = width / 2;
|
||||
handle.height = height;
|
||||
gint slider_offset;
|
||||
|
||||
/* Translators: if the "on" state label requires more than three
|
||||
* glyphs then use MEDIUM VERTICAL BAR (U+2759) as the text for
|
||||
@@ -604,11 +628,10 @@ gtk_switch_draw (GtkWidget *widget,
|
||||
*/
|
||||
layout = gtk_widget_create_pango_layout (widget, C_("switch", "ON"));
|
||||
|
||||
pango_layout_get_extents (layout, NULL, &rect);
|
||||
pango_extents_to_pixels (&rect, NULL);
|
||||
pango_layout_get_pixel_extents (layout, NULL, &rect);
|
||||
|
||||
label_x = x + ((width / 2) - rect.width) / 2;
|
||||
label_y = y + (height - rect.height) / 2;
|
||||
label_x = ((width / 2) - rect.width) / 2;
|
||||
label_y = (height - rect.height) / 2;
|
||||
|
||||
gtk_render_layout (context, cr, label_x, label_y, layout);
|
||||
|
||||
@@ -619,26 +642,40 @@ gtk_switch_draw (GtkWidget *widget,
|
||||
*/
|
||||
layout = gtk_widget_create_pango_layout (widget, C_("switch", "OFF"));
|
||||
|
||||
pango_layout_get_extents (layout, NULL, &rect);
|
||||
pango_extents_to_pixels (&rect, NULL);
|
||||
pango_layout_get_pixel_extents (layout, NULL, &rect);
|
||||
|
||||
label_x = x + (width / 2) + ((width / 2) - rect.width) / 2;
|
||||
label_y = y + (height - rect.height) / 2;
|
||||
label_x = (width / 2) + ((width / 2) - rect.width) / 2;
|
||||
label_y = (height - rect.height) / 2;
|
||||
|
||||
gtk_render_layout (context, cr, label_x, label_y, layout);
|
||||
|
||||
g_object_unref (layout);
|
||||
|
||||
handle.x = x + round (priv->handle_pos * width / 2);
|
||||
slider_offset = round (priv->handle_pos * (width - width / 2));
|
||||
cairo_translate (cr, slider_offset, 0);
|
||||
|
||||
gtk_switch_paint_handle (widget, cr, &handle);
|
||||
gtk_css_node_draw (priv->slider_node,
|
||||
cr,
|
||||
width / 2,
|
||||
height,
|
||||
gtk_switch_render_slider,
|
||||
widget);
|
||||
|
||||
if (gtk_widget_has_visible_focus (widget))
|
||||
{
|
||||
gtk_render_focus (context, cr,
|
||||
handle.x, handle.y,
|
||||
handle.width, handle.height);
|
||||
}
|
||||
cairo_translate (cr, -slider_offset, 0);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_switch_draw (GtkWidget *widget,
|
||||
cairo_t *cr)
|
||||
{
|
||||
gtk_css_node_draw (gtk_widget_get_css_node (widget),
|
||||
cr,
|
||||
gtk_widget_get_allocated_width (widget),
|
||||
gtk_widget_get_allocated_height (widget),
|
||||
gtk_switch_render_trough,
|
||||
widget);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -994,6 +1031,7 @@ gtk_switch_init (GtkSwitch *self)
|
||||
GtkSwitchPrivate *priv;
|
||||
GtkStyleContext *context;
|
||||
GtkGesture *gesture;
|
||||
GtkCssNode *widget_node;
|
||||
|
||||
priv = self->priv = gtk_switch_get_instance_private (self);
|
||||
|
||||
@@ -1001,6 +1039,15 @@ gtk_switch_init (GtkSwitch *self)
|
||||
gtk_widget_set_has_window (GTK_WIDGET (self), FALSE);
|
||||
gtk_widget_set_can_focus (GTK_WIDGET (self), TRUE);
|
||||
|
||||
widget_node = gtk_widget_get_css_node (GTK_WIDGET (self));
|
||||
priv->slider_node = gtk_css_node_new ();
|
||||
gtk_css_node_set_widget_type (priv->slider_node, GTK_TYPE_SWITCH);
|
||||
gtk_css_node_add_class (priv->slider_node, GTK_STYLE_CLASS_SLIDER);
|
||||
gtk_css_node_set_parent (priv->slider_node, widget_node);
|
||||
gtk_css_node_set_state (priv->slider_node, gtk_css_node_get_state (widget_node));
|
||||
g_signal_connect_object (priv->slider_node, "style-changed", G_CALLBACK (gtk_css_node_style_changed_for_widget), self, 0);
|
||||
g_object_unref (priv->slider_node);
|
||||
|
||||
gesture = gtk_gesture_multi_press_new (GTK_WIDGET (self));
|
||||
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (gesture), FALSE);
|
||||
gtk_gesture_single_set_exclusive (GTK_GESTURE_SINGLE (gesture), TRUE);
|
||||
|
||||
+18
-14
@@ -3626,36 +3626,40 @@ static void
|
||||
update_selection_clipboards (GtkTextBuffer *buffer)
|
||||
{
|
||||
GtkTextBufferPrivate *priv;
|
||||
gboolean has_selection;
|
||||
GtkTextIter start;
|
||||
GtkTextIter end;
|
||||
GSList *tmp_list;
|
||||
GSList *tmp_list = buffer->priv->selection_clipboards;
|
||||
|
||||
priv = buffer->priv;
|
||||
|
||||
gtk_text_buffer_get_copy_target_list (buffer);
|
||||
has_selection = gtk_text_buffer_get_selection_bounds (buffer, &start, &end);
|
||||
tmp_list = buffer->priv->selection_clipboards;
|
||||
|
||||
while (tmp_list)
|
||||
{
|
||||
GtkTextIter start;
|
||||
GtkTextIter end;
|
||||
|
||||
SelectionClipboard *selection_clipboard = tmp_list->data;
|
||||
GtkClipboard *clipboard = selection_clipboard->clipboard;
|
||||
|
||||
if (has_selection)
|
||||
{
|
||||
/* Even if we already have the selection, we need to update our
|
||||
* timestamp.
|
||||
*/
|
||||
/* Determine whether we have a selection and adjust X selection
|
||||
* accordingly.
|
||||
*/
|
||||
if (!gtk_text_buffer_get_selection_bounds (buffer, &start, &end))
|
||||
{
|
||||
if (gtk_clipboard_get_owner (clipboard) == G_OBJECT (buffer))
|
||||
gtk_clipboard_clear (clipboard);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Even if we already have the selection, we need to update our
|
||||
* timestamp.
|
||||
*/
|
||||
gtk_clipboard_set_with_owner (clipboard,
|
||||
priv->copy_target_entries,
|
||||
priv->n_copy_target_entries,
|
||||
clipboard_get_selection_cb,
|
||||
clipboard_clear_selection_cb,
|
||||
G_OBJECT (buffer));
|
||||
}
|
||||
else if (gtk_clipboard_get_owner (clipboard) == G_OBJECT (buffer))
|
||||
gtk_clipboard_clear (clipboard);
|
||||
}
|
||||
|
||||
tmp_list = tmp_list->next;
|
||||
}
|
||||
|
||||
+6
-6
@@ -534,7 +534,7 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
|
||||
* color may be applied instead of the foreground. Setting this property
|
||||
* will always override those defaults.
|
||||
*
|
||||
* Since: 3.16
|
||||
* Since: 3.18
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_UNDERLINE_RGBA,
|
||||
@@ -550,13 +550,13 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
|
||||
* This property modifies the color of strikeouts. If not set, strikeouts
|
||||
* will use the forground color.
|
||||
*
|
||||
* Since: 3.16
|
||||
* Since: 3.18
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_STRIKETHROUGH_RGBA,
|
||||
g_param_spec_boxed ("strikethrough-rgba",
|
||||
P_("Strikethrough RGBA"),
|
||||
P_("Color of strikethrough for this text"),
|
||||
P_("Strike-through RGBA"),
|
||||
P_("Color of strike-through for this text"),
|
||||
GDK_TYPE_RGBA,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
@@ -792,7 +792,7 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
|
||||
*
|
||||
* If the #GtkTextTag:underline-rgba property has been set.
|
||||
*
|
||||
* Since: 3.16
|
||||
* Since: 3.18
|
||||
*/
|
||||
ADD_SET_PROP ("underline-rgba-set", PROP_UNDERLINE_RGBA_SET,
|
||||
P_("Underline RGBA set"),
|
||||
@@ -803,7 +803,7 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
|
||||
*
|
||||
* If the #GtkTextTag:strikethrough-rgba property has been set.
|
||||
*
|
||||
* Since: 3.16
|
||||
* Since: 3.18
|
||||
*/
|
||||
ADD_SET_PROP ("strikethrough-rgba-set", PROP_STRIKETHROUGH_RGBA_SET,
|
||||
P_("Strikethrough RGBA set"),
|
||||
|
||||
+11
-10
@@ -5992,7 +5992,7 @@ gtk_text_view_move_cursor (GtkTextView *text_view,
|
||||
gtk_text_view_move_viewport (text_view, scroll_step, count);
|
||||
if ((old_xpos == gtk_adjustment_get_target_value (priv->hadjustment) &&
|
||||
old_ypos == gtk_adjustment_get_target_value (priv->vadjustment)) &&
|
||||
leave_direction != (GtkDirectionType)-1 &&
|
||||
leave_direction != -1 &&
|
||||
!gtk_widget_keynav_failed (GTK_WIDGET (text_view),
|
||||
leave_direction))
|
||||
{
|
||||
@@ -6165,7 +6165,7 @@ gtk_text_view_move_cursor (GtkTextView *text_view,
|
||||
if (step == GTK_MOVEMENT_DISPLAY_LINES)
|
||||
gtk_text_view_set_virtual_cursor_pos (text_view, cursor_x_pos, -1);
|
||||
}
|
||||
else if (leave_direction != (GtkDirectionType)-1)
|
||||
else if (leave_direction != -1)
|
||||
{
|
||||
if (!gtk_widget_keynav_failed (GTK_WIDGET (text_view),
|
||||
leave_direction))
|
||||
@@ -9421,14 +9421,15 @@ text_window_realize (GtkTextWindow *win,
|
||||
attributes.y = 0;
|
||||
attributes.width = win->allocation.width;
|
||||
attributes.height = win->allocation.height;
|
||||
attributes.event_mask = gtk_widget_get_events (win->widget)
|
||||
| GDK_EXPOSURE_MASK
|
||||
| GDK_SCROLL_MASK
|
||||
| GDK_SMOOTH_SCROLL_MASK
|
||||
| GDK_KEY_PRESS_MASK
|
||||
| GDK_BUTTON_PRESS_MASK
|
||||
| GDK_BUTTON_RELEASE_MASK
|
||||
| GDK_POINTER_MOTION_MASK;
|
||||
attributes.event_mask = (GDK_EXPOSURE_MASK |
|
||||
GDK_SCROLL_MASK |
|
||||
GDK_SMOOTH_SCROLL_MASK |
|
||||
GDK_KEY_PRESS_MASK |
|
||||
GDK_BUTTON_PRESS_MASK |
|
||||
GDK_BUTTON_RELEASE_MASK |
|
||||
GDK_POINTER_MOTION_MASK |
|
||||
GDK_POINTER_MOTION_HINT_MASK |
|
||||
gtk_widget_get_events (win->widget));
|
||||
|
||||
win->bin_window = gdk_window_new (win->window,
|
||||
&attributes,
|
||||
|
||||
+1
-1
@@ -904,7 +904,7 @@ gtk_tooltip_set_last_window (GtkTooltip *tooltip,
|
||||
|
||||
tooltip->last_window = window;
|
||||
|
||||
if (tooltip->last_window)
|
||||
if (window)
|
||||
g_object_add_weak_pointer (G_OBJECT (tooltip->last_window),
|
||||
(gpointer *) &tooltip->last_window);
|
||||
|
||||
|
||||
@@ -2124,7 +2124,6 @@ gtk_tree_view_destroy (GtkWidget *widget)
|
||||
GList *list;
|
||||
|
||||
gtk_tree_view_stop_editing (tree_view, TRUE);
|
||||
gtk_tree_view_stop_rubber_band (tree_view);
|
||||
|
||||
if (tree_view->priv->columns != NULL)
|
||||
{
|
||||
|
||||
@@ -1360,6 +1360,7 @@ _gtk_tree_view_column_realize_button (GtkTreeViewColumn *column)
|
||||
(GDK_BUTTON_PRESS_MASK |
|
||||
GDK_BUTTON_RELEASE_MASK |
|
||||
GDK_POINTER_MOTION_MASK |
|
||||
GDK_POINTER_MOTION_HINT_MASK |
|
||||
GDK_KEY_PRESS_MASK);
|
||||
attributes_mask = GDK_WA_CURSOR | GDK_WA_X | GDK_WA_Y;
|
||||
attr.cursor = gdk_cursor_new_for_display
|
||||
|
||||
+6
-8
@@ -15260,12 +15260,14 @@ gtk_widget_real_set_has_tooltip (GtkWidget *widget,
|
||||
gdk_window_set_events (priv->window,
|
||||
gdk_window_get_events (priv->window) |
|
||||
GDK_LEAVE_NOTIFY_MASK |
|
||||
GDK_POINTER_MOTION_MASK);
|
||||
GDK_POINTER_MOTION_MASK |
|
||||
GDK_POINTER_MOTION_HINT_MASK);
|
||||
|
||||
if (gtk_widget_get_has_window (widget))
|
||||
gtk_widget_add_events (widget,
|
||||
GDK_LEAVE_NOTIFY_MASK |
|
||||
GDK_POINTER_MOTION_MASK);
|
||||
GDK_POINTER_MOTION_MASK |
|
||||
GDK_POINTER_MOTION_HINT_MASK);
|
||||
}
|
||||
|
||||
g_object_set_qdata (G_OBJECT (widget), quark_has_tooltip,
|
||||
@@ -16337,7 +16339,7 @@ gtk_widget_path_append_for_widget (GtkWidgetPath *path,
|
||||
classes = gtk_css_node_list_classes (widget->priv->cssnode);
|
||||
|
||||
for (l = classes; l; l = l->next)
|
||||
gtk_widget_path_iter_add_class (path, pos, g_quark_to_string (GPOINTER_TO_UINT (l->data)));
|
||||
gtk_widget_path_iter_add_class (path, pos, l->data);
|
||||
|
||||
g_list_free (classes);
|
||||
}
|
||||
@@ -16400,18 +16402,14 @@ gtk_widget_get_path (GtkWidget *widget)
|
||||
}
|
||||
|
||||
void
|
||||
gtk_widget_clear_path (GtkWidget *widget)
|
||||
_gtk_widget_style_context_invalidated (GtkWidget *widget)
|
||||
{
|
||||
if (widget->priv->path)
|
||||
{
|
||||
gtk_widget_path_free (widget->priv->path);
|
||||
widget->priv->path = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_gtk_widget_style_context_invalidated (GtkWidget *widget)
|
||||
{
|
||||
if (gtk_widget_get_realized (widget))
|
||||
g_signal_emit (widget, widget_signals[STYLE_UPDATED], 0);
|
||||
else
|
||||
|
||||
+2
-2
@@ -497,8 +497,8 @@ gtk_widget_path_iter_get_siblings (const GtkWidgetPath *path,
|
||||
{
|
||||
GtkPathElement *elem;
|
||||
|
||||
g_return_val_if_fail (path != NULL, NULL);
|
||||
g_return_val_if_fail (path->elems->len != 0, NULL);
|
||||
g_return_val_if_fail (path != NULL, G_TYPE_INVALID);
|
||||
g_return_val_if_fail (path->elems->len != 0, G_TYPE_INVALID);
|
||||
|
||||
if (pos < 0 || pos >= path->elems->len)
|
||||
pos = path->elems->len - 1;
|
||||
|
||||
@@ -148,7 +148,6 @@ gboolean _gtk_widget_captured_event (GtkWidget *widget,
|
||||
GdkEvent *event);
|
||||
|
||||
GtkWidgetPath * _gtk_widget_create_path (GtkWidget *widget);
|
||||
void gtk_widget_clear_path (GtkWidget *widget);
|
||||
void _gtk_widget_invalidate_style_context (GtkWidget *widget,
|
||||
GtkCssChange change);
|
||||
void _gtk_widget_style_context_invalidated (GtkWidget *widget);
|
||||
|
||||
+40
-48
@@ -227,7 +227,8 @@ struct _GtkWindowPrivate
|
||||
guint gravity : 5; /* GdkGravity */
|
||||
guint csd_requested : 1;
|
||||
guint client_decorated : 1; /* Decorations drawn client-side */
|
||||
guint use_client_shadow : 1; /* Decorations use client-side shadows */
|
||||
guint custom_title : 1; /* app-provided titlebar if CSD can't
|
||||
* be enabled */
|
||||
guint maximized : 1;
|
||||
guint fullscreen : 1;
|
||||
guint tiled : 1;
|
||||
@@ -3946,7 +3947,7 @@ unset_titlebar (GtkWindow *window)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_window_supports_client_shadow (GtkWindow *window)
|
||||
gtk_window_supports_csd (GtkWindow *window)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (window);
|
||||
|
||||
@@ -3996,21 +3997,13 @@ gtk_window_enable_csd (GtkWindow *window)
|
||||
GtkWidget *widget = GTK_WIDGET (window);
|
||||
GdkVisual *visual;
|
||||
|
||||
/* We need a visual with alpha for client shadows */
|
||||
if (priv->use_client_shadow)
|
||||
{
|
||||
visual = gdk_screen_get_rgba_visual (gtk_widget_get_screen (widget));
|
||||
if (visual != NULL)
|
||||
gtk_widget_set_visual (widget, visual);
|
||||
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (widget), GTK_STYLE_CLASS_CSD);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (widget), "solid-csd");
|
||||
}
|
||||
/* We need a visual with alpha */
|
||||
visual = gdk_screen_get_rgba_visual (gtk_widget_get_screen (widget));
|
||||
g_assert (visual != NULL);
|
||||
gtk_widget_set_visual (widget, visual);
|
||||
|
||||
priv->client_decorated = TRUE;
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (widget), GTK_STYLE_CLASS_CSD);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -4045,6 +4038,7 @@ gtk_window_set_titlebar (GtkWindow *window,
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (window);
|
||||
GtkWindowPrivate *priv = window->priv;
|
||||
GdkVisual *visual;
|
||||
gboolean was_mapped;
|
||||
|
||||
g_return_if_fail (GTK_IS_WINDOW (window));
|
||||
@@ -4065,15 +4059,18 @@ gtk_window_set_titlebar (GtkWindow *window,
|
||||
|
||||
if (titlebar == NULL)
|
||||
{
|
||||
priv->custom_title = FALSE;
|
||||
priv->client_decorated = FALSE;
|
||||
gtk_style_context_remove_class (gtk_widget_get_style_context (widget), GTK_STYLE_CLASS_CSD);
|
||||
|
||||
goto out;
|
||||
}
|
||||
|
||||
priv->use_client_shadow = gtk_window_supports_client_shadow (window);
|
||||
if (gtk_window_supports_csd (window))
|
||||
gtk_window_enable_csd (window);
|
||||
else
|
||||
priv->custom_title = TRUE;
|
||||
|
||||
gtk_window_enable_csd (window);
|
||||
priv->title_box = titlebar;
|
||||
gtk_widget_set_parent (priv->title_box, widget);
|
||||
if (GTK_IS_HEADER_BAR (titlebar))
|
||||
@@ -4083,6 +4080,10 @@ gtk_window_set_titlebar (GtkWindow *window,
|
||||
on_titlebar_title_notify (GTK_HEADER_BAR (titlebar), NULL, window);
|
||||
}
|
||||
|
||||
visual = gdk_screen_get_rgba_visual (gtk_widget_get_screen (widget));
|
||||
if (visual)
|
||||
gtk_widget_set_visual (widget, visual);
|
||||
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (titlebar),
|
||||
GTK_STYLE_CLASS_TITLEBAR);
|
||||
|
||||
@@ -4170,6 +4171,8 @@ gtk_window_set_decorated (GtkWindow *window,
|
||||
{
|
||||
if (priv->client_decorated)
|
||||
gdk_window_set_decorations (gdk_window, 0);
|
||||
else if (priv->custom_title)
|
||||
gdk_window_set_decorations (gdk_window, GDK_DECOR_BORDER);
|
||||
else
|
||||
gdk_window_set_decorations (gdk_window, GDK_DECOR_ALL);
|
||||
}
|
||||
@@ -5806,8 +5809,7 @@ create_decoration (GtkWidget *widget)
|
||||
GtkWindow *window = GTK_WINDOW (widget);
|
||||
GtkWindowPrivate *priv = window->priv;
|
||||
|
||||
priv->use_client_shadow = gtk_window_supports_client_shadow (window);
|
||||
if (!priv->use_client_shadow)
|
||||
if (!gtk_window_supports_csd (window))
|
||||
return;
|
||||
|
||||
gtk_window_enable_csd (window);
|
||||
@@ -6624,7 +6626,7 @@ update_border_windows (GtkWindow *window)
|
||||
border.right + handle, border.top + handle);
|
||||
gdk_window_move_resize (priv->border_window[GDK_WINDOW_EDGE_SOUTH_WEST],
|
||||
window_border.left - border.left, window_border.top + height - handle,
|
||||
border.left + handle, border.bottom + handle);
|
||||
window_border.left + handle, border.bottom + handle);
|
||||
gdk_window_move_resize (priv->border_window[GDK_WINDOW_EDGE_SOUTH_EAST],
|
||||
window_border.left + width - handle, window_border.top + height - handle,
|
||||
border.right + handle, border.bottom + handle);
|
||||
@@ -6890,7 +6892,7 @@ update_realized_window_properties (GtkWindow *window,
|
||||
{
|
||||
GtkWindowPrivate *priv = window->priv;
|
||||
|
||||
if (priv->client_decorated && priv->use_client_shadow)
|
||||
if (priv->client_decorated)
|
||||
update_shadow_width (window, window_border);
|
||||
|
||||
update_opaque_region (window, window_border, child_allocation);
|
||||
@@ -7033,7 +7035,8 @@ gtk_window_realize (GtkWidget *widget)
|
||||
GDK_FOCUS_CHANGE_MASK |
|
||||
GDK_STRUCTURE_MASK);
|
||||
|
||||
if (priv->decorated && priv->client_decorated)
|
||||
if (priv->decorated &&
|
||||
(priv->client_decorated || priv->custom_title))
|
||||
attributes.event_mask |= GDK_POINTER_MOTION_MASK;
|
||||
|
||||
attributes.type_hint = priv->type_hint;
|
||||
@@ -7108,6 +7111,8 @@ gtk_window_realize (GtkWidget *widget)
|
||||
|
||||
if (!priv->decorated || priv->client_decorated)
|
||||
gdk_window_set_decorations (gdk_window, 0);
|
||||
else if (priv->custom_title)
|
||||
gdk_window_set_decorations (gdk_window, GDK_DECOR_BORDER);
|
||||
|
||||
if (!priv->deletable)
|
||||
gdk_window_set_functions (gdk_window, GDK_FUNC_ALL | GDK_FUNC_CLOSE);
|
||||
@@ -9684,31 +9689,18 @@ gtk_window_draw (GtkWidget *widget,
|
||||
|
||||
add_window_frame_style_class (context);
|
||||
|
||||
if (priv->use_client_shadow)
|
||||
{
|
||||
gtk_render_background (context, cr,
|
||||
window_border.left, window_border.top,
|
||||
allocation.width -
|
||||
(window_border.left + window_border.right),
|
||||
allocation.height -
|
||||
(window_border.top + window_border.bottom));
|
||||
gtk_render_frame (context, cr,
|
||||
window_border.left, window_border.top,
|
||||
allocation.width -
|
||||
(window_border.left + window_border.right),
|
||||
allocation.height -
|
||||
(window_border.top + window_border.bottom));
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_render_background (context, cr, 0, 0,
|
||||
allocation.width,
|
||||
allocation.height);
|
||||
|
||||
gtk_render_frame (context, cr, 0, 0,
|
||||
allocation.width,
|
||||
allocation.height);
|
||||
}
|
||||
gtk_render_background (context, cr,
|
||||
window_border.left, window_border.top,
|
||||
allocation.width -
|
||||
(window_border.left + window_border.right),
|
||||
allocation.height -
|
||||
(window_border.top + window_border.bottom));
|
||||
gtk_render_frame (context, cr,
|
||||
window_border.left, window_border.top,
|
||||
allocation.width -
|
||||
(window_border.left + window_border.right),
|
||||
allocation.height -
|
||||
(window_border.top + window_border.bottom));
|
||||
|
||||
gtk_style_context_restore (context);
|
||||
}
|
||||
@@ -10474,7 +10466,7 @@ gtk_window_set_screen (GtkWindow *window,
|
||||
}
|
||||
g_object_notify (G_OBJECT (window), "screen");
|
||||
|
||||
if (was_rgba && priv->use_client_shadow)
|
||||
if (was_rgba)
|
||||
{
|
||||
GdkVisual *visual;
|
||||
|
||||
|
||||
@@ -354,7 +354,7 @@ update_info (gpointer data)
|
||||
frame = gdk_frame_clock_get_frame_counter (clock);
|
||||
frame_time = gdk_frame_clock_get_frame_time (clock);
|
||||
|
||||
tmp = g_strdup_printf ("%"G_GINT64_FORMAT, frame);
|
||||
tmp = g_strdup_printf ("%ld", frame);
|
||||
gtk_label_set_label (GTK_LABEL (sl->priv->framecount), tmp);
|
||||
g_free (tmp);
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ $backdrop_bg_color: $bg_color;
|
||||
$backdrop_fg_color: mix($fg_color, $backdrop_bg_color, 50%);
|
||||
$backdrop_insensitive_color: if($variant == 'light', darken($backdrop_bg_color, 15%), lighten($backdrop_bg_color, 15%));
|
||||
$backdrop_selected_fg_color: $selected_fg_color;
|
||||
$backdrop_selected_bg_color: desaturate($selected_bg_color,100%);
|
||||
$backdrop_borders_color: mix($borders_color, $bg_color, 90%);
|
||||
$backdrop_dark_fill: mix($backdrop_borders_color, $backdrop_bg_color, 35%);
|
||||
$backdrop_sidebar_bg_color: lighten($backdrop_bg_color,5%);
|
||||
|
||||
@@ -308,7 +308,7 @@ GtkTextView { // This will get overridden by .view, needed by gedit line numbers
|
||||
@extend %linked_vertical;
|
||||
&:focus {
|
||||
border-color: entry_focus_border($selected_bg_color);
|
||||
box-shadow: entry_focus_shadow($selected_bg_color),
|
||||
box-shadow: entry_focus_glow($selected_bg_color),
|
||||
0 -1px 0 0 entry_focus_border($selected_bg_color);
|
||||
@extend %linked_vertical;
|
||||
}
|
||||
@@ -353,7 +353,7 @@ GtkTextView { // This will get overridden by .view, needed by gedit line numbers
|
||||
box-shadow: _widget_edge();
|
||||
&:focus {
|
||||
border-color: entry_focus_border($selected_bg_color);
|
||||
box-shadow: entry_focus_shadow($selected_bg_color),
|
||||
box-shadow: entry_focus_glow($selected_bg_color),
|
||||
0 -1px 0 0 entry_focus_border($selected_bg_color),
|
||||
_widget_edge();
|
||||
@extend %linked_vertical:last-child;
|
||||
@@ -3227,13 +3227,6 @@ GtkVolumeButton.button { padding: 8px; }
|
||||
0 0 0 1px transparentize($_wm_border,0.1);
|
||||
}
|
||||
}
|
||||
&.solid-csd {
|
||||
border-radius: 0;
|
||||
margin: 4px;
|
||||
background-color: $backdrop_bg_color;
|
||||
border: solid 1px $backdrop_borders_color;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Window Close button
|
||||
@@ -3261,7 +3254,10 @@ GtkVolumeButton.button { padding: 8px; }
|
||||
@if $variant == 'light' {
|
||||
outline-color: transparentize($selected_fg_color, 0.7);
|
||||
}
|
||||
&:backdrop { color: $backdrop_selected_fg_color; }
|
||||
&:backdrop {
|
||||
color: $backdrop_selected_fg_color;
|
||||
background-color: $backdrop_selected_bg_color;
|
||||
}
|
||||
}
|
||||
|
||||
/* Decouple the font of context menus from their entry/textview */
|
||||
|
||||
@@ -24,8 +24,10 @@
|
||||
@else { @return if($fc==$selected_bg_color, $selected_borders_color, darken($fc,35%)); }
|
||||
}
|
||||
|
||||
@function entry_focus_shadow($fc) {
|
||||
@return inset 0 0 0 1px $fc;
|
||||
@function entry_focus_glow($fc) {
|
||||
$_focus_glow_color: if($variant=='light', transparentize($fc,0.85),
|
||||
transparentize($fc,0.3));
|
||||
@return inset 0 0 0 1px $_focus_glow_color;
|
||||
}
|
||||
|
||||
@function entry_gradient($c) {
|
||||
@@ -61,13 +63,13 @@
|
||||
color: $text_color;
|
||||
border-color: $borders_color;
|
||||
@include _shadows($_inner_shadows,
|
||||
entry_focus_shadow(transparentize($fc,1)),
|
||||
entry_focus_glow(transparentize($fc,1)),
|
||||
$_entry_edge);
|
||||
// the second transparent shadow is needed for the transition to work
|
||||
}
|
||||
@if $t==focus {
|
||||
@include _shadows($_inner_shadows,
|
||||
entry_focus_shadow($fc),
|
||||
entry_focus_glow($fc),
|
||||
$_entry_edge);
|
||||
border-color: entry_focus_border($fc);
|
||||
}
|
||||
@@ -104,7 +106,7 @@
|
||||
border-color: $selected_bg_color;
|
||||
background-image: linear-gradient(to bottom, transparentize(opacify($osd_borders_color, 1), 0.5));
|
||||
background-clip: padding-box;
|
||||
box-shadow: entry_focus_shadow($selected_bg_color);
|
||||
box-shadow: entry_focus_glow($selected_bg_color);
|
||||
text-shadow: 0 1px black;
|
||||
icon-shadow: 0 1px black;
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ GtkTextView {
|
||||
.entry:focus {
|
||||
background-color: transparent;
|
||||
background-image: linear-gradient(to bottom, #212121, #292929 90%);
|
||||
box-shadow: inset 0 3px rgba(0, 0, 0, 0.02), inset 0 2px rgba(0, 0, 0, 0.03), inset 0 1px rgba(0, 0, 0, 0.08), inset 0 0 0 1px #215d9c, 0 1px rgba(238, 238, 236, 0.1);
|
||||
box-shadow: inset 0 3px rgba(0, 0, 0, 0.02), inset 0 2px rgba(0, 0, 0, 0.03), inset 0 1px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(33, 93, 156, 0.7), 0 1px rgba(238, 238, 236, 0.1);
|
||||
border-color: #0f2b48; }
|
||||
.entry:insensitive {
|
||||
background-color: transparent;
|
||||
@@ -231,7 +231,7 @@ GtkTextView {
|
||||
.entry.error:focus {
|
||||
background-color: transparent;
|
||||
background-image: linear-gradient(to bottom, #212121, #292929 90%);
|
||||
box-shadow: inset 0 3px rgba(0, 0, 0, 0.02), inset 0 2px rgba(0, 0, 0, 0.03), inset 0 1px rgba(0, 0, 0, 0.08), inset 0 0 0 1px #cc0000, 0 1px rgba(238, 238, 236, 0.1);
|
||||
box-shadow: inset 0 3px rgba(0, 0, 0, 0.02), inset 0 2px rgba(0, 0, 0, 0.03), inset 0 1px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(204, 0, 0, 0.7), 0 1px rgba(238, 238, 236, 0.1);
|
||||
border-color: #1a0000; }
|
||||
.entry.error:selected, .entry.error:selected:focus {
|
||||
background-color: #cc0000; }
|
||||
@@ -241,7 +241,7 @@ GtkTextView {
|
||||
.entry.warning:focus {
|
||||
background-color: transparent;
|
||||
background-image: linear-gradient(to bottom, #212121, #292929 90%);
|
||||
box-shadow: inset 0 3px rgba(0, 0, 0, 0.02), inset 0 2px rgba(0, 0, 0, 0.03), inset 0 1px rgba(0, 0, 0, 0.08), inset 0 0 0 1px #f57900, 0 1px rgba(238, 238, 236, 0.1);
|
||||
box-shadow: inset 0 3px rgba(0, 0, 0, 0.02), inset 0 2px rgba(0, 0, 0, 0.03), inset 0 1px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(245, 121, 0, 0.7), 0 1px rgba(238, 238, 236, 0.1);
|
||||
border-color: #432100; }
|
||||
.entry.warning:selected, .entry.warning:selected:focus {
|
||||
background-color: #f57900; }
|
||||
@@ -264,7 +264,7 @@ GtkTextView {
|
||||
box-shadow: none; }
|
||||
.linked.vertical > .entry:focus {
|
||||
border-color: #0f2b48;
|
||||
box-shadow: inset 0 0 0 1px #215d9c, 0 -1px 0 0 #0f2b48; }
|
||||
box-shadow: inset 0 0 0 1px rgba(33, 93, 156, 0.7), 0 -1px 0 0 #0f2b48; }
|
||||
.linked.vertical > .entry:insensitive {
|
||||
background-color: transparent;
|
||||
background-image: linear-gradient(to bottom, #212121, #292929 90%);
|
||||
@@ -299,7 +299,7 @@ GtkTextView {
|
||||
.linked.vertical > .entry:first-child:focus {
|
||||
background-color: transparent;
|
||||
background-image: linear-gradient(to bottom, #212121, #292929 90%);
|
||||
box-shadow: inset 0 3px rgba(0, 0, 0, 0.02), inset 0 2px rgba(0, 0, 0, 0.03), inset 0 1px rgba(0, 0, 0, 0.08), inset 0 0 0 1px #215d9c;
|
||||
box-shadow: inset 0 3px rgba(0, 0, 0, 0.02), inset 0 2px rgba(0, 0, 0, 0.03), inset 0 1px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(33, 93, 156, 0.7);
|
||||
border-color: #0f2b48; }
|
||||
.linked.vertical > .entry:first-child:insensitive {
|
||||
background-color: transparent;
|
||||
@@ -336,7 +336,7 @@ GtkTextView {
|
||||
box-shadow: 0 1px rgba(238, 238, 236, 0.1); }
|
||||
.linked.vertical > .entry:last-child:focus {
|
||||
border-color: #0f2b48;
|
||||
box-shadow: inset 0 0 0 1px #215d9c, 0 -1px 0 0 #0f2b48, 0 1px rgba(238, 238, 236, 0.1); }
|
||||
box-shadow: inset 0 0 0 1px rgba(33, 93, 156, 0.7), 0 -1px 0 0 #0f2b48, 0 1px rgba(238, 238, 236, 0.1); }
|
||||
.linked.vertical > .entry:last-child:insensitive {
|
||||
background-color: transparent;
|
||||
background-image: linear-gradient(to bottom, #212121, #292929 90%);
|
||||
@@ -375,7 +375,7 @@ GtkTextView {
|
||||
border-color: #215d9c;
|
||||
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5));
|
||||
background-clip: padding-box;
|
||||
box-shadow: inset 0 0 0 1px #215d9c;
|
||||
box-shadow: inset 0 0 0 1px rgba(33, 93, 156, 0.7);
|
||||
text-shadow: 0 1px black;
|
||||
icon-shadow: 0 1px black; }
|
||||
.osd .entry:backdrop {
|
||||
@@ -482,8 +482,7 @@ GtkTextView {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0); }
|
||||
.button:backdrop:insensitive > .label, .header-bar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.titlebar .button.titlebutton:backdrop:insensitive > .label, .button.flat:backdrop:insensitive > .label, .header-bar .titlebutton.button:backdrop:insensitive > .label,
|
||||
.button:backdrop:insensitive > .label, .button.flat:backdrop:insensitive > .label, .header-bar .titlebutton.button:backdrop:insensitive > .label,
|
||||
.titlebar .titlebutton.button:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
.button:backdrop:insensitive:active, .button:backdrop:insensitive:checked, .button.flat:backdrop:insensitive:active, .header-bar .titlebutton.button:backdrop:insensitive:active,
|
||||
@@ -493,9 +492,7 @@ GtkTextView {
|
||||
border-color: #1e2222;
|
||||
background-image: linear-gradient(to bottom, #262929);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0); }
|
||||
.button:backdrop:insensitive:active > .label, .header-bar .button.titlebutton:backdrop:insensitive:active > .label,
|
||||
.titlebar .button.titlebutton:backdrop:insensitive:active > .label, .button:backdrop:insensitive:checked > .label, .header-bar .button.titlebutton:backdrop:insensitive:checked > .label,
|
||||
.titlebar .button.titlebutton:backdrop:insensitive:checked > .label, .button.flat:backdrop:insensitive:active > .label, .header-bar .titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.button:backdrop:insensitive:active > .label, .button:backdrop:insensitive:checked > .label, .button.flat:backdrop:insensitive:active > .label, .header-bar .titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.titlebar .titlebutton.button:backdrop:insensitive:active > .label, .button.flat:backdrop:insensitive:checked > .label, .header-bar .titlebutton.button:backdrop:insensitive:checked > .label,
|
||||
.titlebar .titlebutton.button:backdrop:insensitive:checked > .label {
|
||||
color: inherit; }
|
||||
@@ -517,17 +514,14 @@ GtkTextView {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0.1); }
|
||||
.button:insensitive > .label, .header-bar .button.titlebutton:insensitive > .label,
|
||||
.titlebar .button.titlebutton:insensitive > .label {
|
||||
.button:insensitive > .label {
|
||||
color: inherit; }
|
||||
.button:insensitive:active, .button:insensitive:checked {
|
||||
color: #939695;
|
||||
border-color: #1c1f1f;
|
||||
background-image: linear-gradient(to bottom, #2f3333, #323636);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0.1); }
|
||||
.button:insensitive:active > .label, .header-bar .button.titlebutton:insensitive:active > .label,
|
||||
.titlebar .button.titlebutton:insensitive:active > .label, .button:insensitive:checked > .label, .header-bar .button.titlebutton:insensitive:checked > .label,
|
||||
.titlebar .button.titlebutton:insensitive:checked > .label {
|
||||
.button:insensitive:active > .label, .button:insensitive:checked > .label {
|
||||
color: inherit; }
|
||||
.button.osd, .header-bar .osd.button.titlebutton,
|
||||
.titlebar .osd.button.titlebutton {
|
||||
@@ -769,8 +763,7 @@ GtkTextView {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0); }
|
||||
.button.suggested-action:backdrop:insensitive > .label, .header-bar .suggested-action.button.titlebutton:backdrop:insensitive > .label,
|
||||
.titlebar .suggested-action.button.titlebutton:backdrop:insensitive > .label, .button.suggested-action.flat:backdrop:insensitive > .label, .header-bar .suggested-action.titlebutton.button:backdrop:insensitive > .label,
|
||||
.button.suggested-action:backdrop:insensitive > .label, .button.suggested-action.flat:backdrop:insensitive > .label, .header-bar .suggested-action.titlebutton.button:backdrop:insensitive > .label,
|
||||
.titlebar .suggested-action.titlebutton.button:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
.button.suggested-action:backdrop:insensitive:active, .button.suggested-action:backdrop:insensitive:checked, .button.suggested-action.flat:backdrop:insensitive:active, .header-bar .suggested-action.titlebutton.button:backdrop:insensitive:active,
|
||||
@@ -780,9 +773,7 @@ GtkTextView {
|
||||
border-color: #0b1e33;
|
||||
background-image: linear-gradient(to bottom, #1d4876);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0); }
|
||||
.button.suggested-action:backdrop:insensitive:active > .label, .header-bar .suggested-action.button.titlebutton:backdrop:insensitive:active > .label,
|
||||
.titlebar .suggested-action.button.titlebutton:backdrop:insensitive:active > .label, .button.suggested-action:backdrop:insensitive:checked > .label, .header-bar .suggested-action.button.titlebutton:backdrop:insensitive:checked > .label,
|
||||
.titlebar .suggested-action.button.titlebutton:backdrop:insensitive:checked > .label, .button.suggested-action.flat:backdrop:insensitive:active > .label, .header-bar .suggested-action.titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.button.suggested-action:backdrop:insensitive:active > .label, .button.suggested-action:backdrop:insensitive:checked > .label, .button.suggested-action.flat:backdrop:insensitive:active > .label, .header-bar .suggested-action.titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.titlebar .suggested-action.titlebutton.button:backdrop:insensitive:active > .label, .button.suggested-action.flat:backdrop:insensitive:checked > .label, .header-bar .suggested-action.titlebutton.button:backdrop:insensitive:checked > .label,
|
||||
.titlebar .suggested-action.titlebutton.button:backdrop:insensitive:checked > .label {
|
||||
color: inherit; }
|
||||
@@ -804,17 +795,14 @@ GtkTextView {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0.1); }
|
||||
.button.suggested-action:insensitive > .label, .header-bar .suggested-action.button.titlebutton:insensitive > .label,
|
||||
.titlebar .suggested-action.button.titlebutton:insensitive > .label {
|
||||
.button.suggested-action:insensitive > .label {
|
||||
color: inherit; }
|
||||
.button.suggested-action:insensitive:active, .button.suggested-action:insensitive:checked {
|
||||
color: #a4b5c8;
|
||||
border-color: #0b1e33;
|
||||
background-image: linear-gradient(to bottom, #1b436f, #1d4876);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0.1); }
|
||||
.button.suggested-action:insensitive:active > .label, .header-bar .suggested-action.button.titlebutton:insensitive:active > .label,
|
||||
.titlebar .suggested-action.button.titlebutton:insensitive:active > .label, .button.suggested-action:insensitive:checked > .label, .header-bar .suggested-action.button.titlebutton:insensitive:checked > .label,
|
||||
.titlebar .suggested-action.button.titlebutton:insensitive:checked > .label {
|
||||
.button.suggested-action:insensitive:active > .label, .button.suggested-action:insensitive:checked > .label {
|
||||
color: inherit; }
|
||||
.osd .button.suggested-action {
|
||||
color: #eeeeec;
|
||||
@@ -916,8 +904,7 @@ GtkTextView {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0); }
|
||||
.button.destructive-action:backdrop:insensitive > .label, .header-bar .destructive-action.button.titlebutton:backdrop:insensitive > .label,
|
||||
.titlebar .destructive-action.button.titlebutton:backdrop:insensitive > .label, .button.destructive-action.flat:backdrop:insensitive > .label, .header-bar .destructive-action.titlebutton.button:backdrop:insensitive > .label,
|
||||
.button.destructive-action:backdrop:insensitive > .label, .button.destructive-action.flat:backdrop:insensitive > .label, .header-bar .destructive-action.titlebutton.button:backdrop:insensitive > .label,
|
||||
.titlebar .destructive-action.titlebutton.button:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
.button.destructive-action:backdrop:insensitive:active, .button.destructive-action:backdrop:insensitive:checked, .button.destructive-action.flat:backdrop:insensitive:active, .header-bar .destructive-action.titlebutton.button:backdrop:insensitive:active,
|
||||
@@ -927,9 +914,7 @@ GtkTextView {
|
||||
border-color: #5e0707;
|
||||
background-image: linear-gradient(to bottom, #a41111);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0); }
|
||||
.button.destructive-action:backdrop:insensitive:active > .label, .header-bar .destructive-action.button.titlebutton:backdrop:insensitive:active > .label,
|
||||
.titlebar .destructive-action.button.titlebutton:backdrop:insensitive:active > .label, .button.destructive-action:backdrop:insensitive:checked > .label, .header-bar .destructive-action.button.titlebutton:backdrop:insensitive:checked > .label,
|
||||
.titlebar .destructive-action.button.titlebutton:backdrop:insensitive:checked > .label, .button.destructive-action.flat:backdrop:insensitive:active > .label, .header-bar .destructive-action.titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.button.destructive-action:backdrop:insensitive:active > .label, .button.destructive-action:backdrop:insensitive:checked > .label, .button.destructive-action.flat:backdrop:insensitive:active > .label, .header-bar .destructive-action.titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.titlebar .destructive-action.titlebutton.button:backdrop:insensitive:active > .label, .button.destructive-action.flat:backdrop:insensitive:checked > .label, .header-bar .destructive-action.titlebutton.button:backdrop:insensitive:checked > .label,
|
||||
.titlebar .destructive-action.titlebutton.button:backdrop:insensitive:checked > .label {
|
||||
color: inherit; }
|
||||
@@ -951,17 +936,14 @@ GtkTextView {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0.1); }
|
||||
.button.destructive-action:insensitive > .label, .header-bar .destructive-action.button.titlebutton:insensitive > .label,
|
||||
.titlebar .destructive-action.button.titlebutton:insensitive > .label {
|
||||
.button.destructive-action:insensitive > .label {
|
||||
color: inherit; }
|
||||
.button.destructive-action:insensitive:active, .button.destructive-action:insensitive:checked {
|
||||
color: #da9f9f;
|
||||
border-color: #5e0707;
|
||||
background-image: linear-gradient(to bottom, #9d1010, #a41111);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0.1); }
|
||||
.button.destructive-action:insensitive:active > .label, .header-bar .destructive-action.button.titlebutton:insensitive:active > .label,
|
||||
.titlebar .destructive-action.button.titlebutton:insensitive:active > .label, .button.destructive-action:insensitive:checked > .label, .header-bar .destructive-action.button.titlebutton:insensitive:checked > .label,
|
||||
.titlebar .destructive-action.button.titlebutton:insensitive:checked > .label {
|
||||
.button.destructive-action:insensitive:active > .label, .button.destructive-action:insensitive:checked > .label {
|
||||
color: inherit; }
|
||||
.osd .button.destructive-action {
|
||||
color: #eeeeec;
|
||||
@@ -1034,8 +1016,7 @@ GtkTextView {
|
||||
padding-right: 6px;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px; }
|
||||
.stack-switcher > .button.text-button, .header-bar .stack-switcher > .text-button.button.titlebutton,
|
||||
.titlebar .stack-switcher > .text-button.button.titlebutton {
|
||||
.stack-switcher > .button.text-button {
|
||||
padding: 5px 10px 6px; }
|
||||
.stack-switcher > .button.image-button, .header-bar .stack-switcher > .titlebutton.button,
|
||||
.titlebar .stack-switcher > .titlebutton.button {
|
||||
@@ -1074,8 +1055,7 @@ GtkTextView {
|
||||
text-shadow: 0 -1px rgba(0, 0, 0, 0.81176);
|
||||
icon-shadow: 0 -1px rgba(0, 0, 0, 0.81176);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px rgba(238, 238, 236, 0.1); }
|
||||
.inline-toolbar GtkToolButton > .button:hover, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:hover,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:hover {
|
||||
.inline-toolbar GtkToolButton > .button:hover {
|
||||
color: #eeeeec;
|
||||
outline-color: rgba(238, 238, 236, 0.3);
|
||||
border-color: #1c1f1f;
|
||||
@@ -1083,9 +1063,7 @@ GtkTextView {
|
||||
text-shadow: 0 -1px rgba(0, 0, 0, 0.77976);
|
||||
icon-shadow: 0 -1px rgba(0, 0, 0, 0.77976);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px rgba(238, 238, 236, 0.1); }
|
||||
.inline-toolbar GtkToolButton > .button:active, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:active,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:active, .inline-toolbar GtkToolButton > .button:checked, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:checked,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:checked {
|
||||
.inline-toolbar GtkToolButton > .button:active, .inline-toolbar GtkToolButton > .button:checked {
|
||||
color: #eeeeec;
|
||||
outline-color: rgba(238, 238, 236, 0.3);
|
||||
border-color: #1c1f1f;
|
||||
@@ -1093,8 +1071,7 @@ GtkTextView {
|
||||
text-shadow: 0 -1px rgba(0, 0, 0, 0.89176);
|
||||
icon-shadow: 0 -1px rgba(0, 0, 0, 0.89176);
|
||||
box-shadow: inset 0 1px rgba(0, 0, 0, 0.07), inset 0 2px 1px -2px rgba(0, 0, 0, 0.6), 0 1px rgba(238, 238, 236, 0.1); }
|
||||
.inline-toolbar GtkToolButton > .button:insensitive, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:insensitive,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:insensitive {
|
||||
.inline-toolbar GtkToolButton > .button:insensitive {
|
||||
color: #939695;
|
||||
border-color: #1c1f1f;
|
||||
background-image: linear-gradient(to bottom, #323636);
|
||||
@@ -1103,32 +1080,26 @@ GtkTextView {
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0.1); }
|
||||
.inline-toolbar GtkToolButton > .button:insensitive > .label {
|
||||
color: inherit; }
|
||||
.inline-toolbar GtkToolButton > .button:insensitive:active, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:insensitive:active,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:insensitive:active, .inline-toolbar GtkToolButton > .button:insensitive:checked, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:insensitive:checked,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:insensitive:checked {
|
||||
.inline-toolbar GtkToolButton > .button:insensitive:active, .inline-toolbar GtkToolButton > .button:insensitive:checked {
|
||||
color: #939695;
|
||||
border-color: #1c1f1f;
|
||||
background-image: linear-gradient(to bottom, #2f3333, #323636);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0.1); }
|
||||
.inline-toolbar GtkToolButton > .button:insensitive:active > .label, .inline-toolbar GtkToolButton > .button:insensitive:checked > .label {
|
||||
color: inherit; }
|
||||
.inline-toolbar GtkToolButton > .button:backdrop, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:backdrop,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:backdrop {
|
||||
.inline-toolbar GtkToolButton > .button:backdrop {
|
||||
color: #939695;
|
||||
border-color: #1e2222;
|
||||
background-image: linear-gradient(to bottom, #393f3f);
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0); }
|
||||
.inline-toolbar GtkToolButton > .button:backdrop:active, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:backdrop:active,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:backdrop:active, .inline-toolbar GtkToolButton > .button:backdrop:checked, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:backdrop:checked,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:backdrop:checked {
|
||||
.inline-toolbar GtkToolButton > .button:backdrop:active, .inline-toolbar GtkToolButton > .button:backdrop:checked {
|
||||
color: #939695;
|
||||
border-color: #1e2222;
|
||||
background-image: linear-gradient(to bottom, #2f3434);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0); }
|
||||
.inline-toolbar GtkToolButton > .button:backdrop:insensitive, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:backdrop:insensitive,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:backdrop:insensitive {
|
||||
.inline-toolbar GtkToolButton > .button:backdrop:insensitive {
|
||||
color: #5d6767;
|
||||
border-color: #1e2222;
|
||||
background-image: linear-gradient(to bottom, #323636);
|
||||
@@ -1137,9 +1108,7 @@ GtkTextView {
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0); }
|
||||
.inline-toolbar GtkToolButton > .button:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
.inline-toolbar GtkToolButton > .button:backdrop:insensitive:active, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:backdrop:insensitive:active,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:backdrop:insensitive:active, .inline-toolbar GtkToolButton > .button:backdrop:insensitive:checked, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:backdrop:insensitive:checked,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:backdrop:insensitive:checked {
|
||||
.inline-toolbar GtkToolButton > .button:backdrop:insensitive:active, .inline-toolbar GtkToolButton > .button:backdrop:insensitive:checked {
|
||||
color: #5d6767;
|
||||
border-color: #1e2222;
|
||||
background-image: linear-gradient(to bottom, #262929);
|
||||
@@ -1178,14 +1147,12 @@ GtkComboBox.combobox-entry .titlebar .button.titlebutton,
|
||||
.inline-toolbar .header-bar GtkToolButton:backdrop:dir(rtl) > .button.titlebutton,
|
||||
.header-bar .inline-toolbar GtkToolButton:backdrop:dir(rtl) > .button.titlebutton,
|
||||
.inline-toolbar .titlebar GtkToolButton:backdrop:dir(rtl) > .button.titlebutton,
|
||||
.titlebar .inline-toolbar GtkToolButton:backdrop:dir(rtl) > .button.titlebutton, .osd .button:dir(rtl):hover, .osd .button:dir(rtl):active, .osd .button:dir(rtl):checked, .osd .button:dir(rtl):insensitive, .osd .button:dir(rtl):backdrop, .osd .button.suggested-action:dir(rtl), .osd .button.destructive-action:dir(rtl), .inline-toolbar .button:dir(rtl), .linked > .button:dir(rtl), .header-bar .linked > .button.titlebutton:dir(rtl),
|
||||
.titlebar .linked > .button.titlebutton:dir(rtl), GtkComboBox.combobox-entry .entry:dir(rtl), GtkComboBox.combobox-entry .button:dir(rtl), .linked > GtkComboBox > .button:dir(rtl) {
|
||||
.titlebar .inline-toolbar GtkToolButton:backdrop:dir(rtl) > .button.titlebutton, .osd .button:dir(rtl):hover, .osd .button:dir(rtl):active, .osd .button:dir(rtl):checked, .osd .button:dir(rtl):insensitive, .osd .button:dir(rtl):backdrop, .osd .button.suggested-action:dir(rtl), .osd .button.destructive-action:dir(rtl), .inline-toolbar .button:dir(rtl), .linked > .button:dir(rtl), GtkComboBox.combobox-entry .entry:dir(rtl), GtkComboBox.combobox-entry .button:dir(rtl), .linked > GtkComboBox > .button:dir(rtl) {
|
||||
border-radius: 0;
|
||||
border-right-style: none;
|
||||
border-left-style: solid; }
|
||||
|
||||
.osd .button:first-child:hover, .osd .button:first-child:active, .osd .button:first-child:checked, .osd .button:first-child:insensitive, .osd .button:first-child:backdrop, .osd .button.suggested-action:first-child, .osd .button.destructive-action:first-child, .inline-toolbar .button:first-child, .linked > .button:first-child, .header-bar .linked > .button.titlebutton:first-child,
|
||||
.titlebar .linked > .button.titlebutton:first-child, .inline-toolbar.toolbar GtkToolButton:first-child > .button.flat, .inline-toolbar GtkToolButton:first-child > .button.flat, .inline-toolbar.search-bar GtkToolButton:first-child > .button.flat, .inline-toolbar.location-bar GtkToolButton:first-child > .button.flat, .inline-toolbar .header-bar GtkToolButton:first-child > .button.titlebutton, .header-bar .inline-toolbar GtkToolButton:first-child > .button.titlebutton,
|
||||
.osd .button:first-child:hover, .osd .button:first-child:active, .osd .button:first-child:checked, .osd .button:first-child:insensitive, .osd .button:first-child:backdrop, .osd .button.suggested-action:first-child, .osd .button.destructive-action:first-child, .inline-toolbar .button:first-child, .linked > .button:first-child, .inline-toolbar.toolbar GtkToolButton:first-child > .button.flat, .inline-toolbar GtkToolButton:first-child > .button.flat, .inline-toolbar.search-bar GtkToolButton:first-child > .button.flat, .inline-toolbar.location-bar GtkToolButton:first-child > .button.flat, .inline-toolbar .header-bar GtkToolButton:first-child > .button.titlebutton, .header-bar .inline-toolbar GtkToolButton:first-child > .button.titlebutton,
|
||||
.inline-toolbar .titlebar GtkToolButton:first-child > .button.titlebutton,
|
||||
.titlebar .inline-toolbar GtkToolButton:first-child > .button.titlebutton,
|
||||
.inline-toolbar.toolbar GtkToolButton:backdrop:first-child > .button.flat,
|
||||
@@ -1198,8 +1165,7 @@ GtkComboBox.combobox-entry .titlebar .button.titlebutton,
|
||||
.titlebar .inline-toolbar GtkToolButton:backdrop:first-child > .button.titlebutton, GtkComboBox.combobox-entry .entry:first-child, GtkComboBox.combobox-entry .button:first-child, .linked > GtkComboBox:first-child > .button {
|
||||
border-radius: 3px 0 0 3px;
|
||||
border-left-style: solid; }
|
||||
.osd .button:last-child:hover, .osd .button:last-child:active, .osd .button:last-child:checked, .osd .button:last-child:insensitive, .osd .button:last-child:backdrop, .osd .button.suggested-action:last-child, .osd .button.destructive-action:last-child, .inline-toolbar .button:last-child, .linked > .button:last-child, .header-bar .linked > .button.titlebutton:last-child,
|
||||
.titlebar .linked > .button.titlebutton:last-child, .inline-toolbar.toolbar GtkToolButton:last-child > .button.flat, .inline-toolbar GtkToolButton:last-child > .button.flat, .inline-toolbar.search-bar GtkToolButton:last-child > .button.flat, .inline-toolbar.location-bar GtkToolButton:last-child > .button.flat, .inline-toolbar .header-bar GtkToolButton:last-child > .button.titlebutton, .header-bar .inline-toolbar GtkToolButton:last-child > .button.titlebutton,
|
||||
.osd .button:last-child:hover, .osd .button:last-child:active, .osd .button:last-child:checked, .osd .button:last-child:insensitive, .osd .button:last-child:backdrop, .osd .button.suggested-action:last-child, .osd .button.destructive-action:last-child, .inline-toolbar .button:last-child, .linked > .button:last-child, .inline-toolbar.toolbar GtkToolButton:last-child > .button.flat, .inline-toolbar GtkToolButton:last-child > .button.flat, .inline-toolbar.search-bar GtkToolButton:last-child > .button.flat, .inline-toolbar.location-bar GtkToolButton:last-child > .button.flat, .inline-toolbar .header-bar GtkToolButton:last-child > .button.titlebutton, .header-bar .inline-toolbar GtkToolButton:last-child > .button.titlebutton,
|
||||
.inline-toolbar .titlebar GtkToolButton:last-child > .button.titlebutton,
|
||||
.titlebar .inline-toolbar GtkToolButton:last-child > .button.titlebutton,
|
||||
.inline-toolbar.toolbar GtkToolButton:backdrop:last-child > .button.flat,
|
||||
@@ -1211,8 +1177,7 @@ GtkComboBox.combobox-entry .titlebar .button.titlebutton,
|
||||
.inline-toolbar .titlebar GtkToolButton:backdrop:last-child > .button.titlebutton,
|
||||
.titlebar .inline-toolbar GtkToolButton:backdrop:last-child > .button.titlebutton, GtkComboBox.combobox-entry .entry:last-child, GtkComboBox.combobox-entry .button:last-child, .linked > GtkComboBox:last-child > .button {
|
||||
border-radius: 0 3px 3px 0; }
|
||||
.osd .button:last-child:dir(rtl):hover, .osd .button:last-child:dir(rtl):active, .osd .button:last-child:dir(rtl):checked, .osd .button:last-child:dir(rtl):insensitive, .osd .button:last-child:dir(rtl):backdrop, .osd .button.suggested-action:last-child:dir(rtl), .osd .button.destructive-action:last-child:dir(rtl), .inline-toolbar .button:last-child:dir(rtl), .linked > .button:last-child:dir(rtl), .header-bar .linked > .button.titlebutton:last-child:dir(rtl),
|
||||
.titlebar .linked > .button.titlebutton:last-child:dir(rtl), .inline-toolbar GtkToolButton:last-child > .button.flat:dir(rtl), .inline-toolbar .header-bar GtkToolButton:last-child > .button.titlebutton:dir(rtl), .header-bar .inline-toolbar GtkToolButton:last-child > .button.titlebutton:dir(rtl),
|
||||
.osd .button:last-child:dir(rtl):hover, .osd .button:last-child:dir(rtl):active, .osd .button:last-child:dir(rtl):checked, .osd .button:last-child:dir(rtl):insensitive, .osd .button:last-child:dir(rtl):backdrop, .osd .button.suggested-action:last-child:dir(rtl), .osd .button.destructive-action:last-child:dir(rtl), .inline-toolbar .button:last-child:dir(rtl), .linked > .button:last-child:dir(rtl), .inline-toolbar GtkToolButton:last-child > .button.flat:dir(rtl), .inline-toolbar .header-bar GtkToolButton:last-child > .button.titlebutton:dir(rtl), .header-bar .inline-toolbar GtkToolButton:last-child > .button.titlebutton:dir(rtl),
|
||||
.inline-toolbar .titlebar GtkToolButton:last-child > .button.titlebutton:dir(rtl),
|
||||
.titlebar .inline-toolbar GtkToolButton:last-child > .button.titlebutton:dir(rtl),
|
||||
.inline-toolbar GtkToolButton:backdrop:last-child > .button.flat:dir(rtl), .inline-toolbar.toolbar GtkToolButton:last-child:dir(rtl) > .button.flat, .inline-toolbar GtkToolButton:last-child:dir(rtl) > .button.flat, .inline-toolbar.search-bar GtkToolButton:last-child:dir(rtl) > .button.flat, .inline-toolbar.location-bar GtkToolButton:last-child:dir(rtl) > .button.flat, .inline-toolbar .header-bar GtkToolButton:last-child:dir(rtl) > .button.titlebutton, .header-bar .inline-toolbar GtkToolButton:last-child:dir(rtl) > .button.titlebutton,
|
||||
@@ -1227,8 +1192,7 @@ GtkComboBox.combobox-entry .titlebar .button.titlebutton,
|
||||
.inline-toolbar .titlebar GtkToolButton:backdrop:last-child:dir(rtl) > .button.titlebutton,
|
||||
.titlebar .inline-toolbar GtkToolButton:backdrop:last-child:dir(rtl) > .button.titlebutton, GtkComboBox.combobox-entry .entry:last-child:dir(rtl), GtkComboBox.combobox-entry .button:last-child:dir(rtl), .linked > GtkComboBox:last-child > .button:dir(rtl) {
|
||||
border-right-style: solid; }
|
||||
.osd .button:only-child:hover, .osd .button:only-child:active, .osd .button:only-child:checked, .osd .button:only-child:insensitive, .osd .button:only-child:backdrop, .osd .button.suggested-action:only-child, .osd .button.destructive-action:only-child, .inline-toolbar .button:only-child, .linked > .button:only-child, .header-bar .linked > .button.titlebutton:only-child,
|
||||
.titlebar .linked > .button.titlebutton:only-child, .inline-toolbar.toolbar GtkToolButton:only-child > .button.flat, .inline-toolbar GtkToolButton:only-child > .button.flat, .inline-toolbar.search-bar GtkToolButton:only-child > .button.flat, .inline-toolbar.location-bar GtkToolButton:only-child > .button.flat, .inline-toolbar .header-bar GtkToolButton:only-child > .button.titlebutton, .header-bar .inline-toolbar GtkToolButton:only-child > .button.titlebutton,
|
||||
.osd .button:only-child:hover, .osd .button:only-child:active, .osd .button:only-child:checked, .osd .button:only-child:insensitive, .osd .button:only-child:backdrop, .osd .button.suggested-action:only-child, .osd .button.destructive-action:only-child, .inline-toolbar .button:only-child, .linked > .button:only-child, .inline-toolbar.toolbar GtkToolButton:only-child > .button.flat, .inline-toolbar GtkToolButton:only-child > .button.flat, .inline-toolbar.search-bar GtkToolButton:only-child > .button.flat, .inline-toolbar.location-bar GtkToolButton:only-child > .button.flat, .inline-toolbar .header-bar GtkToolButton:only-child > .button.titlebutton, .header-bar .inline-toolbar GtkToolButton:only-child > .button.titlebutton,
|
||||
.inline-toolbar .titlebar GtkToolButton:only-child > .button.titlebutton,
|
||||
.titlebar .inline-toolbar GtkToolButton:only-child > .button.titlebutton,
|
||||
.inline-toolbar.toolbar GtkToolButton:backdrop:only-child > .button.flat,
|
||||
@@ -1242,24 +1206,20 @@ GtkComboBox.combobox-entry .titlebar .button.titlebutton,
|
||||
border-radius: 3px;
|
||||
border-style: solid; }
|
||||
|
||||
.linked.vertical > .entry, .linked.vertical > .entry:focus, .linked.vertical > .entry:insensitive, .linked.vertical > .entry:insensitive:backdrop, .linked.vertical > .entry:backdrop, .linked.vertical > .button, .header-bar .linked.vertical > .button.titlebutton,
|
||||
.titlebar .linked.vertical > .button.titlebutton, .linked.vertical > .button:hover, .linked.vertical > .button:active, .linked.vertical > .button:checked, .linked.vertical > .button:backdrop, .linked.vertical > GtkComboBoxText > .button,
|
||||
.linked.vertical > .entry, .linked.vertical > .entry:focus, .linked.vertical > .entry:insensitive, .linked.vertical > .entry:insensitive:backdrop, .linked.vertical > .entry:backdrop, .linked.vertical > .button, .linked.vertical > .button:hover, .linked.vertical > .button:active, .linked.vertical > .button:checked, .linked.vertical > .button:backdrop, .linked.vertical > GtkComboBoxText > .button,
|
||||
.linked.vertical > GtkComboBox > .button {
|
||||
border-left-style: solid;
|
||||
border-top-style: none;
|
||||
border-radius: 0; }
|
||||
|
||||
.linked.vertical > .entry:first-child, .linked.vertical > .button:first-child, .header-bar .linked.vertical > .button.titlebutton:first-child,
|
||||
.titlebar .linked.vertical > .button.titlebutton:first-child, .linked.vertical > GtkComboBoxText:first-child > .button,
|
||||
.linked.vertical > .entry:first-child, .linked.vertical > .button:first-child, .linked.vertical > GtkComboBoxText:first-child > .button,
|
||||
.linked.vertical > GtkComboBox:first-child > .button {
|
||||
border-style: solid;
|
||||
border-radius: 3px 3px 0 0; }
|
||||
.linked.vertical > .entry:last-child, .linked.vertical > .button:last-child, .header-bar .linked.vertical > .button.titlebutton:last-child,
|
||||
.titlebar .linked.vertical > .button.titlebutton:last-child, .linked.vertical > GtkComboBoxText:last-child > .button,
|
||||
.linked.vertical > .entry:last-child, .linked.vertical > .button:last-child, .linked.vertical > GtkComboBoxText:last-child > .button,
|
||||
.linked.vertical > GtkComboBox:last-child > .button {
|
||||
border-radius: 0 0 3px 3px; }
|
||||
.linked.vertical > .entry:only-child, .linked.vertical > .button:only-child, .header-bar .linked.vertical > .button.titlebutton:only-child,
|
||||
.titlebar .linked.vertical > .button.titlebutton:only-child, .linked.vertical > GtkComboBoxText:only-child > .button,
|
||||
.linked.vertical > .entry:only-child, .linked.vertical > .button:only-child, .linked.vertical > GtkComboBoxText:only-child > .button,
|
||||
.linked.vertical > GtkComboBox:only-child > .button {
|
||||
border-radius: 3px;
|
||||
border-style: solid; }
|
||||
@@ -1470,9 +1430,7 @@ GtkColorButton.button, .header-bar GtkColorButton.button.titlebutton,
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
|
||||
.spinbutton.vertical .button:first-child:insensitive > .label, .spinbutton.vertical .header-bar .button.titlebutton:first-child:insensitive > .label,
|
||||
.spinbutton.vertical .titlebar .button.titlebutton:first-child:insensitive > .label, .spinbutton.vertical:dir(rtl) .button:first-child:insensitive > .label, .spinbutton.vertical:dir(rtl) .header-bar .button.titlebutton:first-child:insensitive > .label,
|
||||
.spinbutton.vertical:dir(rtl) .titlebar .button.titlebutton:first-child:insensitive > .label {
|
||||
.spinbutton.vertical .button:first-child:insensitive > .label, .spinbutton.vertical:dir(rtl) .button:first-child:insensitive > .label {
|
||||
color: inherit; }
|
||||
.spinbutton.vertical .button:first-child:backdrop, .spinbutton.vertical:dir(rtl) .button:first-child:backdrop {
|
||||
color: #939695;
|
||||
@@ -1512,9 +1470,7 @@ GtkColorButton.button, .header-bar GtkColorButton.button.titlebutton,
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0.1); }
|
||||
.spinbutton.vertical .button:last-child:insensitive > .label, .spinbutton.vertical .header-bar .button.titlebutton:last-child:insensitive > .label,
|
||||
.spinbutton.vertical .titlebar .button.titlebutton:last-child:insensitive > .label, .spinbutton.vertical:dir(rtl) .button:last-child:insensitive > .label, .spinbutton.vertical:dir(rtl) .header-bar .button.titlebutton:last-child:insensitive > .label,
|
||||
.spinbutton.vertical:dir(rtl) .titlebar .button.titlebutton:last-child:insensitive > .label {
|
||||
.spinbutton.vertical .button:last-child:insensitive > .label, .spinbutton.vertical:dir(rtl) .button:last-child:insensitive > .label {
|
||||
color: inherit; }
|
||||
.spinbutton.vertical .button:last-child:backdrop, .spinbutton.vertical:dir(rtl) .button:last-child:backdrop {
|
||||
color: #939695;
|
||||
@@ -1530,9 +1486,7 @@ GtkColorButton.button, .header-bar GtkColorButton.button.titlebutton,
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0); }
|
||||
.spinbutton.vertical .button:backdrop:insensitive > .label, .spinbutton.vertical .header-bar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.spinbutton.vertical .titlebar .button.titlebutton:backdrop:insensitive > .label, .spinbutton.vertical:dir(rtl) .button:backdrop:insensitive > .label, .spinbutton.vertical:dir(rtl) .header-bar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.spinbutton.vertical:dir(rtl) .titlebar .button.titlebutton:backdrop:insensitive > .label {
|
||||
.spinbutton.vertical .button:backdrop:insensitive > .label, .spinbutton.vertical:dir(rtl) .button:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
.spinbutton.vertical.entry, .spinbutton.vertical:dir(rtl).entry {
|
||||
border-radius: 0;
|
||||
@@ -1739,13 +1693,11 @@ GtkComboBox {
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(43, 100, 160, 0);
|
||||
border-color: #0f2b48; }
|
||||
.titlebar.selection-mode .button:backdrop:insensitive > .label, .titlebar.selection-mode .header-bar .button.titlebutton:backdrop:insensitive > .label, .titlebar.selection-mode .button.flat:backdrop:insensitive > .label, .titlebar.selection-mode .header-bar .titlebutton.button:backdrop:insensitive > .label,
|
||||
.titlebar.selection-mode .button:backdrop:insensitive > .label, .titlebar.selection-mode .button.flat:backdrop:insensitive > .label,
|
||||
.titlebar.selection-mode .titlebutton.button:backdrop:insensitive > .label,
|
||||
.header-bar.selection-mode .button:backdrop:insensitive > .label,
|
||||
.header-bar.selection-mode .titlebar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.header-bar.selection-mode .button.flat:backdrop:insensitive > .label,
|
||||
.header-bar.selection-mode .titlebutton.button:backdrop:insensitive > .label,
|
||||
.header-bar.selection-mode .titlebar .titlebutton.button:backdrop:insensitive > .label {
|
||||
.header-bar.selection-mode .titlebutton.button:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
.titlebar.selection-mode .button:backdrop:insensitive:active, .titlebar.selection-mode .button:backdrop:insensitive:checked, .titlebar.selection-mode .button.flat:backdrop:insensitive:active,
|
||||
.titlebar.selection-mode .titlebutton.button:backdrop:insensitive:active, .titlebar.selection-mode .button.flat:backdrop:insensitive:checked,
|
||||
@@ -1761,19 +1713,15 @@ GtkComboBox {
|
||||
background-image: linear-gradient(to bottom, #1d4876);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(43, 100, 160, 0);
|
||||
border-color: #0f2b48; }
|
||||
.titlebar.selection-mode .button:backdrop:insensitive:active > .label, .titlebar.selection-mode .header-bar .button.titlebutton:backdrop:insensitive:active > .label, .titlebar.selection-mode .button:backdrop:insensitive:checked > .label, .titlebar.selection-mode .header-bar .button.titlebutton:backdrop:insensitive:checked > .label, .titlebar.selection-mode .button.flat:backdrop:insensitive:active > .label, .titlebar.selection-mode .header-bar .titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.titlebar.selection-mode .titlebutton.button:backdrop:insensitive:active > .label, .titlebar.selection-mode .button.flat:backdrop:insensitive:checked > .label, .titlebar.selection-mode .header-bar .titlebutton.button:backdrop:insensitive:checked > .label,
|
||||
.titlebar.selection-mode .button:backdrop:insensitive:active > .label, .titlebar.selection-mode .button:backdrop:insensitive:checked > .label, .titlebar.selection-mode .button.flat:backdrop:insensitive:active > .label,
|
||||
.titlebar.selection-mode .titlebutton.button:backdrop:insensitive:active > .label, .titlebar.selection-mode .button.flat:backdrop:insensitive:checked > .label,
|
||||
.titlebar.selection-mode .titlebutton.button:backdrop:insensitive:checked > .label,
|
||||
.header-bar.selection-mode .button:backdrop:insensitive:active > .label,
|
||||
.header-bar.selection-mode .titlebar .button.titlebutton:backdrop:insensitive:active > .label,
|
||||
.header-bar.selection-mode .button:backdrop:insensitive:checked > .label,
|
||||
.header-bar.selection-mode .titlebar .button.titlebutton:backdrop:insensitive:checked > .label,
|
||||
.header-bar.selection-mode .button.flat:backdrop:insensitive:active > .label,
|
||||
.header-bar.selection-mode .titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.header-bar.selection-mode .titlebar .titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.header-bar.selection-mode .button.flat:backdrop:insensitive:checked > .label,
|
||||
.header-bar.selection-mode .titlebutton.button:backdrop:insensitive:checked > .label,
|
||||
.header-bar.selection-mode .titlebar .titlebutton.button:backdrop:insensitive:checked > .label {
|
||||
.header-bar.selection-mode .titlebutton.button:backdrop:insensitive:checked > .label {
|
||||
color: inherit; }
|
||||
.titlebar.selection-mode .button.flat:backdrop,
|
||||
.titlebar.selection-mode .titlebutton.button:backdrop, .titlebar.selection-mode .button.flat:insensitive,
|
||||
@@ -1799,9 +1747,8 @@ GtkComboBox {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(43, 100, 160, 0.55); }
|
||||
.titlebar.selection-mode .button:insensitive > .label, .titlebar.selection-mode .header-bar .button.titlebutton:insensitive > .label,
|
||||
.header-bar.selection-mode .button:insensitive > .label,
|
||||
.header-bar.selection-mode .titlebar .button.titlebutton:insensitive > .label {
|
||||
.titlebar.selection-mode .button:insensitive > .label,
|
||||
.header-bar.selection-mode .button:insensitive > .label {
|
||||
color: inherit; }
|
||||
.titlebar.selection-mode .button:insensitive:active, .titlebar.selection-mode .button:insensitive:checked,
|
||||
.header-bar.selection-mode .button:insensitive:active,
|
||||
@@ -1810,11 +1757,9 @@ GtkComboBox {
|
||||
border-color: #0b1e33;
|
||||
background-image: linear-gradient(to bottom, #1b436f, #1d4876);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(43, 100, 160, 0.55); }
|
||||
.titlebar.selection-mode .button:insensitive:active > .label, .titlebar.selection-mode .header-bar .button.titlebutton:insensitive:active > .label, .titlebar.selection-mode .button:insensitive:checked > .label, .titlebar.selection-mode .header-bar .button.titlebutton:insensitive:checked > .label,
|
||||
.titlebar.selection-mode .button:insensitive:active > .label, .titlebar.selection-mode .button:insensitive:checked > .label,
|
||||
.header-bar.selection-mode .button:insensitive:active > .label,
|
||||
.header-bar.selection-mode .titlebar .button.titlebutton:insensitive:active > .label,
|
||||
.header-bar.selection-mode .button:insensitive:checked > .label,
|
||||
.header-bar.selection-mode .titlebar .button.titlebutton:insensitive:checked > .label {
|
||||
.header-bar.selection-mode .button:insensitive:checked > .label {
|
||||
color: inherit; }
|
||||
.titlebar.selection-mode .button.suggested-action,
|
||||
.header-bar.selection-mode .button.suggested-action {
|
||||
@@ -1855,9 +1800,8 @@ GtkComboBox {
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(43, 100, 160, 0.55);
|
||||
border-color: #0f2b48; }
|
||||
.titlebar.selection-mode .button.suggested-action:insensitive > .label, .titlebar.selection-mode .header-bar .suggested-action.button.titlebutton:insensitive > .label,
|
||||
.header-bar.selection-mode .button.suggested-action:insensitive > .label,
|
||||
.header-bar.selection-mode .titlebar .suggested-action.button.titlebutton:insensitive > .label {
|
||||
.titlebar.selection-mode .button.suggested-action:insensitive > .label,
|
||||
.header-bar.selection-mode .button.suggested-action:insensitive > .label {
|
||||
color: inherit; }
|
||||
.titlebar.selection-mode .button.suggested-action:backdrop,
|
||||
.header-bar.selection-mode .button.suggested-action:backdrop {
|
||||
@@ -1877,9 +1821,8 @@ GtkComboBox {
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(43, 100, 160, 0);
|
||||
border-color: #0f2b48; }
|
||||
.titlebar.selection-mode .button.suggested-action:backdrop:insensitive > .label, .titlebar.selection-mode .header-bar .suggested-action.button.titlebutton:backdrop:insensitive > .label,
|
||||
.header-bar.selection-mode .button.suggested-action:backdrop:insensitive > .label,
|
||||
.header-bar.selection-mode .titlebar .suggested-action.button.titlebutton:backdrop:insensitive > .label {
|
||||
.titlebar.selection-mode .button.suggested-action:backdrop:insensitive > .label,
|
||||
.header-bar.selection-mode .button.suggested-action:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
.titlebar.selection-mode .selection-menu, .titlebar.selection-mode .selection-menu:backdrop,
|
||||
.header-bar.selection-mode .selection-menu,
|
||||
@@ -3623,8 +3566,7 @@ GtkPlacesSidebar.sidebar .view .separator:backdrop {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
|
||||
.list-row:selected .button:backdrop:insensitive > .label, .list-row:selected .header-bar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.list-row:selected .titlebar .button.titlebutton:backdrop:insensitive > .label, .list-row:selected .button.flat:backdrop:insensitive > .label, .list-row:selected .header-bar .titlebutton.button:backdrop:insensitive > .label, .header-bar .list-row:selected .titlebutton.button:backdrop:insensitive > .label,
|
||||
.list-row:selected .button:backdrop:insensitive > .label, .list-row:selected .button.flat:backdrop:insensitive > .label, .list-row:selected .header-bar .titlebutton.button:backdrop:insensitive > .label, .header-bar .list-row:selected .titlebutton.button:backdrop:insensitive > .label,
|
||||
.list-row:selected .titlebar .titlebutton.button:backdrop:insensitive > .label,
|
||||
.titlebar .list-row:selected .titlebutton.button:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
@@ -3637,9 +3579,7 @@ GtkPlacesSidebar.sidebar .view .separator:backdrop {
|
||||
border-color: #1e2222;
|
||||
background-image: linear-gradient(to bottom, #262929);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
|
||||
.list-row:selected .button:backdrop:insensitive:active > .label, .list-row:selected .header-bar .button.titlebutton:backdrop:insensitive:active > .label,
|
||||
.list-row:selected .titlebar .button.titlebutton:backdrop:insensitive:active > .label, .list-row:selected .button:backdrop:insensitive:checked > .label, .list-row:selected .header-bar .button.titlebutton:backdrop:insensitive:checked > .label,
|
||||
.list-row:selected .titlebar .button.titlebutton:backdrop:insensitive:checked > .label, .list-row:selected .button.flat:backdrop:insensitive:active > .label, .list-row:selected .header-bar .titlebutton.button:backdrop:insensitive:active > .label, .header-bar .list-row:selected .titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.list-row:selected .button:backdrop:insensitive:active > .label, .list-row:selected .button:backdrop:insensitive:checked > .label, .list-row:selected .button.flat:backdrop:insensitive:active > .label, .list-row:selected .header-bar .titlebutton.button:backdrop:insensitive:active > .label, .header-bar .list-row:selected .titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.list-row:selected .titlebar .titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.titlebar .list-row:selected .titlebutton.button:backdrop:insensitive:active > .label, .list-row:selected .button.flat:backdrop:insensitive:checked > .label, .list-row:selected .header-bar .titlebutton.button:backdrop:insensitive:checked > .label, .header-bar .list-row:selected .titlebutton.button:backdrop:insensitive:checked > .label,
|
||||
.list-row:selected .titlebar .titlebutton.button:backdrop:insensitive:checked > .label,
|
||||
@@ -3662,17 +3602,14 @@ GtkPlacesSidebar.sidebar .view .separator:backdrop {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
|
||||
.list-row:selected .button:insensitive > .label, .list-row:selected .header-bar .button.titlebutton:insensitive > .label,
|
||||
.list-row:selected .titlebar .button.titlebutton:insensitive > .label {
|
||||
.list-row:selected .button:insensitive > .label {
|
||||
color: inherit; }
|
||||
.list-row:selected .button:insensitive:active, .list-row:selected .button:insensitive:checked {
|
||||
color: #939695;
|
||||
border-color: #1c1f1f;
|
||||
background-image: linear-gradient(to bottom, #2f3333, #323636);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
|
||||
.list-row:selected .button:insensitive:active > .label, .list-row:selected .header-bar .button.titlebutton:insensitive:active > .label,
|
||||
.list-row:selected .titlebar .button.titlebutton:insensitive:active > .label, .list-row:selected .button:insensitive:checked > .label, .list-row:selected .header-bar .button.titlebutton:insensitive:checked > .label,
|
||||
.list-row:selected .titlebar .button.titlebutton:insensitive:checked > .label {
|
||||
.list-row:selected .button:insensitive:active > .label, .list-row:selected .button:insensitive:checked > .label {
|
||||
color: inherit; }
|
||||
|
||||
.list-row, list-row.button, .header-bar list-row.button.titlebutton,
|
||||
@@ -3846,8 +3783,7 @@ GtkCalendar {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
|
||||
.message-dialog.csd .dialog-action-area .button:insensitive > .label, .message-dialog.csd .dialog-action-area .header-bar .button.titlebutton:insensitive > .label,
|
||||
.message-dialog.csd .dialog-action-area .titlebar .button.titlebutton:insensitive > .label {
|
||||
.message-dialog.csd .dialog-action-area .button:insensitive > .label {
|
||||
color: inherit; }
|
||||
.message-dialog.csd .dialog-action-area .button:backdrop {
|
||||
color: #939695;
|
||||
@@ -3863,8 +3799,7 @@ GtkCalendar {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
|
||||
.message-dialog.csd .dialog-action-area .button:backdrop:insensitive > .label, .message-dialog.csd .dialog-action-area .header-bar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.message-dialog.csd .dialog-action-area .titlebar .button.titlebutton:backdrop:insensitive > .label {
|
||||
.message-dialog.csd .dialog-action-area .button:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
.message-dialog.csd .dialog-action-area .button.suggested-action {
|
||||
color: white;
|
||||
@@ -3904,8 +3839,7 @@ GtkCalendar {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
|
||||
.message-dialog.csd .dialog-action-area .button.suggested-action:backdrop:insensitive > .label, .message-dialog.csd .dialog-action-area .header-bar .suggested-action.button.titlebutton:backdrop:insensitive > .label,
|
||||
.message-dialog.csd .dialog-action-area .titlebar .suggested-action.button.titlebutton:backdrop:insensitive > .label {
|
||||
.message-dialog.csd .dialog-action-area .button.suggested-action:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
.message-dialog.csd .dialog-action-area .button.suggested-action:insensitive {
|
||||
color: #939695;
|
||||
@@ -3914,8 +3848,7 @@ GtkCalendar {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
|
||||
.message-dialog.csd .dialog-action-area .button.suggested-action:insensitive > .label, .message-dialog.csd .dialog-action-area .header-bar .suggested-action.button.titlebutton:insensitive > .label,
|
||||
.message-dialog.csd .dialog-action-area .titlebar .suggested-action.button.titlebutton:insensitive > .label {
|
||||
.message-dialog.csd .dialog-action-area .button.suggested-action:insensitive > .label {
|
||||
color: inherit; }
|
||||
.message-dialog.csd .dialog-action-area .button.destructive-action {
|
||||
color: white;
|
||||
@@ -3955,8 +3888,7 @@ GtkCalendar {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
|
||||
.message-dialog.csd .dialog-action-area .button.destructive-action:backdrop:insensitive > .label, .message-dialog.csd .dialog-action-area .header-bar .destructive-action.button.titlebutton:backdrop:insensitive > .label,
|
||||
.message-dialog.csd .dialog-action-area .titlebar .destructive-action.button.titlebutton:backdrop:insensitive > .label {
|
||||
.message-dialog.csd .dialog-action-area .button.destructive-action:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
.message-dialog.csd .dialog-action-area .button.destructive-action:insensitive {
|
||||
color: #939695;
|
||||
@@ -3965,8 +3897,7 @@ GtkCalendar {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
|
||||
.message-dialog.csd .dialog-action-area .button.destructive-action:insensitive > .label, .message-dialog.csd .dialog-action-area .header-bar .destructive-action.button.titlebutton:insensitive > .label,
|
||||
.message-dialog.csd .dialog-action-area .titlebar .destructive-action.button.titlebutton:insensitive > .label {
|
||||
.message-dialog.csd .dialog-action-area .button.destructive-action:insensitive > .label {
|
||||
color: inherit; }
|
||||
.message-dialog.csd .dialog-action-area .button, .message-dialog.csd .dialog-action-area .button:hover, .message-dialog.csd .dialog-action-area .button:active, .message-dialog.csd .dialog-action-area .button:insensitive, .message-dialog.csd .dialog-action-area .button:backdrop, .message-dialog.csd .dialog-action-area .button:backdrop:insensitive, .message-dialog.csd .dialog-action-area .button.suggested-action, .message-dialog.csd .dialog-action-area .button.suggested-action:hover, .message-dialog.csd .dialog-action-area .button.suggested-action:active, .message-dialog.csd .dialog-action-area .button.suggested-action:backdrop, .message-dialog.csd .dialog-action-area .button.suggested-action:backdrop:insensitive, .message-dialog.csd .dialog-action-area .button.suggested-action:insensitive, .message-dialog.csd .dialog-action-area .button.destructive-action, .message-dialog.csd .dialog-action-area .button.destructive-action:hover, .message-dialog.csd .dialog-action-area .button.destructive-action:active, .message-dialog.csd .dialog-action-area .button.destructive-action:backdrop, .message-dialog.csd .dialog-action-area .button.destructive-action:backdrop:insensitive, .message-dialog.csd .dialog-action-area .button.destructive-action:insensitive {
|
||||
border-left-style: solid;
|
||||
@@ -4120,17 +4051,10 @@ GtkInfoBar {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
|
||||
.info .button:insensitive > .label, .info .header-bar .button.titlebutton:insensitive > .label,
|
||||
.info .titlebar .button.titlebutton:insensitive > .label,
|
||||
.info .button:insensitive > .label,
|
||||
.question .button:insensitive > .label,
|
||||
.question .header-bar .button.titlebutton:insensitive > .label,
|
||||
.question .titlebar .button.titlebutton:insensitive > .label,
|
||||
.warning .button:insensitive > .label,
|
||||
.warning .header-bar .button.titlebutton:insensitive > .label,
|
||||
.warning .titlebar .button.titlebutton:insensitive > .label,
|
||||
.error .button:insensitive > .label,
|
||||
.error .header-bar .button.titlebutton:insensitive > .label,
|
||||
.error .titlebar .button.titlebutton:insensitive > .label {
|
||||
.error .button:insensitive > .label {
|
||||
color: inherit; }
|
||||
.info .button:backdrop,
|
||||
.question .button:backdrop,
|
||||
@@ -4154,17 +4078,10 @@ GtkInfoBar {
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0);
|
||||
border-color: #0b1e33; }
|
||||
.info .button:backdrop:insensitive > .label, .info .header-bar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.info .titlebar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.info .button:backdrop:insensitive > .label,
|
||||
.question .button:backdrop:insensitive > .label,
|
||||
.question .header-bar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.question .titlebar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.warning .button:backdrop:insensitive > .label,
|
||||
.warning .header-bar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.warning .titlebar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.error .button:backdrop:insensitive > .label,
|
||||
.error .header-bar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.error .titlebar .button.titlebutton:backdrop:insensitive > .label {
|
||||
.error .button:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
.info .label:selected,
|
||||
.info .label:selected:focus,
|
||||
@@ -4328,12 +4245,6 @@ GtkVolumeButton.button, .header-bar GtkVolumeButton.button.titlebutton,
|
||||
.window-frame.csd.message-dialog {
|
||||
border-radius: 7px;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(28, 31, 31, 0.8); }
|
||||
.window-frame.solid-csd {
|
||||
border-radius: 0;
|
||||
margin: 4px;
|
||||
background-color: #393f3f;
|
||||
border: solid 1px #1e2222;
|
||||
box-shadow: none; }
|
||||
|
||||
.header-bar .titlebutton.button,
|
||||
.titlebar .titlebutton.button {
|
||||
@@ -4357,7 +4268,8 @@ GtkVolumeButton.button, .header-bar GtkVolumeButton.button.titlebutton,
|
||||
color: #ffffff; }
|
||||
.view:backdrop:selected, GtkCalendar:backdrop:selected, .label:backdrop:selected, .grid-child:backdrop:selected, .entry:backdrop:selected, .menuitem.button.flat:backdrop:selected, .header-bar .menuitem.titlebutton.button:backdrop:selected,
|
||||
.titlebar .menuitem.titlebutton.button:backdrop:selected, .list-row:backdrop:selected, .sidebar:backdrop:selected, GtkPlacesSidebar.sidebar .view:backdrop:selected, GtkPlacesSidebar.sidebar GtkCalendar:backdrop:selected {
|
||||
color: #ffffff; }
|
||||
color: #ffffff;
|
||||
background-color: #5e5e5e; }
|
||||
|
||||
/* Decouple the font of context menus from their entry/textview */
|
||||
.touch-selection,
|
||||
|
||||
@@ -178,7 +178,7 @@ GtkTextView {
|
||||
.entry:focus {
|
||||
background-color: transparent;
|
||||
background-image: linear-gradient(to bottom, #f7f7f7, #ffffff 90%);
|
||||
box-shadow: inset 0 3px rgba(0, 0, 0, 0.02), inset 0 2px rgba(0, 0, 0, 0.03), inset 0 1px rgba(0, 0, 0, 0.08), inset 0 0 0 1px #4a90d9, 0 1px white;
|
||||
box-shadow: inset 0 3px rgba(0, 0, 0, 0.02), inset 0 2px rgba(0, 0, 0, 0.03), inset 0 1px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(74, 144, 217, 0.15), 0 1px white;
|
||||
border-color: #4a90d9; }
|
||||
.entry:insensitive {
|
||||
background-color: transparent;
|
||||
@@ -231,7 +231,7 @@ GtkTextView {
|
||||
.entry.error:focus {
|
||||
background-color: transparent;
|
||||
background-image: linear-gradient(to bottom, #f7f7f7, #ffffff 90%);
|
||||
box-shadow: inset 0 3px rgba(0, 0, 0, 0.02), inset 0 2px rgba(0, 0, 0, 0.03), inset 0 1px rgba(0, 0, 0, 0.08), inset 0 0 0 1px #cc0000, 0 1px white;
|
||||
box-shadow: inset 0 3px rgba(0, 0, 0, 0.02), inset 0 2px rgba(0, 0, 0, 0.03), inset 0 1px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(204, 0, 0, 0.15), 0 1px white;
|
||||
border-color: #cc0000; }
|
||||
.entry.error:selected, .entry.error:selected:focus {
|
||||
background-color: #cc0000; }
|
||||
@@ -241,7 +241,7 @@ GtkTextView {
|
||||
.entry.warning:focus {
|
||||
background-color: transparent;
|
||||
background-image: linear-gradient(to bottom, #f7f7f7, #ffffff 90%);
|
||||
box-shadow: inset 0 3px rgba(0, 0, 0, 0.02), inset 0 2px rgba(0, 0, 0, 0.03), inset 0 1px rgba(0, 0, 0, 0.08), inset 0 0 0 1px #f57900, 0 1px white;
|
||||
box-shadow: inset 0 3px rgba(0, 0, 0, 0.02), inset 0 2px rgba(0, 0, 0, 0.03), inset 0 1px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(245, 121, 0, 0.15), 0 1px white;
|
||||
border-color: #f57900; }
|
||||
.entry.warning:selected, .entry.warning:selected:focus {
|
||||
background-color: #f57900; }
|
||||
@@ -264,7 +264,7 @@ GtkTextView {
|
||||
box-shadow: none; }
|
||||
.linked.vertical > .entry:focus {
|
||||
border-color: #4a90d9;
|
||||
box-shadow: inset 0 0 0 1px #4a90d9, 0 -1px 0 0 #4a90d9; }
|
||||
box-shadow: inset 0 0 0 1px rgba(74, 144, 217, 0.15), 0 -1px 0 0 #4a90d9; }
|
||||
.linked.vertical > .entry:insensitive {
|
||||
background-color: transparent;
|
||||
background-image: linear-gradient(to bottom, #f7f7f7, #ffffff 90%);
|
||||
@@ -299,7 +299,7 @@ GtkTextView {
|
||||
.linked.vertical > .entry:first-child:focus {
|
||||
background-color: transparent;
|
||||
background-image: linear-gradient(to bottom, #f7f7f7, #ffffff 90%);
|
||||
box-shadow: inset 0 3px rgba(0, 0, 0, 0.02), inset 0 2px rgba(0, 0, 0, 0.03), inset 0 1px rgba(0, 0, 0, 0.08), inset 0 0 0 1px #4a90d9;
|
||||
box-shadow: inset 0 3px rgba(0, 0, 0, 0.02), inset 0 2px rgba(0, 0, 0, 0.03), inset 0 1px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(74, 144, 217, 0.15);
|
||||
border-color: #4a90d9; }
|
||||
.linked.vertical > .entry:first-child:insensitive {
|
||||
background-color: transparent;
|
||||
@@ -336,7 +336,7 @@ GtkTextView {
|
||||
box-shadow: 0 1px white; }
|
||||
.linked.vertical > .entry:last-child:focus {
|
||||
border-color: #4a90d9;
|
||||
box-shadow: inset 0 0 0 1px #4a90d9, 0 -1px 0 0 #4a90d9, 0 1px white; }
|
||||
box-shadow: inset 0 0 0 1px rgba(74, 144, 217, 0.15), 0 -1px 0 0 #4a90d9, 0 1px white; }
|
||||
.linked.vertical > .entry:last-child:insensitive {
|
||||
background-color: transparent;
|
||||
background-image: linear-gradient(to bottom, #f7f7f7, #ffffff 90%);
|
||||
@@ -375,7 +375,7 @@ GtkTextView {
|
||||
border-color: #4a90d9;
|
||||
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5));
|
||||
background-clip: padding-box;
|
||||
box-shadow: inset 0 0 0 1px #4a90d9;
|
||||
box-shadow: inset 0 0 0 1px rgba(74, 144, 217, 0.15);
|
||||
text-shadow: 0 1px black;
|
||||
icon-shadow: 0 1px black; }
|
||||
.osd .entry:backdrop {
|
||||
@@ -482,8 +482,7 @@ GtkTextView {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
|
||||
.button:backdrop:insensitive > .label, .header-bar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.titlebar .button.titlebutton:backdrop:insensitive > .label, .button.flat:backdrop:insensitive > .label, .header-bar .titlebutton.button:backdrop:insensitive > .label,
|
||||
.button:backdrop:insensitive > .label, .button.flat:backdrop:insensitive > .label, .header-bar .titlebutton.button:backdrop:insensitive > .label,
|
||||
.titlebar .titlebutton.button:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
.button:backdrop:insensitive:active, .button:backdrop:insensitive:checked, .button.flat:backdrop:insensitive:active, .header-bar .titlebutton.button:backdrop:insensitive:active,
|
||||
@@ -493,9 +492,7 @@ GtkTextView {
|
||||
border-color: #a8a8a8;
|
||||
background-image: linear-gradient(to bottom, #e7e7e7);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
|
||||
.button:backdrop:insensitive:active > .label, .header-bar .button.titlebutton:backdrop:insensitive:active > .label,
|
||||
.titlebar .button.titlebutton:backdrop:insensitive:active > .label, .button:backdrop:insensitive:checked > .label, .header-bar .button.titlebutton:backdrop:insensitive:checked > .label,
|
||||
.titlebar .button.titlebutton:backdrop:insensitive:checked > .label, .button.flat:backdrop:insensitive:active > .label, .header-bar .titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.button:backdrop:insensitive:active > .label, .button:backdrop:insensitive:checked > .label, .button.flat:backdrop:insensitive:active > .label, .header-bar .titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.titlebar .titlebutton.button:backdrop:insensitive:active > .label, .button.flat:backdrop:insensitive:checked > .label, .header-bar .titlebutton.button:backdrop:insensitive:checked > .label,
|
||||
.titlebar .titlebutton.button:backdrop:insensitive:checked > .label {
|
||||
color: inherit; }
|
||||
@@ -517,17 +514,14 @@ GtkTextView {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px white; }
|
||||
.button:insensitive > .label, .header-bar .button.titlebutton:insensitive > .label,
|
||||
.titlebar .button.titlebutton:insensitive > .label {
|
||||
.button:insensitive > .label {
|
||||
color: inherit; }
|
||||
.button:insensitive:active, .button:insensitive:checked {
|
||||
color: #8d9091;
|
||||
border-color: #a1a1a1;
|
||||
background-image: linear-gradient(to bottom, #ebebeb, #f4f4f4);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px white; }
|
||||
.button:insensitive:active > .label, .header-bar .button.titlebutton:insensitive:active > .label,
|
||||
.titlebar .button.titlebutton:insensitive:active > .label, .button:insensitive:checked > .label, .header-bar .button.titlebutton:insensitive:checked > .label,
|
||||
.titlebar .button.titlebutton:insensitive:checked > .label {
|
||||
.button:insensitive:active > .label, .button:insensitive:checked > .label {
|
||||
color: inherit; }
|
||||
.button.osd, .header-bar .osd.button.titlebutton,
|
||||
.titlebar .osd.button.titlebutton {
|
||||
@@ -769,8 +763,7 @@ GtkTextView {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
|
||||
.button.suggested-action:backdrop:insensitive > .label, .header-bar .suggested-action.button.titlebutton:backdrop:insensitive > .label,
|
||||
.titlebar .suggested-action.button.titlebutton:backdrop:insensitive > .label, .button.suggested-action.flat:backdrop:insensitive > .label, .header-bar .suggested-action.titlebutton.button:backdrop:insensitive > .label,
|
||||
.button.suggested-action:backdrop:insensitive > .label, .button.suggested-action.flat:backdrop:insensitive > .label, .header-bar .suggested-action.titlebutton.button:backdrop:insensitive > .label,
|
||||
.titlebar .suggested-action.titlebutton.button:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
.button.suggested-action:backdrop:insensitive:active, .button.suggested-action:backdrop:insensitive:checked, .button.suggested-action.flat:backdrop:insensitive:active, .header-bar .suggested-action.titlebutton.button:backdrop:insensitive:active,
|
||||
@@ -780,9 +773,7 @@ GtkTextView {
|
||||
border-color: #5093da;
|
||||
background-image: linear-gradient(to bottom, #5093da);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
|
||||
.button.suggested-action:backdrop:insensitive:active > .label, .header-bar .suggested-action.button.titlebutton:backdrop:insensitive:active > .label,
|
||||
.titlebar .suggested-action.button.titlebutton:backdrop:insensitive:active > .label, .button.suggested-action:backdrop:insensitive:checked > .label, .header-bar .suggested-action.button.titlebutton:backdrop:insensitive:checked > .label,
|
||||
.titlebar .suggested-action.button.titlebutton:backdrop:insensitive:checked > .label, .button.suggested-action.flat:backdrop:insensitive:active > .label, .header-bar .suggested-action.titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.button.suggested-action:backdrop:insensitive:active > .label, .button.suggested-action:backdrop:insensitive:checked > .label, .button.suggested-action.flat:backdrop:insensitive:active > .label, .header-bar .suggested-action.titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.titlebar .suggested-action.titlebutton.button:backdrop:insensitive:active > .label, .button.suggested-action.flat:backdrop:insensitive:checked > .label, .header-bar .suggested-action.titlebutton.button:backdrop:insensitive:checked > .label,
|
||||
.titlebar .suggested-action.titlebutton.button:backdrop:insensitive:checked > .label {
|
||||
color: inherit; }
|
||||
@@ -804,17 +795,14 @@ GtkTextView {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px white; }
|
||||
.button.suggested-action:insensitive > .label, .header-bar .suggested-action.button.titlebutton:insensitive > .label,
|
||||
.titlebar .suggested-action.button.titlebutton:insensitive > .label {
|
||||
.button.suggested-action:insensitive > .label {
|
||||
color: inherit; }
|
||||
.button.suggested-action:insensitive:active, .button.suggested-action:insensitive:checked {
|
||||
color: #b9d3f0;
|
||||
border-color: #1c5187;
|
||||
background-image: linear-gradient(to bottom, #4a8cd1, #5093da);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px white; }
|
||||
.button.suggested-action:insensitive:active > .label, .header-bar .suggested-action.button.titlebutton:insensitive:active > .label,
|
||||
.titlebar .suggested-action.button.titlebutton:insensitive:active > .label, .button.suggested-action:insensitive:checked > .label, .header-bar .suggested-action.button.titlebutton:insensitive:checked > .label,
|
||||
.titlebar .suggested-action.button.titlebutton:insensitive:checked > .label {
|
||||
.button.suggested-action:insensitive:active > .label, .button.suggested-action:insensitive:checked > .label {
|
||||
color: inherit; }
|
||||
.osd .button.suggested-action {
|
||||
color: #eeeeec;
|
||||
@@ -916,8 +904,7 @@ GtkTextView {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
|
||||
.button.destructive-action:backdrop:insensitive > .label, .header-bar .destructive-action.button.titlebutton:backdrop:insensitive > .label,
|
||||
.titlebar .destructive-action.button.titlebutton:backdrop:insensitive > .label, .button.destructive-action.flat:backdrop:insensitive > .label, .header-bar .destructive-action.titlebutton.button:backdrop:insensitive > .label,
|
||||
.button.destructive-action:backdrop:insensitive > .label, .button.destructive-action.flat:backdrop:insensitive > .label, .header-bar .destructive-action.titlebutton.button:backdrop:insensitive > .label,
|
||||
.titlebar .destructive-action.titlebutton.button:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
.button.destructive-action:backdrop:insensitive:active, .button.destructive-action:backdrop:insensitive:checked, .button.destructive-action.flat:backdrop:insensitive:active, .header-bar .destructive-action.titlebutton.button:backdrop:insensitive:active,
|
||||
@@ -927,9 +914,7 @@ GtkTextView {
|
||||
border-color: #ef3131;
|
||||
background-image: linear-gradient(to bottom, #ef3131);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
|
||||
.button.destructive-action:backdrop:insensitive:active > .label, .header-bar .destructive-action.button.titlebutton:backdrop:insensitive:active > .label,
|
||||
.titlebar .destructive-action.button.titlebutton:backdrop:insensitive:active > .label, .button.destructive-action:backdrop:insensitive:checked > .label, .header-bar .destructive-action.button.titlebutton:backdrop:insensitive:checked > .label,
|
||||
.titlebar .destructive-action.button.titlebutton:backdrop:insensitive:checked > .label, .button.destructive-action.flat:backdrop:insensitive:active > .label, .header-bar .destructive-action.titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.button.destructive-action:backdrop:insensitive:active > .label, .button.destructive-action:backdrop:insensitive:checked > .label, .button.destructive-action.flat:backdrop:insensitive:active > .label, .header-bar .destructive-action.titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.titlebar .destructive-action.titlebutton.button:backdrop:insensitive:active > .label, .button.destructive-action.flat:backdrop:insensitive:checked > .label, .header-bar .destructive-action.titlebutton.button:backdrop:insensitive:checked > .label,
|
||||
.titlebar .destructive-action.titlebutton.button:backdrop:insensitive:checked > .label {
|
||||
color: inherit; }
|
||||
@@ -951,17 +936,14 @@ GtkTextView {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px white; }
|
||||
.button.destructive-action:insensitive > .label, .header-bar .destructive-action.button.titlebutton:insensitive > .label,
|
||||
.titlebar .destructive-action.button.titlebutton:insensitive > .label {
|
||||
.button.destructive-action:insensitive > .label {
|
||||
color: inherit; }
|
||||
.button.destructive-action:insensitive:active, .button.destructive-action:insensitive:checked {
|
||||
color: #f8acac;
|
||||
border-color: #8e0b0b;
|
||||
background-image: linear-gradient(to bottom, #e52d2d, #ef3131);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px white; }
|
||||
.button.destructive-action:insensitive:active > .label, .header-bar .destructive-action.button.titlebutton:insensitive:active > .label,
|
||||
.titlebar .destructive-action.button.titlebutton:insensitive:active > .label, .button.destructive-action:insensitive:checked > .label, .header-bar .destructive-action.button.titlebutton:insensitive:checked > .label,
|
||||
.titlebar .destructive-action.button.titlebutton:insensitive:checked > .label {
|
||||
.button.destructive-action:insensitive:active > .label, .button.destructive-action:insensitive:checked > .label {
|
||||
color: inherit; }
|
||||
.osd .button.destructive-action {
|
||||
color: #eeeeec;
|
||||
@@ -1034,8 +1016,7 @@ GtkTextView {
|
||||
padding-right: 6px;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px; }
|
||||
.stack-switcher > .button.text-button, .header-bar .stack-switcher > .text-button.button.titlebutton,
|
||||
.titlebar .stack-switcher > .text-button.button.titlebutton {
|
||||
.stack-switcher > .button.text-button {
|
||||
padding: 5px 10px 6px; }
|
||||
.stack-switcher > .button.image-button, .header-bar .stack-switcher > .titlebutton.button,
|
||||
.titlebar .stack-switcher > .titlebutton.button {
|
||||
@@ -1074,8 +1055,7 @@ GtkTextView {
|
||||
text-shadow: 0 1px rgba(255, 255, 255, 0.76923);
|
||||
icon-shadow: 0 1px rgba(255, 255, 255, 0.76923);
|
||||
box-shadow: inset 0 1px white, 0 1px white; }
|
||||
.inline-toolbar GtkToolButton > .button:hover, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:hover,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:hover {
|
||||
.inline-toolbar GtkToolButton > .button:hover {
|
||||
color: #2e3436;
|
||||
outline-color: rgba(46, 52, 54, 0.3);
|
||||
border-color: #a1a1a1;
|
||||
@@ -1083,9 +1063,7 @@ GtkTextView {
|
||||
text-shadow: 0 1px rgba(255, 255, 255, 0.76923);
|
||||
icon-shadow: 0 1px rgba(255, 255, 255, 0.76923);
|
||||
box-shadow: inset 0 1px white, 0 1px white; }
|
||||
.inline-toolbar GtkToolButton > .button:active, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:active,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:active, .inline-toolbar GtkToolButton > .button:checked, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:checked,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:checked {
|
||||
.inline-toolbar GtkToolButton > .button:active, .inline-toolbar GtkToolButton > .button:checked {
|
||||
color: #2e3436;
|
||||
outline-color: rgba(46, 52, 54, 0.3);
|
||||
border-color: #a1a1a1;
|
||||
@@ -1093,8 +1071,7 @@ GtkTextView {
|
||||
text-shadow: 0 1px rgba(255, 255, 255, 0.76923);
|
||||
icon-shadow: 0 1px rgba(255, 255, 255, 0.76923);
|
||||
box-shadow: inset 0 1px rgba(0, 0, 0, 0.07), inset 0 2px 1px -2px rgba(0, 0, 0, 0.6), 0 1px white; }
|
||||
.inline-toolbar GtkToolButton > .button:insensitive, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:insensitive,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:insensitive {
|
||||
.inline-toolbar GtkToolButton > .button:insensitive {
|
||||
color: #8d9091;
|
||||
border-color: #a1a1a1;
|
||||
background-image: linear-gradient(to bottom, #f4f4f4);
|
||||
@@ -1103,32 +1080,26 @@ GtkTextView {
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px white; }
|
||||
.inline-toolbar GtkToolButton > .button:insensitive > .label {
|
||||
color: inherit; }
|
||||
.inline-toolbar GtkToolButton > .button:insensitive:active, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:insensitive:active,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:insensitive:active, .inline-toolbar GtkToolButton > .button:insensitive:checked, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:insensitive:checked,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:insensitive:checked {
|
||||
.inline-toolbar GtkToolButton > .button:insensitive:active, .inline-toolbar GtkToolButton > .button:insensitive:checked {
|
||||
color: #8d9091;
|
||||
border-color: #a1a1a1;
|
||||
background-image: linear-gradient(to bottom, #ebebeb, #f4f4f4);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px white; }
|
||||
.inline-toolbar GtkToolButton > .button:insensitive:active > .label, .inline-toolbar GtkToolButton > .button:insensitive:checked > .label {
|
||||
color: inherit; }
|
||||
.inline-toolbar GtkToolButton > .button:backdrop, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:backdrop,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:backdrop {
|
||||
.inline-toolbar GtkToolButton > .button:backdrop {
|
||||
color: #8d9091;
|
||||
border-color: #a8a8a8;
|
||||
background-image: linear-gradient(to bottom, #ededed);
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
|
||||
.inline-toolbar GtkToolButton > .button:backdrop:active, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:backdrop:active,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:backdrop:active, .inline-toolbar GtkToolButton > .button:backdrop:checked, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:backdrop:checked,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:backdrop:checked {
|
||||
.inline-toolbar GtkToolButton > .button:backdrop:active, .inline-toolbar GtkToolButton > .button:backdrop:checked {
|
||||
color: #8d9091;
|
||||
border-color: #a8a8a8;
|
||||
background-image: linear-gradient(to bottom, #d4d4d4);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
|
||||
.inline-toolbar GtkToolButton > .button:backdrop:insensitive, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:backdrop:insensitive,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:backdrop:insensitive {
|
||||
.inline-toolbar GtkToolButton > .button:backdrop:insensitive {
|
||||
color: #c7c7c7;
|
||||
border-color: #a8a8a8;
|
||||
background-image: linear-gradient(to bottom, #f4f4f4);
|
||||
@@ -1137,9 +1108,7 @@ GtkTextView {
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
|
||||
.inline-toolbar GtkToolButton > .button:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
.inline-toolbar GtkToolButton > .button:backdrop:insensitive:active, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:backdrop:insensitive:active,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:backdrop:insensitive:active, .inline-toolbar GtkToolButton > .button:backdrop:insensitive:checked, .inline-toolbar .header-bar GtkToolButton > .button.titlebutton:backdrop:insensitive:checked,
|
||||
.inline-toolbar .titlebar GtkToolButton > .button.titlebutton:backdrop:insensitive:checked {
|
||||
.inline-toolbar GtkToolButton > .button:backdrop:insensitive:active, .inline-toolbar GtkToolButton > .button:backdrop:insensitive:checked {
|
||||
color: #c7c7c7;
|
||||
border-color: #a8a8a8;
|
||||
background-image: linear-gradient(to bottom, #e7e7e7);
|
||||
@@ -1178,14 +1147,12 @@ GtkComboBox.combobox-entry .titlebar .button.titlebutton,
|
||||
.inline-toolbar .header-bar GtkToolButton:backdrop:dir(rtl) > .button.titlebutton,
|
||||
.header-bar .inline-toolbar GtkToolButton:backdrop:dir(rtl) > .button.titlebutton,
|
||||
.inline-toolbar .titlebar GtkToolButton:backdrop:dir(rtl) > .button.titlebutton,
|
||||
.titlebar .inline-toolbar GtkToolButton:backdrop:dir(rtl) > .button.titlebutton, .osd .button:dir(rtl):hover, .osd .button:dir(rtl):active, .osd .button:dir(rtl):checked, .osd .button:dir(rtl):insensitive, .osd .button:dir(rtl):backdrop, .osd .button.suggested-action:dir(rtl), .osd .button.destructive-action:dir(rtl), .inline-toolbar .button:dir(rtl), .linked > .button:dir(rtl), .header-bar .linked > .button.titlebutton:dir(rtl),
|
||||
.titlebar .linked > .button.titlebutton:dir(rtl), GtkComboBox.combobox-entry .entry:dir(rtl), GtkComboBox.combobox-entry .button:dir(rtl), .linked > GtkComboBox > .button:dir(rtl) {
|
||||
.titlebar .inline-toolbar GtkToolButton:backdrop:dir(rtl) > .button.titlebutton, .osd .button:dir(rtl):hover, .osd .button:dir(rtl):active, .osd .button:dir(rtl):checked, .osd .button:dir(rtl):insensitive, .osd .button:dir(rtl):backdrop, .osd .button.suggested-action:dir(rtl), .osd .button.destructive-action:dir(rtl), .inline-toolbar .button:dir(rtl), .linked > .button:dir(rtl), GtkComboBox.combobox-entry .entry:dir(rtl), GtkComboBox.combobox-entry .button:dir(rtl), .linked > GtkComboBox > .button:dir(rtl) {
|
||||
border-radius: 0;
|
||||
border-right-style: none;
|
||||
border-left-style: solid; }
|
||||
|
||||
.osd .button:first-child:hover, .osd .button:first-child:active, .osd .button:first-child:checked, .osd .button:first-child:insensitive, .osd .button:first-child:backdrop, .osd .button.suggested-action:first-child, .osd .button.destructive-action:first-child, .inline-toolbar .button:first-child, .linked > .button:first-child, .header-bar .linked > .button.titlebutton:first-child,
|
||||
.titlebar .linked > .button.titlebutton:first-child, .inline-toolbar.toolbar GtkToolButton:first-child > .button.flat, .inline-toolbar GtkToolButton:first-child > .button.flat, .inline-toolbar.search-bar GtkToolButton:first-child > .button.flat, .inline-toolbar.location-bar GtkToolButton:first-child > .button.flat, .inline-toolbar .header-bar GtkToolButton:first-child > .button.titlebutton, .header-bar .inline-toolbar GtkToolButton:first-child > .button.titlebutton,
|
||||
.osd .button:first-child:hover, .osd .button:first-child:active, .osd .button:first-child:checked, .osd .button:first-child:insensitive, .osd .button:first-child:backdrop, .osd .button.suggested-action:first-child, .osd .button.destructive-action:first-child, .inline-toolbar .button:first-child, .linked > .button:first-child, .inline-toolbar.toolbar GtkToolButton:first-child > .button.flat, .inline-toolbar GtkToolButton:first-child > .button.flat, .inline-toolbar.search-bar GtkToolButton:first-child > .button.flat, .inline-toolbar.location-bar GtkToolButton:first-child > .button.flat, .inline-toolbar .header-bar GtkToolButton:first-child > .button.titlebutton, .header-bar .inline-toolbar GtkToolButton:first-child > .button.titlebutton,
|
||||
.inline-toolbar .titlebar GtkToolButton:first-child > .button.titlebutton,
|
||||
.titlebar .inline-toolbar GtkToolButton:first-child > .button.titlebutton,
|
||||
.inline-toolbar.toolbar GtkToolButton:backdrop:first-child > .button.flat,
|
||||
@@ -1198,8 +1165,7 @@ GtkComboBox.combobox-entry .titlebar .button.titlebutton,
|
||||
.titlebar .inline-toolbar GtkToolButton:backdrop:first-child > .button.titlebutton, GtkComboBox.combobox-entry .entry:first-child, GtkComboBox.combobox-entry .button:first-child, .linked > GtkComboBox:first-child > .button {
|
||||
border-radius: 3px 0 0 3px;
|
||||
border-left-style: solid; }
|
||||
.osd .button:last-child:hover, .osd .button:last-child:active, .osd .button:last-child:checked, .osd .button:last-child:insensitive, .osd .button:last-child:backdrop, .osd .button.suggested-action:last-child, .osd .button.destructive-action:last-child, .inline-toolbar .button:last-child, .linked > .button:last-child, .header-bar .linked > .button.titlebutton:last-child,
|
||||
.titlebar .linked > .button.titlebutton:last-child, .inline-toolbar.toolbar GtkToolButton:last-child > .button.flat, .inline-toolbar GtkToolButton:last-child > .button.flat, .inline-toolbar.search-bar GtkToolButton:last-child > .button.flat, .inline-toolbar.location-bar GtkToolButton:last-child > .button.flat, .inline-toolbar .header-bar GtkToolButton:last-child > .button.titlebutton, .header-bar .inline-toolbar GtkToolButton:last-child > .button.titlebutton,
|
||||
.osd .button:last-child:hover, .osd .button:last-child:active, .osd .button:last-child:checked, .osd .button:last-child:insensitive, .osd .button:last-child:backdrop, .osd .button.suggested-action:last-child, .osd .button.destructive-action:last-child, .inline-toolbar .button:last-child, .linked > .button:last-child, .inline-toolbar.toolbar GtkToolButton:last-child > .button.flat, .inline-toolbar GtkToolButton:last-child > .button.flat, .inline-toolbar.search-bar GtkToolButton:last-child > .button.flat, .inline-toolbar.location-bar GtkToolButton:last-child > .button.flat, .inline-toolbar .header-bar GtkToolButton:last-child > .button.titlebutton, .header-bar .inline-toolbar GtkToolButton:last-child > .button.titlebutton,
|
||||
.inline-toolbar .titlebar GtkToolButton:last-child > .button.titlebutton,
|
||||
.titlebar .inline-toolbar GtkToolButton:last-child > .button.titlebutton,
|
||||
.inline-toolbar.toolbar GtkToolButton:backdrop:last-child > .button.flat,
|
||||
@@ -1211,8 +1177,7 @@ GtkComboBox.combobox-entry .titlebar .button.titlebutton,
|
||||
.inline-toolbar .titlebar GtkToolButton:backdrop:last-child > .button.titlebutton,
|
||||
.titlebar .inline-toolbar GtkToolButton:backdrop:last-child > .button.titlebutton, GtkComboBox.combobox-entry .entry:last-child, GtkComboBox.combobox-entry .button:last-child, .linked > GtkComboBox:last-child > .button {
|
||||
border-radius: 0 3px 3px 0; }
|
||||
.osd .button:last-child:dir(rtl):hover, .osd .button:last-child:dir(rtl):active, .osd .button:last-child:dir(rtl):checked, .osd .button:last-child:dir(rtl):insensitive, .osd .button:last-child:dir(rtl):backdrop, .osd .button.suggested-action:last-child:dir(rtl), .osd .button.destructive-action:last-child:dir(rtl), .inline-toolbar .button:last-child:dir(rtl), .linked > .button:last-child:dir(rtl), .header-bar .linked > .button.titlebutton:last-child:dir(rtl),
|
||||
.titlebar .linked > .button.titlebutton:last-child:dir(rtl), .inline-toolbar GtkToolButton:last-child > .button.flat:dir(rtl), .inline-toolbar .header-bar GtkToolButton:last-child > .button.titlebutton:dir(rtl), .header-bar .inline-toolbar GtkToolButton:last-child > .button.titlebutton:dir(rtl),
|
||||
.osd .button:last-child:dir(rtl):hover, .osd .button:last-child:dir(rtl):active, .osd .button:last-child:dir(rtl):checked, .osd .button:last-child:dir(rtl):insensitive, .osd .button:last-child:dir(rtl):backdrop, .osd .button.suggested-action:last-child:dir(rtl), .osd .button.destructive-action:last-child:dir(rtl), .inline-toolbar .button:last-child:dir(rtl), .linked > .button:last-child:dir(rtl), .inline-toolbar GtkToolButton:last-child > .button.flat:dir(rtl), .inline-toolbar .header-bar GtkToolButton:last-child > .button.titlebutton:dir(rtl), .header-bar .inline-toolbar GtkToolButton:last-child > .button.titlebutton:dir(rtl),
|
||||
.inline-toolbar .titlebar GtkToolButton:last-child > .button.titlebutton:dir(rtl),
|
||||
.titlebar .inline-toolbar GtkToolButton:last-child > .button.titlebutton:dir(rtl),
|
||||
.inline-toolbar GtkToolButton:backdrop:last-child > .button.flat:dir(rtl), .inline-toolbar.toolbar GtkToolButton:last-child:dir(rtl) > .button.flat, .inline-toolbar GtkToolButton:last-child:dir(rtl) > .button.flat, .inline-toolbar.search-bar GtkToolButton:last-child:dir(rtl) > .button.flat, .inline-toolbar.location-bar GtkToolButton:last-child:dir(rtl) > .button.flat, .inline-toolbar .header-bar GtkToolButton:last-child:dir(rtl) > .button.titlebutton, .header-bar .inline-toolbar GtkToolButton:last-child:dir(rtl) > .button.titlebutton,
|
||||
@@ -1227,8 +1192,7 @@ GtkComboBox.combobox-entry .titlebar .button.titlebutton,
|
||||
.inline-toolbar .titlebar GtkToolButton:backdrop:last-child:dir(rtl) > .button.titlebutton,
|
||||
.titlebar .inline-toolbar GtkToolButton:backdrop:last-child:dir(rtl) > .button.titlebutton, GtkComboBox.combobox-entry .entry:last-child:dir(rtl), GtkComboBox.combobox-entry .button:last-child:dir(rtl), .linked > GtkComboBox:last-child > .button:dir(rtl) {
|
||||
border-right-style: solid; }
|
||||
.osd .button:only-child:hover, .osd .button:only-child:active, .osd .button:only-child:checked, .osd .button:only-child:insensitive, .osd .button:only-child:backdrop, .osd .button.suggested-action:only-child, .osd .button.destructive-action:only-child, .inline-toolbar .button:only-child, .linked > .button:only-child, .header-bar .linked > .button.titlebutton:only-child,
|
||||
.titlebar .linked > .button.titlebutton:only-child, .inline-toolbar.toolbar GtkToolButton:only-child > .button.flat, .inline-toolbar GtkToolButton:only-child > .button.flat, .inline-toolbar.search-bar GtkToolButton:only-child > .button.flat, .inline-toolbar.location-bar GtkToolButton:only-child > .button.flat, .inline-toolbar .header-bar GtkToolButton:only-child > .button.titlebutton, .header-bar .inline-toolbar GtkToolButton:only-child > .button.titlebutton,
|
||||
.osd .button:only-child:hover, .osd .button:only-child:active, .osd .button:only-child:checked, .osd .button:only-child:insensitive, .osd .button:only-child:backdrop, .osd .button.suggested-action:only-child, .osd .button.destructive-action:only-child, .inline-toolbar .button:only-child, .linked > .button:only-child, .inline-toolbar.toolbar GtkToolButton:only-child > .button.flat, .inline-toolbar GtkToolButton:only-child > .button.flat, .inline-toolbar.search-bar GtkToolButton:only-child > .button.flat, .inline-toolbar.location-bar GtkToolButton:only-child > .button.flat, .inline-toolbar .header-bar GtkToolButton:only-child > .button.titlebutton, .header-bar .inline-toolbar GtkToolButton:only-child > .button.titlebutton,
|
||||
.inline-toolbar .titlebar GtkToolButton:only-child > .button.titlebutton,
|
||||
.titlebar .inline-toolbar GtkToolButton:only-child > .button.titlebutton,
|
||||
.inline-toolbar.toolbar GtkToolButton:backdrop:only-child > .button.flat,
|
||||
@@ -1242,24 +1206,20 @@ GtkComboBox.combobox-entry .titlebar .button.titlebutton,
|
||||
border-radius: 3px;
|
||||
border-style: solid; }
|
||||
|
||||
.linked.vertical > .entry, .linked.vertical > .entry:focus, .linked.vertical > .entry:insensitive, .linked.vertical > .entry:insensitive:backdrop, .linked.vertical > .entry:backdrop, .linked.vertical > .button, .header-bar .linked.vertical > .button.titlebutton,
|
||||
.titlebar .linked.vertical > .button.titlebutton, .linked.vertical > .button:hover, .linked.vertical > .button:active, .linked.vertical > .button:checked, .linked.vertical > .button:backdrop, .linked.vertical > GtkComboBoxText > .button,
|
||||
.linked.vertical > .entry, .linked.vertical > .entry:focus, .linked.vertical > .entry:insensitive, .linked.vertical > .entry:insensitive:backdrop, .linked.vertical > .entry:backdrop, .linked.vertical > .button, .linked.vertical > .button:hover, .linked.vertical > .button:active, .linked.vertical > .button:checked, .linked.vertical > .button:backdrop, .linked.vertical > GtkComboBoxText > .button,
|
||||
.linked.vertical > GtkComboBox > .button {
|
||||
border-left-style: solid;
|
||||
border-top-style: none;
|
||||
border-radius: 0; }
|
||||
|
||||
.linked.vertical > .entry:first-child, .linked.vertical > .button:first-child, .header-bar .linked.vertical > .button.titlebutton:first-child,
|
||||
.titlebar .linked.vertical > .button.titlebutton:first-child, .linked.vertical > GtkComboBoxText:first-child > .button,
|
||||
.linked.vertical > .entry:first-child, .linked.vertical > .button:first-child, .linked.vertical > GtkComboBoxText:first-child > .button,
|
||||
.linked.vertical > GtkComboBox:first-child > .button {
|
||||
border-style: solid;
|
||||
border-radius: 3px 3px 0 0; }
|
||||
.linked.vertical > .entry:last-child, .linked.vertical > .button:last-child, .header-bar .linked.vertical > .button.titlebutton:last-child,
|
||||
.titlebar .linked.vertical > .button.titlebutton:last-child, .linked.vertical > GtkComboBoxText:last-child > .button,
|
||||
.linked.vertical > .entry:last-child, .linked.vertical > .button:last-child, .linked.vertical > GtkComboBoxText:last-child > .button,
|
||||
.linked.vertical > GtkComboBox:last-child > .button {
|
||||
border-radius: 0 0 3px 3px; }
|
||||
.linked.vertical > .entry:only-child, .linked.vertical > .button:only-child, .header-bar .linked.vertical > .button.titlebutton:only-child,
|
||||
.titlebar .linked.vertical > .button.titlebutton:only-child, .linked.vertical > GtkComboBoxText:only-child > .button,
|
||||
.linked.vertical > .entry:only-child, .linked.vertical > .button:only-child, .linked.vertical > GtkComboBoxText:only-child > .button,
|
||||
.linked.vertical > GtkComboBox:only-child > .button {
|
||||
border-radius: 3px;
|
||||
border-style: solid; }
|
||||
@@ -1470,9 +1430,7 @@ GtkColorButton.button, .header-bar GtkColorButton.button.titlebutton,
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
|
||||
.spinbutton.vertical .button:first-child:insensitive > .label, .spinbutton.vertical .header-bar .button.titlebutton:first-child:insensitive > .label,
|
||||
.spinbutton.vertical .titlebar .button.titlebutton:first-child:insensitive > .label, .spinbutton.vertical:dir(rtl) .button:first-child:insensitive > .label, .spinbutton.vertical:dir(rtl) .header-bar .button.titlebutton:first-child:insensitive > .label,
|
||||
.spinbutton.vertical:dir(rtl) .titlebar .button.titlebutton:first-child:insensitive > .label {
|
||||
.spinbutton.vertical .button:first-child:insensitive > .label, .spinbutton.vertical:dir(rtl) .button:first-child:insensitive > .label {
|
||||
color: inherit; }
|
||||
.spinbutton.vertical .button:first-child:backdrop, .spinbutton.vertical:dir(rtl) .button:first-child:backdrop {
|
||||
color: #8d9091;
|
||||
@@ -1512,9 +1470,7 @@ GtkColorButton.button, .header-bar GtkColorButton.button.titlebutton,
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px white; }
|
||||
.spinbutton.vertical .button:last-child:insensitive > .label, .spinbutton.vertical .header-bar .button.titlebutton:last-child:insensitive > .label,
|
||||
.spinbutton.vertical .titlebar .button.titlebutton:last-child:insensitive > .label, .spinbutton.vertical:dir(rtl) .button:last-child:insensitive > .label, .spinbutton.vertical:dir(rtl) .header-bar .button.titlebutton:last-child:insensitive > .label,
|
||||
.spinbutton.vertical:dir(rtl) .titlebar .button.titlebutton:last-child:insensitive > .label {
|
||||
.spinbutton.vertical .button:last-child:insensitive > .label, .spinbutton.vertical:dir(rtl) .button:last-child:insensitive > .label {
|
||||
color: inherit; }
|
||||
.spinbutton.vertical .button:last-child:backdrop, .spinbutton.vertical:dir(rtl) .button:last-child:backdrop {
|
||||
color: #8d9091;
|
||||
@@ -1530,9 +1486,7 @@ GtkColorButton.button, .header-bar GtkColorButton.button.titlebutton,
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
|
||||
.spinbutton.vertical .button:backdrop:insensitive > .label, .spinbutton.vertical .header-bar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.spinbutton.vertical .titlebar .button.titlebutton:backdrop:insensitive > .label, .spinbutton.vertical:dir(rtl) .button:backdrop:insensitive > .label, .spinbutton.vertical:dir(rtl) .header-bar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.spinbutton.vertical:dir(rtl) .titlebar .button.titlebutton:backdrop:insensitive > .label {
|
||||
.spinbutton.vertical .button:backdrop:insensitive > .label, .spinbutton.vertical:dir(rtl) .button:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
.spinbutton.vertical.entry, .spinbutton.vertical:dir(rtl).entry {
|
||||
border-radius: 0;
|
||||
@@ -1739,13 +1693,11 @@ GtkComboBox {
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(164, 199, 236, 0);
|
||||
border-color: #184472; }
|
||||
.titlebar.selection-mode .button:backdrop:insensitive > .label, .titlebar.selection-mode .header-bar .button.titlebutton:backdrop:insensitive > .label, .titlebar.selection-mode .button.flat:backdrop:insensitive > .label, .titlebar.selection-mode .header-bar .titlebutton.button:backdrop:insensitive > .label,
|
||||
.titlebar.selection-mode .button:backdrop:insensitive > .label, .titlebar.selection-mode .button.flat:backdrop:insensitive > .label,
|
||||
.titlebar.selection-mode .titlebutton.button:backdrop:insensitive > .label,
|
||||
.header-bar.selection-mode .button:backdrop:insensitive > .label,
|
||||
.header-bar.selection-mode .titlebar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.header-bar.selection-mode .button.flat:backdrop:insensitive > .label,
|
||||
.header-bar.selection-mode .titlebutton.button:backdrop:insensitive > .label,
|
||||
.header-bar.selection-mode .titlebar .titlebutton.button:backdrop:insensitive > .label {
|
||||
.header-bar.selection-mode .titlebutton.button:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
.titlebar.selection-mode .button:backdrop:insensitive:active, .titlebar.selection-mode .button:backdrop:insensitive:checked, .titlebar.selection-mode .button.flat:backdrop:insensitive:active,
|
||||
.titlebar.selection-mode .titlebutton.button:backdrop:insensitive:active, .titlebar.selection-mode .button.flat:backdrop:insensitive:checked,
|
||||
@@ -1761,19 +1713,15 @@ GtkComboBox {
|
||||
background-image: linear-gradient(to bottom, #5093da);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(164, 199, 236, 0);
|
||||
border-color: #184472; }
|
||||
.titlebar.selection-mode .button:backdrop:insensitive:active > .label, .titlebar.selection-mode .header-bar .button.titlebutton:backdrop:insensitive:active > .label, .titlebar.selection-mode .button:backdrop:insensitive:checked > .label, .titlebar.selection-mode .header-bar .button.titlebutton:backdrop:insensitive:checked > .label, .titlebar.selection-mode .button.flat:backdrop:insensitive:active > .label, .titlebar.selection-mode .header-bar .titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.titlebar.selection-mode .titlebutton.button:backdrop:insensitive:active > .label, .titlebar.selection-mode .button.flat:backdrop:insensitive:checked > .label, .titlebar.selection-mode .header-bar .titlebutton.button:backdrop:insensitive:checked > .label,
|
||||
.titlebar.selection-mode .button:backdrop:insensitive:active > .label, .titlebar.selection-mode .button:backdrop:insensitive:checked > .label, .titlebar.selection-mode .button.flat:backdrop:insensitive:active > .label,
|
||||
.titlebar.selection-mode .titlebutton.button:backdrop:insensitive:active > .label, .titlebar.selection-mode .button.flat:backdrop:insensitive:checked > .label,
|
||||
.titlebar.selection-mode .titlebutton.button:backdrop:insensitive:checked > .label,
|
||||
.header-bar.selection-mode .button:backdrop:insensitive:active > .label,
|
||||
.header-bar.selection-mode .titlebar .button.titlebutton:backdrop:insensitive:active > .label,
|
||||
.header-bar.selection-mode .button:backdrop:insensitive:checked > .label,
|
||||
.header-bar.selection-mode .titlebar .button.titlebutton:backdrop:insensitive:checked > .label,
|
||||
.header-bar.selection-mode .button.flat:backdrop:insensitive:active > .label,
|
||||
.header-bar.selection-mode .titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.header-bar.selection-mode .titlebar .titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.header-bar.selection-mode .button.flat:backdrop:insensitive:checked > .label,
|
||||
.header-bar.selection-mode .titlebutton.button:backdrop:insensitive:checked > .label,
|
||||
.header-bar.selection-mode .titlebar .titlebutton.button:backdrop:insensitive:checked > .label {
|
||||
.header-bar.selection-mode .titlebutton.button:backdrop:insensitive:checked > .label {
|
||||
color: inherit; }
|
||||
.titlebar.selection-mode .button.flat:backdrop,
|
||||
.titlebar.selection-mode .titlebutton.button:backdrop, .titlebar.selection-mode .button.flat:insensitive,
|
||||
@@ -1799,9 +1747,8 @@ GtkComboBox {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px #a4c7ec; }
|
||||
.titlebar.selection-mode .button:insensitive > .label, .titlebar.selection-mode .header-bar .button.titlebutton:insensitive > .label,
|
||||
.header-bar.selection-mode .button:insensitive > .label,
|
||||
.header-bar.selection-mode .titlebar .button.titlebutton:insensitive > .label {
|
||||
.titlebar.selection-mode .button:insensitive > .label,
|
||||
.header-bar.selection-mode .button:insensitive > .label {
|
||||
color: inherit; }
|
||||
.titlebar.selection-mode .button:insensitive:active, .titlebar.selection-mode .button:insensitive:checked,
|
||||
.header-bar.selection-mode .button:insensitive:active,
|
||||
@@ -1810,11 +1757,9 @@ GtkComboBox {
|
||||
border-color: #1c5187;
|
||||
background-image: linear-gradient(to bottom, #4a8cd1, #5093da);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px #a4c7ec; }
|
||||
.titlebar.selection-mode .button:insensitive:active > .label, .titlebar.selection-mode .header-bar .button.titlebutton:insensitive:active > .label, .titlebar.selection-mode .button:insensitive:checked > .label, .titlebar.selection-mode .header-bar .button.titlebutton:insensitive:checked > .label,
|
||||
.titlebar.selection-mode .button:insensitive:active > .label, .titlebar.selection-mode .button:insensitive:checked > .label,
|
||||
.header-bar.selection-mode .button:insensitive:active > .label,
|
||||
.header-bar.selection-mode .titlebar .button.titlebutton:insensitive:active > .label,
|
||||
.header-bar.selection-mode .button:insensitive:checked > .label,
|
||||
.header-bar.selection-mode .titlebar .button.titlebutton:insensitive:checked > .label {
|
||||
.header-bar.selection-mode .button:insensitive:checked > .label {
|
||||
color: inherit; }
|
||||
.titlebar.selection-mode .button.suggested-action,
|
||||
.header-bar.selection-mode .button.suggested-action {
|
||||
@@ -1855,9 +1800,8 @@ GtkComboBox {
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px #a4c7ec;
|
||||
border-color: #184472; }
|
||||
.titlebar.selection-mode .button.suggested-action:insensitive > .label, .titlebar.selection-mode .header-bar .suggested-action.button.titlebutton:insensitive > .label,
|
||||
.header-bar.selection-mode .button.suggested-action:insensitive > .label,
|
||||
.header-bar.selection-mode .titlebar .suggested-action.button.titlebutton:insensitive > .label {
|
||||
.titlebar.selection-mode .button.suggested-action:insensitive > .label,
|
||||
.header-bar.selection-mode .button.suggested-action:insensitive > .label {
|
||||
color: inherit; }
|
||||
.titlebar.selection-mode .button.suggested-action:backdrop,
|
||||
.header-bar.selection-mode .button.suggested-action:backdrop {
|
||||
@@ -1877,9 +1821,8 @@ GtkComboBox {
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(164, 199, 236, 0);
|
||||
border-color: #184472; }
|
||||
.titlebar.selection-mode .button.suggested-action:backdrop:insensitive > .label, .titlebar.selection-mode .header-bar .suggested-action.button.titlebutton:backdrop:insensitive > .label,
|
||||
.header-bar.selection-mode .button.suggested-action:backdrop:insensitive > .label,
|
||||
.header-bar.selection-mode .titlebar .suggested-action.button.titlebutton:backdrop:insensitive > .label {
|
||||
.titlebar.selection-mode .button.suggested-action:backdrop:insensitive > .label,
|
||||
.header-bar.selection-mode .button.suggested-action:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
.titlebar.selection-mode .selection-menu, .titlebar.selection-mode .selection-menu:backdrop,
|
||||
.header-bar.selection-mode .selection-menu,
|
||||
@@ -3791,8 +3734,7 @@ GtkPlacesSidebar.sidebar .view .separator:backdrop {
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0);
|
||||
border-color: #184472; }
|
||||
.list-row:selected .button:backdrop:insensitive > .label, .list-row:selected .header-bar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.list-row:selected .titlebar .button.titlebutton:backdrop:insensitive > .label, .list-row:selected .button.flat:backdrop:insensitive > .label, .list-row:selected .header-bar .titlebutton.button:backdrop:insensitive > .label, .header-bar .list-row:selected .titlebutton.button:backdrop:insensitive > .label,
|
||||
.list-row:selected .button:backdrop:insensitive > .label, .list-row:selected .button.flat:backdrop:insensitive > .label, .list-row:selected .header-bar .titlebutton.button:backdrop:insensitive > .label, .header-bar .list-row:selected .titlebutton.button:backdrop:insensitive > .label,
|
||||
.list-row:selected .titlebar .titlebutton.button:backdrop:insensitive > .label,
|
||||
.titlebar .list-row:selected .titlebutton.button:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
@@ -3806,9 +3748,7 @@ GtkPlacesSidebar.sidebar .view .separator:backdrop {
|
||||
background-image: linear-gradient(to bottom, #e7e7e7);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0);
|
||||
border-color: #184472; }
|
||||
.list-row:selected .button:backdrop:insensitive:active > .label, .list-row:selected .header-bar .button.titlebutton:backdrop:insensitive:active > .label,
|
||||
.list-row:selected .titlebar .button.titlebutton:backdrop:insensitive:active > .label, .list-row:selected .button:backdrop:insensitive:checked > .label, .list-row:selected .header-bar .button.titlebutton:backdrop:insensitive:checked > .label,
|
||||
.list-row:selected .titlebar .button.titlebutton:backdrop:insensitive:checked > .label, .list-row:selected .button.flat:backdrop:insensitive:active > .label, .list-row:selected .header-bar .titlebutton.button:backdrop:insensitive:active > .label, .header-bar .list-row:selected .titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.list-row:selected .button:backdrop:insensitive:active > .label, .list-row:selected .button:backdrop:insensitive:checked > .label, .list-row:selected .button.flat:backdrop:insensitive:active > .label, .list-row:selected .header-bar .titlebutton.button:backdrop:insensitive:active > .label, .header-bar .list-row:selected .titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.list-row:selected .titlebar .titlebutton.button:backdrop:insensitive:active > .label,
|
||||
.titlebar .list-row:selected .titlebutton.button:backdrop:insensitive:active > .label, .list-row:selected .button.flat:backdrop:insensitive:checked > .label, .list-row:selected .header-bar .titlebutton.button:backdrop:insensitive:checked > .label, .header-bar .list-row:selected .titlebutton.button:backdrop:insensitive:checked > .label,
|
||||
.list-row:selected .titlebar .titlebutton.button:backdrop:insensitive:checked > .label,
|
||||
@@ -3832,17 +3772,14 @@ GtkPlacesSidebar.sidebar .view .separator:backdrop {
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0);
|
||||
border-color: #184472; }
|
||||
.list-row:selected .button:insensitive > .label, .list-row:selected .header-bar .button.titlebutton:insensitive > .label,
|
||||
.list-row:selected .titlebar .button.titlebutton:insensitive > .label {
|
||||
.list-row:selected .button:insensitive > .label {
|
||||
color: inherit; }
|
||||
.list-row:selected .button:insensitive:active, .list-row:selected .button:insensitive:checked {
|
||||
color: #8d9091;
|
||||
border-color: #a1a1a1;
|
||||
background-image: linear-gradient(to bottom, #ebebeb, #f4f4f4);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
|
||||
.list-row:selected .button:insensitive:active > .label, .list-row:selected .header-bar .button.titlebutton:insensitive:active > .label,
|
||||
.list-row:selected .titlebar .button.titlebutton:insensitive:active > .label, .list-row:selected .button:insensitive:checked > .label, .list-row:selected .header-bar .button.titlebutton:insensitive:checked > .label,
|
||||
.list-row:selected .titlebar .button.titlebutton:insensitive:checked > .label {
|
||||
.list-row:selected .button:insensitive:active > .label, .list-row:selected .button:insensitive:checked > .label {
|
||||
color: inherit; }
|
||||
|
||||
.list-row, list-row.button, .header-bar list-row.button.titlebutton,
|
||||
@@ -4018,8 +3955,7 @@ GtkCalendar {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
|
||||
.message-dialog.csd .dialog-action-area .button:insensitive > .label, .message-dialog.csd .dialog-action-area .header-bar .button.titlebutton:insensitive > .label,
|
||||
.message-dialog.csd .dialog-action-area .titlebar .button.titlebutton:insensitive > .label {
|
||||
.message-dialog.csd .dialog-action-area .button:insensitive > .label {
|
||||
color: inherit; }
|
||||
.message-dialog.csd .dialog-action-area .button:backdrop {
|
||||
color: #8d9091;
|
||||
@@ -4035,8 +3971,7 @@ GtkCalendar {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
|
||||
.message-dialog.csd .dialog-action-area .button:backdrop:insensitive > .label, .message-dialog.csd .dialog-action-area .header-bar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.message-dialog.csd .dialog-action-area .titlebar .button.titlebutton:backdrop:insensitive > .label {
|
||||
.message-dialog.csd .dialog-action-area .button:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
.message-dialog.csd .dialog-action-area .button.suggested-action {
|
||||
color: white;
|
||||
@@ -4076,8 +4011,7 @@ GtkCalendar {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
|
||||
.message-dialog.csd .dialog-action-area .button.suggested-action:backdrop:insensitive > .label, .message-dialog.csd .dialog-action-area .header-bar .suggested-action.button.titlebutton:backdrop:insensitive > .label,
|
||||
.message-dialog.csd .dialog-action-area .titlebar .suggested-action.button.titlebutton:backdrop:insensitive > .label {
|
||||
.message-dialog.csd .dialog-action-area .button.suggested-action:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
.message-dialog.csd .dialog-action-area .button.suggested-action:insensitive {
|
||||
color: #8d9091;
|
||||
@@ -4086,8 +4020,7 @@ GtkCalendar {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
|
||||
.message-dialog.csd .dialog-action-area .button.suggested-action:insensitive > .label, .message-dialog.csd .dialog-action-area .header-bar .suggested-action.button.titlebutton:insensitive > .label,
|
||||
.message-dialog.csd .dialog-action-area .titlebar .suggested-action.button.titlebutton:insensitive > .label {
|
||||
.message-dialog.csd .dialog-action-area .button.suggested-action:insensitive > .label {
|
||||
color: inherit; }
|
||||
.message-dialog.csd .dialog-action-area .button.destructive-action {
|
||||
color: white;
|
||||
@@ -4127,8 +4060,7 @@ GtkCalendar {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
|
||||
.message-dialog.csd .dialog-action-area .button.destructive-action:backdrop:insensitive > .label, .message-dialog.csd .dialog-action-area .header-bar .destructive-action.button.titlebutton:backdrop:insensitive > .label,
|
||||
.message-dialog.csd .dialog-action-area .titlebar .destructive-action.button.titlebutton:backdrop:insensitive > .label {
|
||||
.message-dialog.csd .dialog-action-area .button.destructive-action:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
.message-dialog.csd .dialog-action-area .button.destructive-action:insensitive {
|
||||
color: #8d9091;
|
||||
@@ -4137,8 +4069,7 @@ GtkCalendar {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
|
||||
.message-dialog.csd .dialog-action-area .button.destructive-action:insensitive > .label, .message-dialog.csd .dialog-action-area .header-bar .destructive-action.button.titlebutton:insensitive > .label,
|
||||
.message-dialog.csd .dialog-action-area .titlebar .destructive-action.button.titlebutton:insensitive > .label {
|
||||
.message-dialog.csd .dialog-action-area .button.destructive-action:insensitive > .label {
|
||||
color: inherit; }
|
||||
.message-dialog.csd .dialog-action-area .button, .message-dialog.csd .dialog-action-area .button:hover, .message-dialog.csd .dialog-action-area .button:active, .message-dialog.csd .dialog-action-area .button:insensitive, .message-dialog.csd .dialog-action-area .button:backdrop, .message-dialog.csd .dialog-action-area .button:backdrop:insensitive, .message-dialog.csd .dialog-action-area .button.suggested-action, .message-dialog.csd .dialog-action-area .button.suggested-action:hover, .message-dialog.csd .dialog-action-area .button.suggested-action:active, .message-dialog.csd .dialog-action-area .button.suggested-action:backdrop, .message-dialog.csd .dialog-action-area .button.suggested-action:backdrop:insensitive, .message-dialog.csd .dialog-action-area .button.suggested-action:insensitive, .message-dialog.csd .dialog-action-area .button.destructive-action, .message-dialog.csd .dialog-action-area .button.destructive-action:hover, .message-dialog.csd .dialog-action-area .button.destructive-action:active, .message-dialog.csd .dialog-action-area .button.destructive-action:backdrop, .message-dialog.csd .dialog-action-area .button.destructive-action:backdrop:insensitive, .message-dialog.csd .dialog-action-area .button.destructive-action:insensitive {
|
||||
border-left-style: solid;
|
||||
@@ -4292,17 +4223,10 @@ GtkInfoBar {
|
||||
text-shadow: none;
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
|
||||
.info .button:insensitive > .label, .info .header-bar .button.titlebutton:insensitive > .label,
|
||||
.info .titlebar .button.titlebutton:insensitive > .label,
|
||||
.info .button:insensitive > .label,
|
||||
.question .button:insensitive > .label,
|
||||
.question .header-bar .button.titlebutton:insensitive > .label,
|
||||
.question .titlebar .button.titlebutton:insensitive > .label,
|
||||
.warning .button:insensitive > .label,
|
||||
.warning .header-bar .button.titlebutton:insensitive > .label,
|
||||
.warning .titlebar .button.titlebutton:insensitive > .label,
|
||||
.error .button:insensitive > .label,
|
||||
.error .header-bar .button.titlebutton:insensitive > .label,
|
||||
.error .titlebar .button.titlebutton:insensitive > .label {
|
||||
.error .button:insensitive > .label {
|
||||
color: inherit; }
|
||||
.info .button:backdrop,
|
||||
.question .button:backdrop,
|
||||
@@ -4326,17 +4250,10 @@ GtkInfoBar {
|
||||
icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0);
|
||||
border-color: #1c5187; }
|
||||
.info .button:backdrop:insensitive > .label, .info .header-bar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.info .titlebar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.info .button:backdrop:insensitive > .label,
|
||||
.question .button:backdrop:insensitive > .label,
|
||||
.question .header-bar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.question .titlebar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.warning .button:backdrop:insensitive > .label,
|
||||
.warning .header-bar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.warning .titlebar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.error .button:backdrop:insensitive > .label,
|
||||
.error .header-bar .button.titlebutton:backdrop:insensitive > .label,
|
||||
.error .titlebar .button.titlebutton:backdrop:insensitive > .label {
|
||||
.error .button:backdrop:insensitive > .label {
|
||||
color: inherit; }
|
||||
.info .label:selected,
|
||||
.info .label:selected:focus,
|
||||
@@ -4500,12 +4417,6 @@ GtkVolumeButton.button, .header-bar GtkVolumeButton.button.titlebutton,
|
||||
.window-frame.csd.message-dialog {
|
||||
border-radius: 7px;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.13); }
|
||||
.window-frame.solid-csd {
|
||||
border-radius: 0;
|
||||
margin: 4px;
|
||||
background-color: #ededed;
|
||||
border: solid 1px #a8a8a8;
|
||||
box-shadow: none; }
|
||||
|
||||
.header-bar .titlebutton.button,
|
||||
.titlebar .titlebutton.button {
|
||||
@@ -4530,7 +4441,8 @@ GtkVolumeButton.button, .header-bar GtkVolumeButton.button.titlebutton,
|
||||
outline-color: rgba(255, 255, 255, 0.3); }
|
||||
.view:backdrop:selected, GtkCalendar:backdrop:selected, .label:backdrop:selected, .grid-child:backdrop:selected, .entry:backdrop:selected, .menuitem.button.flat:backdrop:selected, .header-bar .menuitem.titlebutton.button:backdrop:selected,
|
||||
.titlebar .menuitem.titlebutton.button:backdrop:selected, .list-row:backdrop:selected, .sidebar:backdrop:selected, GtkPlacesSidebar.sidebar .view:backdrop:selected, GtkPlacesSidebar.sidebar GtkCalendar:backdrop:selected {
|
||||
color: #ffffff; }
|
||||
color: #ffffff;
|
||||
background-color: #929292; }
|
||||
|
||||
/* Decouple the font of context menus from their entry/textview */
|
||||
.touch-selection,
|
||||
|
||||
@@ -583,7 +583,7 @@ $_dot_color: $selected_bg_color;
|
||||
&:backdrop {
|
||||
color: $backdrop_fg_color;
|
||||
@extend %undecorated_button;
|
||||
&:hover { color: $selected_fg_color; background-color: $selected_bg_color; }
|
||||
&:hover { color: $selected_fg_color; background-color: selected_bg_color; }
|
||||
}
|
||||
&:insensitive { color: $insensitive_fg_color; }
|
||||
}
|
||||
@@ -2260,13 +2260,6 @@ GtkColorChooserWidget #add-color-button {
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
&.solid-csd {
|
||||
border-radius: 0;
|
||||
margin: 4px;
|
||||
background-color: $backdrop_bg_color;
|
||||
border: solid 1px $backdrop_borders_color;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Window Close button
|
||||
|
||||
@@ -175,7 +175,8 @@
|
||||
box-shadow: none; }
|
||||
|
||||
.label:insensitive, .label:backdrop:insensitive {
|
||||
color: #7f7f7f; }
|
||||
color: #7f7f7f;
|
||||
background-color: white; }
|
||||
|
||||
/*********************
|
||||
* Spinner Animation *
|
||||
@@ -781,7 +782,7 @@
|
||||
color: #000; }
|
||||
.menuitem.button.flat:backdrop:hover {
|
||||
color: #fff;
|
||||
background-color: #000; }
|
||||
background-color: selected_bg_color; }
|
||||
.menuitem.button.flat:insensitive {
|
||||
color: #7f7f7f; }
|
||||
|
||||
@@ -2511,12 +2512,6 @@ GtkColorChooserWidget #add-color-button {
|
||||
.window-frame.csd.tooltip {
|
||||
border-radius: 5px;
|
||||
box-shadow: none; }
|
||||
.window-frame.solid-csd {
|
||||
border-radius: 0;
|
||||
margin: 4px;
|
||||
background-color: #fff;
|
||||
border: solid 1px #8b8b8b;
|
||||
box-shadow: none; }
|
||||
|
||||
.button.titlebutton {
|
||||
padding: 8px;
|
||||
|
||||
@@ -872,12 +872,3 @@ GtkCalendar.button:hover {
|
||||
.window-frame:backdrop {
|
||||
box-shadow: 0 2px 5px 1px alpha(black, 0.5);
|
||||
}
|
||||
|
||||
.window-frame.solid-csd {
|
||||
border-radius: 0;
|
||||
margin: 2px;
|
||||
background-color: @bg_color;
|
||||
border-style: outset;
|
||||
border-width: 2px;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
@@ -78,13 +78,22 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton" id="browse_new_folder_button">
|
||||
<property name="label" translatable="yes">Create _Folder</property>
|
||||
<object class="GtkButton" id="browse_new_folder_button">
|
||||
<property name="tooltip-text" translatable="yes">Create Folder</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="popover">new_folder_popover</property>
|
||||
<signal name="notify::active" handler="new_folder_popover_active"/>
|
||||
<signal name="clicked" handler="new_folder_button_clicked" swapped="no"/>
|
||||
<style>
|
||||
<class name="image-button"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">list-add-symbolic</property>
|
||||
<property name="icon-size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -217,6 +226,8 @@
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="list_name_renderer">
|
||||
<property name="ellipsize">end</property>
|
||||
<signal name="edited" handler="renderer_edited_cb" swapped="no"/>
|
||||
<signal name="editing-canceled" handler="renderer_editing_canceled_cb" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -361,69 +372,4 @@
|
||||
<widget name="browse_new_folder_button"/>
|
||||
</widgets>
|
||||
</object>
|
||||
<object class="GtkPopover" id="new_folder_popover">
|
||||
<property name="modal">True</property>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="margin">10</property>
|
||||
<property name="column-spacing">6</property>
|
||||
<property name="row-spacing">6</property>
|
||||
<property name="row-homogeneous">False</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Folder Name</property>
|
||||
<property name="halign">start</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="new_folder_name_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="width-chars">25</property>
|
||||
<signal name="changed" handler="new_folder_name_changed"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="new_folder_create_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="label" translatable="yes">_Create</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="clicked" handler="new_folder_create_clicked"/>
|
||||
<style>
|
||||
<class name="suggested-action"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="new_folder_error_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">start</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
|
||||
@@ -1491,7 +1491,7 @@ build_cache (const gchar *path)
|
||||
opentmp:
|
||||
if ((fd = g_open (tmp_cache_path, O_WRONLY | O_CREAT | O_EXCL | O_TRUNC | _O_BINARY, mode)) == -1)
|
||||
{
|
||||
if (retry_count == 0)
|
||||
if (force_update && retry_count == 0)
|
||||
{
|
||||
retry_count++;
|
||||
g_remove (tmp_cache_path);
|
||||
|
||||
@@ -118,7 +118,6 @@ gtk/gtkcolorscale.c
|
||||
gtk/gtkcolorswatch.c
|
||||
gtk/gtkcombobox.c
|
||||
gtk/gtkcontainer.c
|
||||
gtk/gtkcssnode.c
|
||||
gtk/gtkcssprovider.c
|
||||
gtk/gtkcssshorthandproperty.c
|
||||
gtk/gtkcssstyleproperty.c
|
||||
|
||||
@@ -60,7 +60,6 @@ gtk/inspector/classes-list.ui
|
||||
gtk/inspector/classes-list.ui.h
|
||||
gtk/inspector/css-editor.ui
|
||||
gtk/inspector/css-editor.ui.h
|
||||
gtk/inspector/css-node-tree.ui
|
||||
gtk/inspector/data-list.ui
|
||||
gtk/inspector/data-list.ui.h
|
||||
gtk/inspector/general.ui
|
||||
@@ -168,8 +167,6 @@ testsuite/reftests/border-image-url.ref.ui
|
||||
testsuite/reftests/border-image-url-scaled.ref.ui
|
||||
testsuite/reftests/border-image-url-scaled.ui
|
||||
testsuite/reftests/border-image-url.ui
|
||||
testsuite/reftests/box-order.ref.ui
|
||||
testsuite/reftests/box-order.ui
|
||||
testsuite/reftests/box-packing.ui
|
||||
testsuite/reftests/box-pseudo-classes.ref.ui
|
||||
testsuite/reftests/box-pseudo-classes.ui
|
||||
|
||||
+2343
-2310
File diff suppressed because it is too large
Load Diff
+2332
-2268
File diff suppressed because it is too large
Load Diff
+2208
-2208
File diff suppressed because it is too large
Load Diff
+2229
-2261
File diff suppressed because it is too large
Load Diff
+2311
-2311
File diff suppressed because it is too large
Load Diff
+2209
-2216
File diff suppressed because it is too large
Load Diff
+1132
-932
File diff suppressed because it is too large
Load Diff
+294
-331
File diff suppressed because it is too large
Load Diff
+2783
-3737
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user