Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2631)

Unified Diff: chrome/browser/ui/gtk/web_intent_picker_gtk.cc

Issue 10827341: Factoring out common constants (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More cocoa namespacing. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/gtk/web_intent_picker_gtk.cc
diff --git a/chrome/browser/ui/gtk/web_intent_picker_gtk.cc b/chrome/browser/ui/gtk/web_intent_picker_gtk.cc
index da4c5184654b199ec23f7ee82a122d68d70e0551..245b458e448a6940d04c615af7348c6f97953c56 100644
--- a/chrome/browser/ui/gtk/web_intent_picker_gtk.cc
+++ b/chrome/browser/ui/gtk/web_intent_picker_gtk.cc
@@ -48,19 +48,12 @@ using content::WebContents;
namespace {
-// The width in pixels of the area between the icon on the left and the close
-// button on the right.
-const int kMainContentWidth = 400;
-
// The pixel size of the header label when using a non-native theme.
const int kHeaderLabelPixelSize = 15;
// The pixel size of the font of the main content of the dialog.
const int kMainContentPixelSize = 13;
-// The maximum width in pixels of a suggested extension's title link.
-const int kTitleLinkMaxWidth = 130;
-
// Indices of the extension row widgets.
enum {
kIconIndex,
@@ -348,7 +341,7 @@ void WebIntentPickerGtk::OnPendingAsyncCompleted() {
// Set the label width to the size of |sub_contents|, which we don't have
// access to yet, by calculating the main content width minus borders.
gtk_util::SetLabelWidth(no_service_label,
- kMainContentWidth - 2 * ui::kContentAreaBorder);
+ kWindowWidth - 2 * ui::kContentAreaBorder);
gtk_box_pack_start(GTK_BOX(hbox), no_service_label, TRUE, TRUE, 0);
gtk_widget_show_all(contents_);
@@ -468,7 +461,7 @@ void WebIntentPickerGtk::InitContents() {
g_signal_connect(contents_, "destroy", G_CALLBACK(&OnDestroyThunk), this);
}
- gtk_widget_set_size_request(contents_, kMainContentWidth, -1);
+ gtk_widget_set_size_request(contents_, kWindowWidth, -1);
AddCloseButton(contents_);
GtkWidget* sub_contents = CreateSubContents(contents_);
@@ -495,7 +488,7 @@ void WebIntentPickerGtk::InitContents() {
// Set the label width to the size of |sub_contents|, which we don't have
// access to yet, by calculating the main content width minus borders.
gtk_util::SetLabelWidth(cws_label_,
- kMainContentWidth - 2 * ui::kContentAreaBorder);
+ kWindowWidth - 2 * ui::kContentAreaBorder);
gtk_util::ForceFontSizePixels(cws_label_, kMainContentPixelSize);
// Suggested extensions vbox.
« no previous file with comments | « chrome/browser/ui/cocoa/web_intent_sheet_controller.mm ('k') | chrome/browser/ui/intents/web_intent_picker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698