NewCallBox+CallDisplay: UI facelift

This adds a style.css file to allow the use of custom css

Fixes https://source.puri.sm/Librem5/calls/issues/115:
- Making the phone number larger
- Moving the delete button to the bottom
- Rounding all buttons, and making the grid buttons circular
- Making the call button a bit less wide
This commit is contained in:
Julian Sparber
2020-01-28 16:35:02 +01:00
parent bcaf92d8d2
commit 06481155fd
6 changed files with 110 additions and 69 deletions

View File

@@ -158,6 +158,28 @@ static const GActionEntry actions[] =
};
static void
css_setup ()
{
GtkCssProvider *provider;
GFile *file;
GError *error = NULL;
provider = gtk_css_provider_new ();
file = g_file_new_for_uri ("resource:///sm/puri/calls/style.css");
if (!gtk_css_provider_load_from_file (provider, file, &error)) {
g_warning ("Failed to load CSS file: %s", error->message);
g_clear_error (&error);
g_object_unref (file);
return;
}
gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
GTK_STYLE_PROVIDER (provider), 600);
g_object_unref (file);
}
static void
startup (GApplication *application)
{
@@ -175,6 +197,8 @@ startup (GApplication *application)
actions,
G_N_ELEMENTS (actions),
application);
css_setup ();
}