Commit 911fbb60 authored by Guido Gunther's avatar Guido Gunther
Browse files

New upstream version 1.5.0

parents b5da789a 8fa8306a
=============
Version 1.5.0
=============
- Introduce HdyStyleManager for managing color schemes (light/dark) and
high contrast mode.
- Support the cross-platform color scheme preference in the
settings portal.
- HdyPreferencesPage
- Remove adaptive margins to fix default window sizes
- HdyTabBar
- Handle middle click on button release rather than press
- Various memory leak fixes
- Translation updates:
- Brazilian Portuguese
- Finnish
- Indonesian
- Portuguese
- Serbian
- Swedish
- Ukrainian
=============
Version 1.4.0
=============
......
......@@ -58,6 +58,7 @@
<xi:include href="xml/hdy-preferences-row.xml"/>
<xi:include href="xml/hdy-preferences-window.xml"/>
<xi:include href="xml/hdy-search-bar.xml"/>
<xi:include href="xml/hdy-style-manager.xml"/>
<xi:include href="xml/hdy-squeezer.xml"/>
<xi:include href="xml/hdy-status-page.xml"/>
<xi:include href="xml/hdy-swipeable.xml"/>
......@@ -150,6 +151,11 @@
<xi:include href="xml/api-index-1.4.xml"><xi:fallback /></xi:include>
</index>
<index id="api-index-1-6" role="1.6">
<title>Index of new symbols in 1.6</title>
<xi:include href="xml/api-index-1.6.xml"><xi:fallback /></xi:include>
</index>
<index id="annotations-glossary">
<title>Annotations glossary</title>
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
......
......@@ -19,6 +19,7 @@ private_headers = [
'hdy-keypad-button-private.h',
'hdy-preferences-group-private.h',
'hdy-preferences-page-private.h',
'hdy-settings-private.h',
'hdy-shadow-helper-private.h',
'hdy-stackable-box-private.h',
'hdy-swipe-tracker-private.h',
......
......@@ -43,6 +43,9 @@ startup (GtkApplication *app)
GTK_STYLE_PROVIDER (css_provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
hdy_style_manager_set_color_scheme (hdy_style_manager_get_default (),
HDY_COLOR_SCHEME_PREFER_LIGHT);
g_object_unref (css_provider);
}
......
......@@ -12,7 +12,8 @@ struct _HdyDemoWindow
HdyLeaflet *content_box;
GtkStack *header_revealer;
GtkStack *header_stack;
GtkImage *theme_variant_image;
GtkWidget *color_scheme_button;
GtkImage *color_scheme_image;
GtkStackSidebar *sidebar;
GtkStack *stack;
HdyComboRow *leaflet_transition_row;
......@@ -42,20 +43,21 @@ struct _HdyDemoWindow
G_DEFINE_TYPE (HdyDemoWindow, hdy_demo_window, HDY_TYPE_APPLICATION_WINDOW)
static void
theme_variant_button_clicked_cb (HdyDemoWindow *self)
color_scheme_button_clicked_cb (HdyDemoWindow *self)
{
GtkSettings *settings = gtk_settings_get_default ();
gboolean prefer_dark_theme;
HdyStyleManager *manager = hdy_style_manager_get_default ();
g_object_get (settings, "gtk-application-prefer-dark-theme", &prefer_dark_theme, NULL);
g_object_set (settings, "gtk-application-prefer-dark-theme", !prefer_dark_theme, NULL);
if (hdy_style_manager_get_dark (manager))
hdy_style_manager_set_color_scheme (manager, HDY_COLOR_SCHEME_FORCE_LIGHT);
else
hdy_style_manager_set_color_scheme (manager, HDY_COLOR_SCHEME_FORCE_DARK);
}
static gboolean
prefer_dark_theme_to_icon_name_cb (GBinding *binding,
const GValue *from_value,
GValue *to_value,
gpointer user_data)
dark_to_icon_name_cb (GBinding *binding,
const GValue *from_value,
GValue *to_value,
gpointer user_data)
{
g_value_set_string (to_value,
g_value_get_boolean (from_value) ? "light-mode-symbolic" :
......@@ -479,7 +481,8 @@ hdy_demo_window_class_init (HdyDemoWindowClass *klass)
gtk_widget_class_bind_template_child (widget_class, HdyDemoWindow, content_box);
gtk_widget_class_bind_template_child (widget_class, HdyDemoWindow, header_revealer);
gtk_widget_class_bind_template_child (widget_class, HdyDemoWindow, header_stack);
gtk_widget_class_bind_template_child (widget_class, HdyDemoWindow, theme_variant_image);
gtk_widget_class_bind_template_child (widget_class, HdyDemoWindow, color_scheme_button);
gtk_widget_class_bind_template_child (widget_class, HdyDemoWindow, color_scheme_image);
gtk_widget_class_bind_template_child (widget_class, HdyDemoWindow, sidebar);
gtk_widget_class_bind_template_child (widget_class, HdyDemoWindow, stack);
gtk_widget_class_bind_template_child (widget_class, HdyDemoWindow, leaflet_transition_row);
......@@ -510,7 +513,7 @@ hdy_demo_window_class_init (HdyDemoWindowClass *klass)
gtk_widget_class_bind_template_callback (widget_class, notify_leaflet_transition_cb);
gtk_widget_class_bind_template_callback (widget_class, notify_deck_transition_cb);
gtk_widget_class_bind_template_callback (widget_class, deck_go_next_row_activated_cb);
gtk_widget_class_bind_template_callback (widget_class, theme_variant_button_clicked_cb);
gtk_widget_class_bind_template_callback (widget_class, color_scheme_button_clicked_cb);
gtk_widget_class_bind_template_callback (widget_class, view_switcher_demo_clicked_cb);
gtk_widget_class_bind_template_callback (widget_class, notify_carousel_orientation_cb);
gtk_widget_class_bind_template_callback (widget_class, notify_carousel_indicators_cb);
......@@ -589,18 +592,21 @@ avatar_page_init (HdyDemoWindow *self)
static void
hdy_demo_window_init (HdyDemoWindow *self)
{
GtkSettings *settings = gtk_settings_get_default ();
HdyStyleManager *manager = hdy_style_manager_get_default ();
gtk_widget_init_template (GTK_WIDGET (self));
g_object_bind_property_full (settings, "gtk-application-prefer-dark-theme",
self->theme_variant_image, "icon-name",
g_object_bind_property_full (manager, "dark",
self->color_scheme_image, "icon-name",
G_BINDING_SYNC_CREATE,
prefer_dark_theme_to_icon_name_cb,
dark_to_icon_name_cb,
NULL,
NULL,
NULL);
gtk_widget_set_visible (self->color_scheme_button,
!hdy_style_manager_get_system_supports_color_schemes (manager));
hdy_combo_row_set_for_enum (self->leaflet_transition_row, HDY_TYPE_LEAFLET_TRANSITION_TYPE, leaflet_transition_name, NULL, NULL);
hdy_combo_row_set_selected_index (self->leaflet_transition_row, HDY_LEAFLET_TRANSITION_TYPE_OVER);
......
......@@ -46,12 +46,11 @@
<property name="title" translatable="yes">Handy Demo</property>
<property name="show_close_button">True</property>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<object class="GtkButton" id="color_scheme_button">
<property name="can_focus">True</property>
<signal name="clicked" handler="theme_variant_button_clicked_cb" swapped="yes"/>
<signal name="clicked" handler="color_scheme_button_clicked_cb" swapped="yes"/>
<child>
<object class="GtkImage" id="theme_variant_image">
<object class="GtkImage" id="color_scheme_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
......
project('libhandy', 'c',
version: '1.4.0',
version: '1.5.0',
license: 'LGPL-2.1+',
meson_version: '>= 0.49.0',
default_options: [ 'warning_level=1', 'buildtype=debugoptimized', 'c_std=gnu11' ],
......
......@@ -3,9 +3,12 @@ de
en_GB
es
eu
fa
fi
fr
fur
gl
hu
id
nl
oc
......@@ -17,3 +20,4 @@ sl
sr
sv
uk
zh_CN
......@@ -33,6 +33,7 @@ src/hdy-shadow-helper.c
src/hdy-squeezer.c
src/hdy-stackable-box.c
src/hdy-status-page.c
src/hdy-style-manager.c
src/hdy-swipe-tracker.c
src/hdy-tab-bar.c
src/hdy-tab-box.c
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment