mirror of
https://gitlab.gnome.org/GNOME/libmks.git
synced 2025-01-18 10:25:16 +00:00
tools/mks: Cosmetic changes
- Prefer dark style: per the HIG recommendations - Sets a slightly bigger default size
This commit is contained in:
parent
188c63a183
commit
ab157df65d
12
tools/mks.c
12
tools/mks.c
@ -33,7 +33,7 @@ create_connection (int argc,
|
|||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
return g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, error);
|
return g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, error);
|
||||||
else
|
else
|
||||||
return g_dbus_connection_new_for_address_sync (argv[1], 0, NULL, NULL, error);
|
return g_dbus_connection_new_for_address_sync (argv[1], G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT | G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION, NULL, NULL, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -65,6 +65,7 @@ main (int argc,
|
|||||||
g_autoptr(GError) error = NULL;
|
g_autoptr(GError) error = NULL;
|
||||||
GtkWindow *window;
|
GtkWindow *window;
|
||||||
GtkWidget *display;
|
GtkWidget *display;
|
||||||
|
GtkSettings *settings;
|
||||||
GdkSurface *surface;
|
GdkSurface *surface;
|
||||||
|
|
||||||
gtk_init ();
|
gtk_init ();
|
||||||
@ -79,10 +80,15 @@ main (int argc,
|
|||||||
main_loop = g_main_loop_new (NULL, FALSE);
|
main_loop = g_main_loop_new (NULL, FALSE);
|
||||||
|
|
||||||
window = g_object_new (GTK_TYPE_WINDOW,
|
window = g_object_new (GTK_TYPE_WINDOW,
|
||||||
"default-width", 640,
|
"default-width", 1280,
|
||||||
"default-height", 480,
|
"default-height", 768,
|
||||||
"title", "Mouse, Keyboard, Screen",
|
"title", "Mouse, Keyboard, Screen",
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
settings = gtk_settings_get_default ();
|
||||||
|
g_object_set (settings, "gtk-application-prefer-dark-theme", TRUE, NULL);
|
||||||
|
gtk_widget_add_css_class (GTK_WIDGET (window), "dark");
|
||||||
|
|
||||||
display = mks_display_new ();
|
display = mks_display_new ();
|
||||||
gtk_window_set_child (window, display);
|
gtk_window_set_child (window, display);
|
||||||
g_signal_connect_swapped (window,
|
g_signal_connect_swapped (window,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user