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

Side by Side Diff: chrome/browser/gtk/info_bubble_gtk.cc

Issue 274040: More style nits. (Closed)
Patch Set: Created 11 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/gtk/info_bubble_gtk.h" 5 #include "chrome/browser/gtk/info_bubble_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include "app/gfx/gtk_util.h" 10 #include "app/gfx/gtk_util.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 242
243 void InfoBubbleGtk::MoveWindow() { 243 void InfoBubbleGtk::MoveWindow() {
244 gint toplevel_x = 0, toplevel_y = 0; 244 gint toplevel_x = 0, toplevel_y = 0;
245 gdk_window_get_position( 245 gdk_window_get_position(
246 GTK_WIDGET(toplevel_window_)->window, &toplevel_x, &toplevel_y); 246 GTK_WIDGET(toplevel_window_)->window, &toplevel_x, &toplevel_y);
247 247
248 gint screen_x = 0; 248 gint screen_x = 0;
249 if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) { 249 if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) {
250 screen_x = toplevel_x + rect_.x() + (rect_.width() / 2) - 250 screen_x = toplevel_x + rect_.x() + (rect_.width() / 2) -
251 window_->allocation.width + kArrowX; 251 window_->allocation.width + kArrowX;
252 } 252 } else {
253 else {
254 screen_x = toplevel_x + rect_.x() + (rect_.width() / 2) - kArrowX; 253 screen_x = toplevel_x + rect_.x() + (rect_.width() / 2) - kArrowX;
255 } 254 }
256 255
257 gint screen_y = toplevel_y + rect_.y() + rect_.height() + 256 gint screen_y = toplevel_y + rect_.y() + rect_.height() +
258 kArrowToContentPadding; 257 kArrowToContentPadding;
259 258
260 gtk_window_move(GTK_WINDOW(window_), screen_x, screen_y); 259 gtk_window_move(GTK_WINDOW(window_), screen_x, screen_y);
261 } 260 }
262 261
263 void InfoBubbleGtk::StackWindow() { 262 void InfoBubbleGtk::StackWindow() {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 gboolean InfoBubbleGtk::HandleToplevelConfigure(GdkEventConfigure* event) { 388 gboolean InfoBubbleGtk::HandleToplevelConfigure(GdkEventConfigure* event) {
390 MoveWindow(); 389 MoveWindow();
391 StackWindow(); 390 StackWindow();
392 return FALSE; 391 return FALSE;
393 } 392 }
394 393
395 gboolean InfoBubbleGtk::HandleToplevelUnmap() { 394 gboolean InfoBubbleGtk::HandleToplevelUnmap() {
396 Close(); 395 Close();
397 return FALSE; 396 return FALSE;
398 } 397 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698