From df692f164c2123c397f932b81adb07b805cf9f3e Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 12 Mar 2014 20:39:04 +0800 Subject: [PATCH] gtk: Left align message box text. --- browser/ui/message_box_gtk.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/browser/ui/message_box_gtk.cc b/browser/ui/message_box_gtk.cc index a7eed861430e..ea58f0153662 100644 --- a/browser/ui/message_box_gtk.cc +++ b/browser/ui/message_box_gtk.cc @@ -4,10 +4,9 @@ #include "browser/ui/message_box.h" -#include - #include "base/callback.h" #include "browser/native_window.h" +#include "browser/ui/gtk/gtk_util.h" namespace atom { @@ -38,11 +37,14 @@ void ShowMessageBox(NativeWindow* parent_window, gtk_dialog_add_button(GTK_DIALOG(dialog), buttons[i].c_str(), i); GtkWidget* content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog)); - GtkWidget* message_label = gtk_label_new(message.c_str()); + GtkWidget* message_label = gtk_util::CreateBoldLabel(message); + gtk_util::LeftAlignMisc(message_label); gtk_box_pack_start(GTK_BOX(content_area), message_label, FALSE, FALSE, 0); GtkWidget* detail_label = gtk_label_new(detail.c_str()); + gtk_util::LeftAlignMisc(detail_label); gtk_box_pack_start(GTK_BOX(content_area), detail_label, FALSE, FALSE, 0); + gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); gtk_widget_show_all(dialog); callback.Run(0);